67 typedef ImageContainerBySTLVector < Z2i::Domain, unsigned char> Image2D;
76 typedef ImageContainerBySTLVector < Z3i::Domain, unsigned char> Image3D;
86 std::string imageFilename3D = examplesPath +
"samples/Al.100.vol";
87 std::string imageFilename2D = examplesPath +
"samples/church.pgm";
91 for (
unsigned int i=1; i<=20; i*=2){
92 std::vector<Z2i::Domain::Size> aGridSize2D;
93 aGridSize2D.push_back(i);
94 aGridSize2D.push_back(i);
104 ConstImageAdapterForSubSampling subsampledImage2D (image2D, subSampledDomain2D, subSampler2D, df);
107 stringstream outputname;
108 outputname <<
"subSampledImage"<< i<<
"x"<< i <<
".pgm" ;
112 trace.
info() <<
"Exporting 2D subsampled image by grid size :" << i <<
"x"<< i<<
" in "<< outputname.str() << std::endl;
115 for (
unsigned int i=1; i<=20; i*=2){
116 std::vector<Z3i::Domain::Size> aGridSize3D;
117 aGridSize3D.push_back(i);
118 aGridSize3D.push_back(i);
119 aGridSize3D.push_back(i);
130 ConstImageAdapterForSubSampling3D subsampledImage3D (image3D, subSampledDomain3D, subSampler3D, df);
133 stringstream outputname3D;
134 outputname3D <<
"subSampledImage3D"<< i<<
"x"<< i <<
".vol" ;
138 trace.
info() <<
"Exporting 3D subsampled image by grid size :" << i <<
"x"<< i<<
"x"<< i<<
" in "<< outputname3D.str() << std::endl;
Aim: Functor that subsamples an initial domain by given a grid size and a shift vector....
const TDomain & getSubSampledDomain()