Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkLabelToRGBImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkLabelToRGBImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007/10/22 12:54:03 $
00007   Version:   $Revision: 1.7 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
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   typedef typename NumericTraits< OutputPixelType >::ValueType OutputPixelValueType;
00068 
00070   itkTypeMacro(LabelToRGBImageFilter, UnaryFunctorImageFilter);
00071 
00073   itkNewMacro(Self);
00074 
00076   itkSetMacro( BackgroundValue, LabelPixelType );
00077   itkGetConstReferenceMacro( BackgroundValue, LabelPixelType );
00079 
00081   itkSetMacro( BackgroundColor, OutputPixelType );
00082   itkGetConstReferenceMacro( BackgroundColor, OutputPixelType );
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&); //purposely not implemented
00097   void operator=(const Self&); //purposely not implemented
00098   
00099   OutputPixelType   m_BackgroundColor;
00100   LabelPixelType    m_BackgroundValue;
00101 };
00102 
00103 
00104   
00105 } // end namespace itk
00106 
00107 #ifndef ITK_MANUAL_INSTANTIATION
00108 #include "itkLabelToRGBImageFilter.txx"
00109 #endif
00110   
00111 #endif
00112 

Generated at Tue Jul 29 21:02:03 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000