38 #include "DGtal/base/Common.h"
39 #include "DGtal/helpers/StdDefs.h"
40 #include "ConfigTest.h"
42 #include "DGtal/base/BasicFunctors.h"
43 #include "DGtal/images/ImageSelector.h"
44 #include "DGtal/images/ConstImageAdapter.h"
49 using namespace DGtal;
55 for (I it = r.begin(), itEnd = r.end();
64 int main(
int argc,
char** argv )
66 unsigned int nbok = 0;
71 for (
int i = 0; i < argc; ++i )
81 Point p = Point::diagonal(0);
82 Point q = Point::diagonal(size-1);
90 const int maximalValue = size*size;
92 for (
int i = 0; i < maximalValue; ++i)
97 std::copy( r.begin(), r.end(), std::ostream_iterator<int>(cout,
", ") );
102 const int thresholdValue = maximalValue/2;
110 MyConstImageAdapter a(img, d, g, t);
117 std::copy( ra.begin(), ra.end(), std::ostream_iterator<int>(cout,
", ") );
120 std::vector<int> to_vector(25);
121 std::copy(ra.begin(), ra.end(), to_vector.begin());
122 for (
int i = 0; i < 25; i++)
157 bool res = (nbok == nb);
159 trace.
emphase() << ( res ?
"Passed." :
"Error." ) << endl;
Aim: implements a const image adapter with a given domain (i.e. a subdomain) and 2 functors : g for d...
std::vector< Value >::iterator OutputIterator
Aim: implements association bewteen points lying in a digital domain and values.
Aim: model of CConstBidirectionalRangeFromPoint that adapts any range of elements bounded by two iter...
void beginBlock(const std::string &keyword="")
Aim: A small functor with an operator () that compares one value to a threshold value according to tw...
Point::Coordinate Integer
MyDigitalSurface::ConstIterator ConstIterator
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: Defines the concept describing a read-only image, which is a refinement of CPointFunctor.
Aim: Define a simple default functor that just returns its argument.
int main(int argc, char **argv)
void displayRange(const R &r)
ImageContainerBySTLVector< Domain, Value > Image