18 #ifndef __otbMinMaxAttributesLabelMapFilter_txx
19 #define __otbMinMaxAttributesLabelMapFilter_txx
22 #include "itkNumericTraits.h"
26 template <
class TInputImage>
30 this->Superclass::SetNumberOfRequiredOutputs(3);
35 template<
class TInputImage>
44 ret = InputImageType::New();
48 ret = AttributesMapObjectType::New();
55 template<
class TInputImage>
63 template<
class TInputImage>
71 template<
class TInputImage>
79 template<
class TInputImage>
87 template<
class TInputImage>
92 std::vector<std::string> attributes = this->GetLabelMap()->GetLabelObject(0)->GetAvailableAttributes();
98 std::vector<std::string>::const_iterator valueIt;
99 for (valueIt = attributes.begin(); valueIt != attributes.end(); ++valueIt)
101 minAttr[*valueIt] = itk::NumericTraits<AttributesValueType>::max();
102 maxAttr[*valueIt] = itk::NumericTraits<AttributesValueType>::NonpositiveMin();
107 for (; it != end; ++it)
112 std::vector<std::string>::const_iterator it;
113 for (it = attributes.begin(); it != attributes.end(); ++it)
117 if (val < minAttr[*it])
120 if (val > maxAttr[*it])