DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
testCheckImageConcept.cpp
Go to the documentation of this file.
1
16
29
31
#include "DGtal/helpers/StdDefs.h"
32
#include <iostream>
33
#include "DGtal/base/Common.h"
34
#include "DGtal/images/ImageContainerBySTLVector.h"
35
#include "DGtal/images/ImageContainerBySTLMap.h"
36
#ifdef DGTAL_WITH_ITK
37
#include "DGtal/images/ImageContainerByITKImage.h"
38
#endif
39
#include "DGtal/images/ImageContainerByHashTree.h"
40
#include "DGtal/images/CImage.h"
41
43
44
using namespace
DGtal
;
45
using namespace
Z2i
;
46
48
// Functions for testing class CheckImageConcept.
50
54
bool
testCheckImageConcept
()
55
{
56
trace
.
beginBlock
(
"Testing block ..."
);
57
58
typedef
ImageContainerBySTLVector<Domain, int>
ImageVector;
59
typedef
ImageContainerBySTLVector<Domain, int>
ImageMap;
60
61
#ifdef DGTAL_WITH_ITK
62
typedef
ImageContainerByITKImage<Domain, int>
ImageITK;
63
#endif
64
65
//HashTree is not (yet) a model of CImage
66
typedef
experimental::ImageContainerByHashTree<Domain, int>
ImageHash;
67
68
BOOST_CONCEPT_ASSERT((
concepts::CImage< ImageVector >
));
69
BOOST_CONCEPT_ASSERT((
concepts::CImage< ImageMap >
));
70
#ifdef DGTAL_WITH_ITK
71
BOOST_CONCEPT_ASSERT((
concepts::CImage< ImageITK >
));
72
#endif
73
74
BOOST_CONCEPT_ASSERT((
concepts::CImage< ImageHash >
));
75
76
trace
.
endBlock
();
77
78
return
true
;
79
}
80
82
// Standard services - public :
83
84
int
main
(
int
argc,
char
** argv )
85
{
86
trace
.
beginBlock
(
"Testing class CheckImageConcept"
);
87
trace
.
info
() <<
"Args:"
;
88
for
(
int
i = 0; i < argc; ++i )
89
trace
.
info
() <<
" "
<< argv[ i ];
90
trace
.
info
() << std::endl;
91
92
bool
res =
testCheckImageConcept
();
// && ... other tests
93
trace
.
emphase
() << ( res ?
"Passed."
:
"Error."
) << std::endl;
94
trace
.
endBlock
();
95
return
res ? 0 : 1;
96
}
97
// //
DGtal::ImageContainerByITKImage
Aim: implements a model of CImageContainer using a ITK Image.
Definition
ImageContainerByITKImage.h:94
DGtal::ImageContainerBySTLVector
Definition
ImageContainerBySTLVector.h:127
DGtal::Trace::beginBlock
void beginBlock(const std::string &keyword="")
DGtal::Trace::emphase
std::ostream & emphase()
DGtal::Trace::info
std::ostream & info()
DGtal::Trace::endBlock
double endBlock()
DGtal::experimental::ImageContainerByHashTree
Model of CImageContainer implementing the association key<->Value using a hash tree....
Definition
ImageContainerByHashTree.h:129
DGtal::Z2i
Z2i this namespace gathers the standard of types for 2D imagery.
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::trace
Trace trace
DGtal::concepts::CImage
Aim: Defines the concept describing a read/write image, having an output iterator.
Definition
CImage.h:103
testCheckImageConcept
bool testCheckImageConcept()
Definition
testCheckImageConcept.cpp:54
main
int main(int, char **)
Definition
testIntegerComputer.cpp:331
tests
images
testCheckImageConcept.cpp
Generated on
for DGtal by
1.18.0