00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __itkLabelToRGBImageFilter_h
00020 #define __itkLabelToRGBImageFilter_h
00021
00022 #include "itkUnaryFunctorImageFilter.h"
00023 #include "itkLabelToRGBFunctor.h"
00024
00025 namespace itk
00026 {
00027
00043 template <class TLabelImage, typename TOutputImage>
00044 class ITK_EXPORT LabelToRGBImageFilter :
00045 public
00046 UnaryFunctorImageFilter<TLabelImage, TOutputImage,
00047 Functor::LabelToRGBFunctor<
00048 typename TLabelImage::PixelType,
00049 typename TOutputImage::PixelType> >
00050 {
00051 public:
00053 typedef LabelToRGBImageFilter Self;
00054 typedef SmartPointer<Self> Pointer;
00055 typedef SmartPointer<const Self> ConstPointer;
00056
00057 typedef UnaryFunctorImageFilter<TLabelImage, TOutputImage,
00058 Functor::LabelToRGBFunctor<
00059 typename TLabelImage::PixelType,
00060 typename TOutputImage::PixelType> > Superclass;
00061
00062 typedef TOutputImage OutputImageType;
00063 typedef TLabelImage LabelImageType;
00064
00065 typedef typename TOutputImage::PixelType OutputPixelType;
00066 typedef typename TLabelImage::PixelType LabelPixelType;
00067
00069 itkTypeMacro(LabelToRGBImageFilter, UnaryFunctorImageFilter);
00070
00072 itkNewMacro(Self);
00073
00075 itkSetMacro( BackgroundValue, LabelPixelType );
00076 itkGetConstReferenceMacro( BackgroundValue, LabelPixelType );
00078
00080 itkSetMacro( UseBackground, bool );
00081 itkGetConstReferenceMacro( UseBackground, bool );
00082 itkBooleanMacro(UseBackground);
00084
00085 protected:
00086 LabelToRGBImageFilter();
00087 virtual ~LabelToRGBImageFilter() {};
00088
00090 void BeforeThreadedGenerateData(void);
00091
00093 void PrintSelf(std::ostream& os, Indent indent) const;
00094
00095 private:
00096 LabelToRGBImageFilter(const Self&);
00097 void operator=(const Self&);
00098
00099 bool m_UseBackground;
00100 LabelPixelType m_BackgroundValue;
00101 };
00102
00103
00104
00105 }
00106
00107 #ifndef ITK_MANUAL_INSTANTIATION
00108 #include "itkLabelToRGBImageFilter.txx"
00109 #endif
00110
00111 #endif
00112