|
template<class DstArrayT, class Src1ArrayT, class Src2ArrayT>
Definition at line 102 of file QbWatershedMarkers2.h.
References Impala::Core::Array::Trait::QbWatershedMarkers2< DstArrayT, Src1ArrayT, Src2ArrayT >::structPointValue::arith, Impala::Core::Array::Trait::QbWatershedMarkers2< DstArrayT, Src1ArrayT, Src2ArrayT >::structPointValue::cost, Impala::Core::Array::Trait::QbWatershedMarkers2< DstArrayT, Src1ArrayT, Src2ArrayT >::costImage, Impala::Core::Array::Trait::QbWatershedMarkers2< DstArrayT, Src1ArrayT, Src2ArrayT >::doLabel, Impala::Core::Array::Trait::QbWatershedMarkers2< DstArrayT, Src1ArrayT, Src2ArrayT >::globalOrderCounter, Impala::Core::Array::Trait::QbWatershedMarkers2< DstArrayT, Src1ArrayT, Src2ArrayT >::structPointValue::img, Impala::Core::Array::Trait::QbWatershedMarkers2< DstArrayT, Src1ArrayT, Src2ArrayT >::labelcode, Impala::Core::Array::Trait::QbWatershedMarkers2< DstArrayT, Src1ArrayT, Src2ArrayT >::structPointValue::localOrderCounter, Impala::Core::Array::Trait::QbWatershedMarkers2< DstArrayT, Src1ArrayT, Src2ArrayT >::structPointValue::mask, Impala::Core::Geometry::PointZ::mX, Impala::Core::Geometry::PointZ::mY, and Impala::Core::Array::Trait::QbWatershedMarkers2< DstArrayT, Src1ArrayT, Src2ArrayT >::structPointValue::point. 00103 {
00104 vp.arith=arith;
00105 vp.img=img;
00106 vp.mask=mask;
00107 bool q;
00108 if (vp.mask!=0) {
00109 q=true;
00110 costImage(vp.point.mX, vp.point.mY)=0;
00111 if (doLabel) {
00112 labelcode++;
00113 vp.arith=labelcode;
00114 } else {
00115 vp.arith=vp.mask;
00116 }
00117 } else {
00118 vp.arith=0;
00119 q=false;
00120 }
00121 if (q) {
00122 vp.localOrderCounter=globalOrderCounter++;
00123
00124 vp.cost=costImage(vp.point.mX, vp.point.mY);
00125 }
00126 arith=vp.arith;
00127 return q;
00128 }
|