itkMaskedMeanImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkMaskedMeanImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date$
00007   Version:   $Revision$
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 __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&); // purposely not implemented
00105   void operator=(const Self&);        // purposely not implemented
00106 
00107   InputSizeType m_Radius;
00108   int           m_MinimumNumberOfUsedVoxels;
00109 
00110 };
00111   
00112 } // end namespace itk
00113 
00114 #ifndef ITK_MANUAL_INSTANTIATION
00115 #include "itkMaskedMeanImageFilter.txx"
00116 #endif
00117 
00118 #endif

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1