21 #ifndef otbLabelMapWithClassLabelToClassLabelImageFilter_hxx
22 #define otbLabelMapWithClassLabelToClassLabelImageFilter_hxx
25 #include "itkNumericTraits.h"
26 #include "itkProgressReporter.h"
27 #include "itkImageRegionConstIteratorWithIndex.h"
32 template <
class TInputImage,
class TOutputImage>
38 template <
class TInputImage,
class TOutputImage>
43 output->FillBuffer(input->GetBackgroundValue());
44 Superclass::BeforeThreadedGenerateData();
48 template <
class TInputImage,
class TOutputImage>
51 typename LabelObjectType::ClassLabelType label = itk::NumericTraits<typename LabelObjectType::ClassLabelType>::max();
52 if (labelObject->HasClassLabel())
54 label = labelObject->GetClassLabel();
59 while (!lit.IsAtEnd())
62 unsigned long length = lit.GetLine().GetLength();
63 for (
unsigned int i = 0; i < length; ++i)
65 this->GetOutput()->SetPixel(idx, label);