17 #ifndef __itkLabelMapToRGBImageFilter_txx
18 #define __itkLabelMapToRGBImageFilter_txx
21 #include "itkNumericTraits.h"
27 template <
class TInputImage,
class TOutputImage>
34 template<
class TInputImage,
class TOutputImage>
44 output->FillBuffer(
function( input->GetBackgroundValue() ) );
46 Superclass::BeforeThreadedGenerateData();
51 template<
class TInputImage,
class TOutputImage>
56 const typename LabelObjectType::LabelType & label = labelObject->GetLabel();
61 typename InputImageType::LabelObjectType::LineContainerType::const_iterator lit;
62 typename InputImageType::LabelObjectType::LineContainerType & lineContainer = labelObject->GetLineContainer();
64 for( lit = lineContainer.begin(); lit != lineContainer.end(); lit++ )
67 unsigned long length = lit->GetLength();
68 for(
unsigned int i=0; i<length; i++)
70 this->GetOutput()->SetPixel( idx,
function( label ) );