itkMaskedMeanImageFilter.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 __itkMaskedMeanImageFilter_h
00018 #define __itkMaskedMeanImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021 #include "itkImage.h"
00022 #include "itkNumericTraits.h"
00023
00024 namespace itk
00025 {
00042 template <class TInputImage, class TOutputImage>
00043 class ITK_EXPORT MaskedMeanImageFilter : public ImageToImageFilter< TInputImage, TOutputImage >
00044 {
00045 public:
00047 typedef TInputImage InputImageType;
00048 typedef TOutputImage OutputImageType;
00049 typedef typename InputImageType::Pointer InputImagePointer;
00050 typedef typename InputImageType::ConstPointer InputImageConstPointer;
00051 typedef typename OutputImageType::Pointer OutputImagePointer;
00052
00054 typedef MaskedMeanImageFilter Self;
00055 typedef ImageToImageFilter< InputImageType, OutputImageType> Superclass;
00056 typedef SmartPointer<Self> Pointer;
00057 typedef SmartPointer<const Self> ConstPointer;
00058
00060 itkNewMacro(Self);
00061
00063 itkTypeMacro( MaskedMeanImageFilter, ImageToImageFilter );
00064
00066 itkSetMacro( MinimumNumberOfUsedVoxels, int );
00067 itkGetMacro( MinimumNumberOfUsedVoxels, int );
00068
00070 typedef typename InputImageType::PixelType InputPixelType;
00071 typedef typename OutputImageType::PixelType OutputPixelType;
00072 typedef typename NumericTraits<InputPixelType>::RealType InputRealType;
00073 typedef typename InputImageType::RegionType InputImageRegionType;
00074 typedef typename OutputImageType::RegionType OutputImageRegionType;
00075 typedef typename InputImageType::SizeType InputSizeType;
00076
00078 itkSetMacro(Radius, InputSizeType);
00079 itkGetConstReferenceMacro(Radius, InputSizeType);
00080
00087 virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00088 protected:
00089 MaskedMeanImageFilter();
00090 virtual ~MaskedMeanImageFilter() {}
00091 void PrintSelf( std::ostream& os, Indent indent) const;
00102 void ThreadedGenerateData( const OutputImageRegionType& outputRegionForThread, int threadId );
00103 private:
00104 MaskedMeanImageFilter(const Self&);
00105 void operator=(const Self&);
00106
00107 InputSizeType m_Radius;
00108 int m_MinimumNumberOfUsedVoxels;
00109
00110 };
00111
00112 }
00113
00114 #ifndef ITK_MANUAL_INSTANTIATION
00115 #include "itkMaskedMeanImageFilter.txx"
00116 #endif
00117
00118 #endif