32#include "DGtal/base/Common.h"
33#include "DGtal/kernel/domains/HyperRectDomain.h"
34#include "DGtal/kernel/SpaceND.h"
35#include "DGtal/helpers/StdDefs.h"
36#include "DGtal/images/CImage.h"
37#include "DGtal/images/Image.h"
38#include "DGtal/images/ImageContainerBySTLVector.h"
53 unsigned int nbok = 0;
64 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
65 <<
"true == true" << std::endl;
74 unsigned int nbok = 0;
100 Domain6::Point
A(aa);
101 Domain6::Point
B(bb);
103 MyImage6 imageBis(
new VImage6( Domain6(
A,
B) ) );
107 nbok += imageBis.isValid() ? 1 : 0;
111 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
112 <<
"true == true" << std::endl;
120 unsigned int nbok = 0;
147 for(MyImage::ConstRange::ConstIterator it =r.begin(), ite=r.end();
149 std::cerr << (*it)<<
" ";
153 nbok += (
image(c) == 42) ? 1 : 0;
156 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
157 <<
"true == true" << std::endl;
165 unsigned int nbok = 0;
186 VImage * imContainer =
193 const MyImage::ImagePointer p = image2.getPointer();
197 nbok += (image2.isValid()) ? 1 : 0;
201 trace.
info() << imContainer << std::endl;
202 nbok += (p.get() == imContainer) ? 1 : 0;
205 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
206 <<
"true == true" << std::endl;
214 unsigned int nbok = 0;
231 VImage myImageC(
domain );
232 MyImage imageFromConstRef ( myImageC );
233 trace.
info() <<
"Image constructed (from constRef): "<< imageFromConstRef <<std::endl;
234 nbok += (imageFromConstRef.getPointer().count()== 2) ? 1 : 0;
236 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
237 <<
"unique" << std::endl;
240 trace.
info() <<
"Image constructed (degulat): "<< image3 <<std::endl;
243 trace.
info() <<
"default: "<< image3 <<std::endl;
245 nbok += (image3.getPointer().count()== 3) ? 1 : 0;
247 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
248 <<
"true == true" << std::endl;
249 trace.
info() <<
"assignment: "<< image3 <<std::endl;
250 nbok += (image3.getPointer().count()== 3) ? 1 : 0;
252 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
253 <<
"true == true" << std::endl;
256 trace.
info() <<
"setValue on assigned: "<< image3 <<std::endl;
257 nbok += (image3.getPointer().count()== 2) ? 1 : 0;
261 trace.
info() <<
"Image constructed (copy): "<< image4 <<std::endl;
262 nbok += (image4.getPointer().count()== 3) ? 1 : 0;
266 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
267 <<
"true == true" << std::endl;
274 unsigned int nbok = 0;
289 typedef MyImage::Range::Iterator Iterator;
311int main(
int argc,
char** argv )
315 for (
int i = 0; i < argc; ++i )
325 trace.
emphase() << ( res ?
"Passed." :
"Error." ) << endl;
Iterator for HyperRectDomain.
Aim: implements association bewteen points lying in a digital domain and values.
const Domain & domain() const
const ImagePointer getPointer() const
ConstRange constRange() const
void setValue(const Point &aPoint, const Value &aValue)
SimpleRandomAccessConstRangeFromPoint< ConstIterator, DistanceFunctor > ConstRange
Constant range type.
void beginBlock(const std::string &keyword="")
void setValue(Point const &aPoint, Value const &aValue)
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: Defines the concept describing a read/write image, having an output iterator.
bool testSelfCheckConcept()
bool testImageCopyShort()