DGtal 1.3.0
Loading...
Searching...
No Matches
testCheckImageConcept.cpp
Go to the documentation of this file.
1
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 WITH_ITK
37#include "DGtal/images/ImageContainerByITKImage.h"
38#endif
39#include "DGtal/images/ImageContainerByHashTree.h"
40#include "DGtal/images/CImage.h"
41
43
44using namespace DGtal;
45using namespace Z2i;
46
48// Functions for testing class CheckImageConcept.
50
55{
56 trace.beginBlock ( "Testing block ..." );
57
60
61#ifdef WITH_ITK
63#endif
64
65 //HashTree is not (yet) a model of CImage
67
68 BOOST_CONCEPT_ASSERT(( concepts::CImage< ImageVector >));
69 BOOST_CONCEPT_ASSERT(( concepts::CImage< ImageMap >));
70#ifdef WITH_ITK
71 BOOST_CONCEPT_ASSERT(( concepts::CImage< ImageITK >));
72#endif
73
74 BOOST_CONCEPT_ASSERT(( concepts::CImage< ImageHash >));
75
77
78 return true;
79}
80
82// Standard services - public :
83
84int 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;
95 return res ? 0 : 1;
96}
97// //
Aim: implements a model of CImageContainer using a ITK Image.
void beginBlock(const std::string &keyword="")
std::ostream & emphase()
std::ostream & info()
double endBlock()
Model of CImageContainer implementing the association key<->Value using a hash tree....
DGtal is the top-level namespace which contains all DGtal functions and types.
Trace trace
Definition: Common.h:154
Aim: Defines the concept describing a read/write image, having an output iterator.
Definition: CImage.h:103
int main()
Definition: testBits.cpp:56
bool testCheckImageConcept()