00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkMaskNeighborhoodOperatorImageFilter_h
00018 #define __itkMaskNeighborhoodOperatorImageFilter_h
00019
00020 #include "itkNeighborhoodOperatorImageFilter.h"
00021
00022 namespace itk
00023 {
00040 template <class TInputImage, class TMaskImage, class TOutputImage, class TOperatorValueType=ITK_TYPENAME TOutputImage::PixelType>
00041 class ITK_EXPORT MaskNeighborhoodOperatorImageFilter :
00042 public NeighborhoodOperatorImageFilter< TInputImage, TOutputImage, TOperatorValueType >
00043 {
00044 public:
00046 typedef MaskNeighborhoodOperatorImageFilter Self;
00047 typedef NeighborhoodOperatorImageFilter< TInputImage, TOutputImage, TOperatorValueType > Superclass;
00048 typedef SmartPointer<Self> Pointer;
00049 typedef SmartPointer<const Self> ConstPointer;
00050
00052 itkNewMacro(Self);
00053
00055 itkTypeMacro(MaskNeighborhoodOperatorImageFilter, NeighborhoodOperatorImageFilter);
00056
00059 typedef typename TOutputImage::PixelType OutputPixelType;
00060 typedef typename TOutputImage::InternalPixelType OutputInternalPixelType;
00061 typedef typename TInputImage::PixelType InputPixelType;
00062 typedef typename TInputImage::InternalPixelType InputInternalPixelType;
00063 typedef typename TMaskImage::PixelType MaskPixelType;
00064 typedef typename TMaskImage::InternalPixelType MaskInternalPixelType;
00065
00068 itkStaticConstMacro(ImageDimension, unsigned int,
00069 TOutputImage::ImageDimension);
00070
00072 typedef TInputImage InputImageType;
00073 typedef TMaskImage MaskImageType;
00074 typedef TOutputImage OutputImageType;
00075 typedef typename InputImageType::Pointer InputImagePointer;
00076 typedef typename MaskImageType::Pointer MaskImagePointer;
00077
00079 typedef ImageBoundaryCondition<OutputImageType> *
00080 ImageBoundaryConditionPointerType;
00081
00083 typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00084 typedef typename Superclass::OperatorValueType OperatorValueType;
00085
00087 typedef typename Superclass::OutputNeighborhoodType OutputNeighborhoodType;
00088
00092 void SetMaskImage( const TMaskImage* mask);
00093
00097 const TMaskImage* GetMaskImage() const;
00098
00102 itkSetMacro( DefaultValue, OutputPixelType );
00103
00106 itkGetMacro( DefaultValue, OutputPixelType );
00107
00108 protected:
00109 MaskNeighborhoodOperatorImageFilter() : m_DefaultValue( NumericTraits<OutputPixelType>::Zero ){}
00110 virtual ~MaskNeighborhoodOperatorImageFilter() {}
00111 void PrintSelf(std::ostream& os, Indent indent) const;
00112
00118 void GenerateInputRequestedRegion() throw (InvalidRequestedRegionError);
00119
00131 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00132 int threadId );
00133
00134 private:
00135 MaskNeighborhoodOperatorImageFilter(const Self&);
00136 void operator=(const Self&);
00137
00138 OutputPixelType m_DefaultValue;
00139
00140 };
00141
00142 }
00143
00144 #ifndef ITK_MANUAL_INSTANTIATION
00145 #include "itkMaskNeighborhoodOperatorImageFilter.txx"
00146 #endif
00147
00148 #endif
00149