79 unsigned int nbok = 0;
90 for (
unsigned k = 0; k < 49; k++ )
94 image.setValue ( a, 128 );
100 Predicate aPredicate(image,0);
111 for (
unsigned int y = 2; y < 16; y++)
113 for (
unsigned int x = 2; x < 16; x++)
115 std::cout << (*it) <<
" ";
118 std::cout << std::endl;
123 RDT reverseDT(&dom,&
dt,&l2power);
126 for(
unsigned int j=2; j<16; j++)
128 for(
unsigned int i=2; i<16; i++)
134 RDT::ConstRange::ConstIterator it2 = reverseDT.constRange().begin();
135 for (
unsigned int y = 2; y < 16; y++)
137 for (
unsigned int x = 2; x < 16; x++)
139 std::cout << (*it2) <<
" ";
142 std::cout << std::endl;
147 RDT::ConstRange::ConstIterator itrec = reverseDT.constRange().begin(), itend = reverseDT.constRange().end();
149 for( ; itrec != itend; ++itrec,++itinit)
151 ok = ok & ((*itinit) == 0);
157 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
158 <<
"ok" << std::endl;
161 nbok += (reverseDT.metricPtr()->exactDistanceRepresentation(
Z2i::Point(4,7),
Z2i::Point(5,7))==1) ? 1 : 0;
163 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
164 <<
"true == true" << std::endl;
167 nbok += (reverseDT(
Z2i::Point(4,7))==0) ? 1 : 0;
169 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
170 <<
"true == true" << std::endl;
177 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
178 <<
"true == true" << std::endl;
186 unsigned int nbok = 0;
197 for (
unsigned k = 0; k < 49; k++ )
199 a[0] = ( k / 7 ) + 5;
200 a[1] = ( k % 7 ) + 5;
201 image.setValue ( a, 128 );
207 Predicate aPredicate(image,0);
217 for (
unsigned int y = 2; y < 16; y++)
219 for (
unsigned int x = 2; x < 16; x++)
221 std::cout << (int)(*it) <<
" ";
224 std::cout << std::endl;
229 RDT reverseDT(&dom, &
dt, &l1power);
233 for(
unsigned int j=2; j<16; j++)
235 for(
unsigned int i=2; i<16; i++)
241 RDT::ConstRange::ConstIterator it2 = reverseDT.constRange().begin();
242 for (
unsigned int y = 2; y < 16; y++)
244 for (
unsigned int x = 2; x < 16; x++)
246 std::cout << (int)(*it2) <<
" ";
249 std::cout << std::endl;
254 RDT::ConstRange::ConstIterator itrec = reverseDT.constRange().begin(), itend = reverseDT.constRange().end();
256 for( ; itrec != itend; ++itrec,++itinit)
258 ok = ok & ((*itinit) == 0);
262 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
263 <<
"true == true" << std::endl;