DGtal  1.0.0
testCheckImageConcept.cpp
Go to the documentation of this file.
1 
30 #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 
44 using namespace DGtal;
45 using namespace Z2i;
46 
48 // Functions for testing class CheckImageConcept.
50 
55 {
56  trace.beginBlock ( "Testing block ..." );
57 
58  typedef ImageContainerBySTLVector<Domain, int> ImageVector;
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 
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 // //
void beginBlock(const std::string &keyword="")
bool testCheckImageConcept()
Trace trace
Definition: Common.h:144
double endBlock()
std::ostream & emphase()
int main(int argc, char **argv)
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.
std::ostream & info()
Aim: Defines the concept describing a read/write image, having an output iterator.
Definition: CImage.h:102
Aim: implements a model of CImageContainer using a ITK Image.