17 #ifndef __itkScalarToRGBColormapImageFilter_txx
18 #define __itkScalarToRGBColormapImageFilter_txx
47 template <
class TInputImage,
class TOutputImage>
51 this->SetNumberOfRequiredInputs( 1 );
53 this->m_UseInputImageExtremaForScaling =
true;
58 typename DefaultColormapType::Pointer greyColormap = DefaultColormapType::New();
59 this->SetColormap( greyColormap );
65 template <
class TInputImage,
class TOutputImage>
70 if( this->m_UseInputImageExtremaForScaling ==
true )
73 this->GetInput()->GetRequestedRegion() );
81 if( value < minimumValue )
85 if( value > maximumValue )
91 this->GetColormap()->SetMinimumInputValue( minimumValue );
92 this->GetColormap()->SetMaximumInputValue( maximumValue );
99 template <
class TInputImage,
class TOutputImage>
112 this->CallCopyOutputRegionToInputRegion(inputRegionForThread, outputRegionForThread);
118 ProgressReporter progress(
this, threadId, outputRegionForThread.GetNumberOfPixels());
125 outputIt.
Set( this->m_Colormap->operator()( inputIt.
Get() ) );
128 progress.CompletedPixel();
132 template <
class TInputImage,
class TOutputImage>
143 typename SpecificColormapType::Pointer colormap = SpecificColormapType::New();
144 this->SetColormap( colormap );
151 typename SpecificColormapType::Pointer colormap = SpecificColormapType::New();
152 this->SetColormap( colormap );
159 typename SpecificColormapType::Pointer colormap = SpecificColormapType::New();
160 this->SetColormap( colormap );
167 typename SpecificColormapType::Pointer colormap = SpecificColormapType::New();
168 this->SetColormap( colormap );
175 typename SpecificColormapType::Pointer colormap = SpecificColormapType::New();
176 this->SetColormap( colormap );
183 typename SpecificColormapType::Pointer colormap = SpecificColormapType::New();
184 this->SetColormap( colormap );
191 typename SpecificColormapType::Pointer colormap = SpecificColormapType::New();
192 this->SetColormap( colormap );
199 typename SpecificColormapType::Pointer colormap = SpecificColormapType::New();
200 this->SetColormap( colormap );
207 typename SpecificColormapType::Pointer colormap = SpecificColormapType::New();
208 this->SetColormap( colormap );
215 typename SpecificColormapType::Pointer colormap = SpecificColormapType::New();
216 this->SetColormap( colormap );
223 typename SpecificColormapType::Pointer colormap = SpecificColormapType::New();
224 this->SetColormap( colormap );
231 typename SpecificColormapType::Pointer colormap = SpecificColormapType::New();
232 this->SetColormap( colormap );
239 typename SpecificColormapType::Pointer colormap = SpecificColormapType::New();
240 this->SetColormap( colormap );
247 typename SpecificColormapType::Pointer colormap = SpecificColormapType::New();
248 this->SetColormap( colormap );
255 template <
class TInputImage,
class TOutputImage>
260 this->Superclass::PrintSelf(os, indent);
261 os << indent <<
"Class Name: " << this->GetNameOfClass( ) << std::endl;
262 if( this->m_Colormap.IsNotNull() )
264 os << indent <<
"Colormap " << this->m_Colormap << std::endl;
268 os << indent <<
"Colormap is NULL " << std::endl;
270 os << indent <<
"Use Input Image Extrema for Scaling " << this->m_UseInputImageExtremaForScaling << std::endl;