22 #ifndef otbLabelMapToAttributeImageFilter_h
23 #define otbLabelMapToAttributeImageFilter_h
25 #include "itkLabelMapFilter.h"
27 #include "itkVariableLengthVector.h"
42 template <
class TInputImage,
class TOutputImage,
43 class TAttributeAccessor =
typename Functor::AttributesMapLabelObjectAccessor<typename TInputImage::LabelObjectType>>
49 typedef itk::LabelMapFilter<TInputImage, TOutputImage>
Superclass;
68 typedef typename OutputImageType::IndexType
IndexType;
84 return m_ChosenAttributes;
88 void SetChosenAttributes(AttributeListType& newAttributes);
91 unsigned int GetNumberOfComponentsPerPixel();
94 bool SetAttributeForNthChannel(
unsigned int channel,
const char* attribute);
99 return this->SetAttributeForNthChannel(channel, attribute.c_str());
106 void GenerateOutputInformation()
override;
108 void BeforeThreadedGenerateData()
override;
110 void ThreadedProcessLabelObject(LabelObjectType* labelObject)
override;
121 #ifndef OTB_MANUAL_INSTANTIATION
This class produces an image from attributes in a label map.
itk::SmartPointer< Self > Pointer
TInputImage InputImageType
const AttributeListType & GetChosenAttributes()
LabelObjectType::ConstLineIterator ConstLineIteratorType
OutputImageType::InternalPixelType OutputInternalPixelType
LabelMapToAttributeImageFilter Self
bool SetAttributeForNthChannel(unsigned int channel, const std::string &attribute)
itk::LabelMapFilter< TInputImage, TOutputImage > Superclass
OutputInternalPixelType m_BackgroundValue
std::vector< std::string > AttributeListType
~LabelMapToAttributeImageFilter() override
LabelObjectType::AttributesMapType AttributesMapType
OutputImageType::PixelType OutputPixelType
InputImageType::LabelObjectType LabelObjectType
itk::SmartPointer< const Self > ConstPointer
TAttributeAccessor AttributeAccessorType
AttributeListType m_ChosenAttributes
itk::VariableLengthVector< OutputInternalPixelType > VectorPixelType
AttributeAccessorType::AttributeValueType AttributeValueType
TOutputImage OutputImageType
OutputImageType::IndexType IndexType
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.