18 #ifndef __otbParserConditionDataNodeFeatureFunction_txx
19 #define __otbParserConditionDataNodeFeatureFunction_txx
29 template <
class TImage,
class TCoordRep,
class TPrecision>
33 m_ParserConditionFunctor = ParserConditionFunctorType::New();
39 template <
class TImage,
class TCoordRep,
class TPrecision>
44 Superclass::PrintSelf( os, indent );
48 template <
class TImage,
class TCoordRep,
class TPrecision>
59 Self* _this =
const_cast<Self*
>(
this);
66 switch (node.GetNodeType())
70 itkExceptionMacro(<<
"This DataNode type is not handle yet");
75 path = node.GetLine();
80 path = node.GetPolygonExteriorRing();
85 itkExceptionMacro(<<
"This DataNode type is not handle yet");
93 double nbValidPixel = 0.;
94 double nbVisitedPixel = 0.;
98 if(this->IsInsideBuffer(lineIt.
GetIndex()))
100 if( parser(this->GetInputImage()->GetPixel(lineIt.
GetIndex())) )
110 if(nbVisitedPixel == 0)
112 output.push_back(static_cast<PrecisionType>(0.));
116 output.push_back(static_cast<PrecisionType>(nbValidPixel/nbVisitedPixel));
119 output.push_back(static_cast<PrecisionType>(nbValidPixel));
120 output.push_back(static_cast<PrecisionType>(nbVisitedPixel));