|
template<class DstArrayT, class Src1ArrayT, class Src2ArrayT>
Definition at line 120 of file QbWatershed.h.
References Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::structPointValue::arith, Impala::Core::Array::Trait::CONTOURVAL, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::structPointValue::cost, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::costImage, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::curdist, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::distImage, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::globalOrderCounter, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::h, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::hist, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::hmin, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::structPointValue::img, Impala::Core::Array::Trait::INITVAL, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::structPointValue::lastDist, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::structPointValue::localOrderCounter, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::structPointValue::mask, Impala::Core::Array::Trait::MASKVAL, Impala::Core::Geometry::PointZ::mX, Impala::Core::Geometry::PointZ::mY, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::structPointValue::point, and Impala::Core::Array::Trait::WSHEDVAL. 00122 {
00123 vp.arith=arith;
00124 vp.img=img;
00125 vp.mask=mask;
00126 continua = true;
00127 bool q=false;
00128
00129
00130 if (h==hmin) {
00131 hist[img]=true;
00132 }
00133
00134 if (h!=hmin && !hist[h] ) {
00135 continua = false;
00136 return q;
00137 }
00138
00139
00140 if (img == h && arith == INITVAL && arith != CONTOURVAL ) {
00141 q=true;
00142 distImage(vp.point.mX, vp.point.mY)=0;
00143
00144 costImage(vp.point.mX, vp.point.mY)=1;
00145 vp.arith = MASKVAL;
00146 vp.lastDist = 0;
00147 }
00148
00149 if (img==h && (arith == CONTOURVAL || arith == WSHEDVAL) ) {
00150 distImage(vp.point.mX, vp.point.mY)= 1;
00151 costImage(vp.point.mX, vp.point.mY)= -2;
00152 curdist=1;
00153 vp.lastDist=1;
00154 q=true;
00155 }
00156
00157 if (q) {
00158 vp.localOrderCounter=globalOrderCounter++;
00159
00160 vp.cost=costImage(vp.point.mX, vp.point.mY);
00161 }
00162 arith=vp.arith;
00163 return q;
00164 }
|