74 for (
int i = 0; ( (dit != ditEnd)&&(i < 5) ); ++dit, ++i)
76 img.setValue(*dit, i);
86 bool flag2 = std::equal(rimg.
begin(), rimg.
end(), rimg2.
begin());
87 bool flag3 = std::equal(rimg.
begin(), rimg.
end(), rimg3.
begin());
88 bool flag23 = std::equal(rimg2.
begin(), rimg2.
end(), rimg3.
begin());
90 nbok += ( (!flag2) && flag3 && (!flag23) )?1:0;
92 trace.
info() <<
"(" <<nbok <<
"/" << nb <<
")" << std::endl;
106 trace.
info() <<
"(" <<nbok <<
"/" << nb <<
")" << std::endl;
114 img.setValue( p, 128 );
115 bool flag4 = ( img(p) == 128 );
118 rimg = img.constRange();
121 std::copy( rimg.
begin(), rimg.
end(), std::ostream_iterator<int>(cout,
", ") );
124 std::copy( rimg2.
begin(), rimg2.
end(), std::ostream_iterator<int>(cout,
", ") );
127 std::copy( rimg3.
begin(), rimg3.
end(), std::ostream_iterator<int>(cout,
", ") );
130 nbok += ( flag4 && (!flag2) && (!flag3) )?1:0;
132 trace.
info() <<
"(" <<nbok <<
"/" << nb <<
")" << std::endl;
142 return ( img.isValid() && img2.
isValid() && img3.
isValid() && (nbok == nb) );
Aim: Parallelepidec region of a digital space, model of a 'CDomain'.