DGtal  1.4.beta
Functions
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;
94  trace.endBlock();
95  return res ? 0 : 1;
96 }

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 
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 }

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

Referenced by main().

DGtal::Trace::endBlock
double endBlock()
DGtal::ImageContainerByITKImage
Aim: implements a model of CImageContainer using a ITK Image.
Definition: ImageContainerByITKImage.h:93
DGtal::ImageContainerBySTLVector
Definition: ImageContainerBySTLVector.h:126
DGtal::Trace::emphase
std::ostream & emphase()
DGtal::trace
Trace trace
Definition: Common.h:154
DGtal::experimental::ImageContainerByHashTree
Model of CImageContainer implementing the association key<->Value using a hash tree....
Definition: ImageContainerByHashTree.h:128
DGtal::Trace::beginBlock
void beginBlock(const std::string &keyword="")
DGtal::Trace::info
std::ostream & info()
testCheckImageConcept
bool testCheckImageConcept()
Definition: testCheckImageConcept.cpp:54
DGtal::concepts::CImage
Aim: Defines the concept describing a read/write image, having an output iterator.
Definition: CImage.h:102