DGtal 1.4.0
Loading...
Searching...
No Matches
testCheckImageConcept.cpp File Reference
#include "DGtal/helpers/StdDefs.h"
#include <iostream>
#include "DGtal/base/Common.h"
#include "DGtal/images/ImageContainerBySTLVector.h"
#include "DGtal/images/ImageContainerBySTLMap.h"
#include "DGtal/images/ImageContainerByITKImage.h"
#include "DGtal/images/ImageContainerByHashTree.h"
#include "DGtal/images/CImage.h"
Include dependency graph for testCheckImageConcept.cpp:

Go to the source code of this file.

Functions

bool testCheckImageConcept ()
 
int main (int argc, char **argv)
 

Detailed Description

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Author
David Coeurjolly (david.nosp@m..coe.nosp@m.urjol.nosp@m.ly@l.nosp@m.iris..nosp@m.cnrs.nosp@m..fr ) Laboratoire d'InfoRmatique en Image et Systèmes d'information - LIRIS (CNRS, UMR 5205), CNRS, France
Date
2010/11/28

Functions for testing the models of the Image concept.

This file is part of the DGtal library.

Definition in file testCheckImageConcept.cpp.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Definition at line 84 of file testCheckImageConcept.cpp.

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}
void beginBlock(const std::string &keyword="")
std::ostream & emphase()
std::ostream & info()
double endBlock()
Trace trace
Definition Common.h:153
bool testCheckImageConcept()

References DGtal::Trace::beginBlock(), DGtal::Trace::emphase(), DGtal::Trace::endBlock(), DGtal::Trace::info(), testCheckImageConcept(), and DGtal::trace.

◆ testCheckImageConcept()

bool testCheckImageConcept ( )

Example of a test. To be completed.

Definition at line 54 of file testCheckImageConcept.cpp.

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}
Aim: implements a model of CImageContainer using a ITK Image.
Model of CImageContainer implementing the association key<->Value using a hash tree....
Aim: Defines the concept describing a read/write image, having an output iterator.
Definition CImage.h:103

References DGtal::Trace::beginBlock(), DGtal::Trace::endBlock(), and DGtal::trace.

Referenced by main().