DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
testCheckImageConcept.cpp
1 
30 
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 
44 using namespace std;
45 using namespace DGtal;
46 using namespace Z2i;
47 
49 // Functions for testing class CheckImageConcept.
51 
55 bool testCheckImageConcept()
56 {
57  unsigned int nbok = 0;
58  unsigned int nb = 0;
59 
60  trace.beginBlock ( "Testing block ..." );
61 
62  typedef ImageContainerBySTLVector<Domain, int> ImageVector;
64 
65 #ifdef WITH_ITK
67 #endif
68 
69  //HashTree is not (yet) a model of CImage
70  //typedef experimental::ImageContainerByHashTree<Domain, int> ImageHash;
71 
72  //BOOST_CONCEPT_ASSERT(( CImage< ImageVector >));
73  //BOOST_CONCEPT_ASSERT(( CImage< ImageMap >));
74 #ifdef WITH_ITK
75  //BOOST_CONCEPT_ASSERT(( CImage< ImageITK >));
76 #endif
77 
79 
80  nbok += true ? 1 : 0;
81  nb++;
82  trace.info() << "(" << nbok << "/" << nb << ") "
83  << "true == true" << std::endl;
84  trace.endBlock();
85 
86  return nbok == nb;
87 }
88 
90 // Standard services - public :
91 
92 int main( int argc, char** argv )
93 {
94  trace.beginBlock ( "Testing class CheckImageConcept" );
95  trace.info() << "Args:";
96  for ( int i = 0; i < argc; ++i )
97  trace.info() << " " << argv[ i ];
98  trace.info() << endl;
99 
100  bool res = testCheckImageConcept(); // && ... other tests
101  trace.emphase() << ( res ? "Passed." : "Error." ) << endl;
102  trace.endBlock();
103  return res ? 0 : 1;
104 }
105 // //