itkLabelOverlayImageFilter.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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&);
00129 void operator=(const Self&);
00130
00131 double m_Opacity;
00132 LabelPixelType m_BackgroundValue;
00133
00134 };
00135
00136
00137
00138 }
00139
00140 #ifndef ITK_MANUAL_INSTANTIATION
00141 #include "itkLabelOverlayImageFilter.txx"
00142 #endif
00143
00144 #endif
00145