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

itkLabelOverlayImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkLabelOverlayImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-02-07 15:58:06 $
00007   Version:   $Revision: 1.14 $
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 #ifndef __itkLabelOverlayImageFilter_h
00018 #define __itkLabelOverlayImageFilter_h
00019 
00020 #include "itkLabelOverlayFunctor.h"
00021 #include "itkBinaryFunctorImageFilter.h"
00022 #include "itkConceptChecking.h"
00023 
00024 namespace itk
00025 {
00048 template <typename  TInputImage, class TLabelImage, typename  TOutputImage>
00049 class ITK_EXPORT LabelOverlayImageFilter :
00050     public
00051      BinaryFunctorImageFilter<TInputImage, TLabelImage, TOutputImage, 
00052        Functor::LabelOverlayFunctor< 
00053           typename TInputImage::PixelType, 
00054           typename TLabelImage::PixelType, 
00055           typename TOutputImage::PixelType>   >
00056 {
00057 public:
00059   typedef LabelOverlayImageFilter  Self;
00060 
00061   typedef BinaryFunctorImageFilter<TInputImage, TLabelImage, TOutputImage, 
00062                         Functor::LabelOverlayFunctor< 
00063                             typename TInputImage::PixelType, 
00064                             typename TLabelImage::PixelType, 
00065                             typename TOutputImage::PixelType>   >  Superclass;
00066 
00067   typedef SmartPointer<Self>        Pointer;
00068   typedef SmartPointer<const Self>  ConstPointer;
00069 
00070   typedef TOutputImage OutputImageType;
00071   typedef TLabelImage  LabelImageType;
00072   typedef TInputImage  InputImageType;
00073 
00074   typedef typename TOutputImage::PixelType OutputPixelType;
00075   typedef typename TLabelImage::PixelType  LabelPixelType;
00076   typedef typename TInputImage::PixelType  InputPixelType;
00077 
00079   itkTypeMacro(LabelOverlayImageFilter, BinaryFunctorImageFilter);
00080 
00082   itkNewMacro(Self);
00083 
00085   void SetLabelImage( const TLabelImage *input);
00086 
00088   const LabelImageType * GetLabelImage() const;
00089 
00093   itkSetMacro( Opacity, double );
00094   itkGetConstReferenceMacro( Opacity, double );
00096 
00098   itkSetMacro( BackgroundValue, LabelPixelType );
00099   itkGetConstReferenceMacro( BackgroundValue, LabelPixelType );
00101 
00102 #ifdef ITK_USE_CONCEPT_CHECKING
00103 
00104   itkConceptMacro(OutputHasPixelTraitsCheck,
00105     (Concept::HasPixelTraits<OutputPixelType>));
00106   itkConceptMacro(OutputPixelShouldHaveValueType,
00107     (Concept::HasValueType<OutputPixelType>));
00108   itkConceptMacro(OutputPixelShouldHaveBracketOperator,
00109     (Concept::BracketOperator<
00110         OutputPixelType, 
00111         unsigned int,
00112         typename OutputPixelType::ValueType>));
00113 
00115 #endif
00116 
00117 protected:
00118   LabelOverlayImageFilter();
00119   virtual ~LabelOverlayImageFilter() {};
00120 
00122   void BeforeThreadedGenerateData(void);
00123 
00125   void PrintSelf(std::ostream& os, Indent indent) const;
00126 
00127 private:
00128   LabelOverlayImageFilter(const Self&); //purposely not implemented
00129   void operator=(const Self&); //purposely not implemented
00130 
00131   double                        m_Opacity;
00132   LabelPixelType                m_BackgroundValue;
00133 
00134 };
00135 
00136 
00137   
00138 } // end namespace itk
00139   
00140 #ifndef ITK_MANUAL_INSTANTIATION
00141 #include "itkLabelOverlayImageFilter.txx"
00142 #endif
00143 
00144 #endif
00145 

Generated at Thu May 28 10:38:44 2009 for ITK by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2000