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

itkMeanImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkMeanImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/09/11 19:39:01 $
00007   Version:   $Revision: 1.3 $
00008 
00009   Copyright (c) 2002 Insight 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 __itkMeanImageFilter_h
00018 #define __itkMeanImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkImage.h"
00022 #include "itkNumericTraits.h"
00023 
00024 namespace itk
00025 {
00041 template <class TInputImage, class TOutputImage>
00042 class ITK_EXPORT MeanImageFilter :
00043     public ImageToImageFilter< TInputImage, TOutputImage >
00044 {
00045 public:
00047   itkStaticConstMacro(InputImageDimension, unsigned int,
00048                       TInputImage::ImageDimension);
00049   itkStaticConstMacro(OutputImageDimension, unsigned int,
00050                       TOutputImage::ImageDimension);
00051 
00053   typedef TInputImage InputImageType;
00054   typedef TOutputImage OutputImageType;
00055 
00057   typedef MeanImageFilter Self;
00058   typedef ImageToImageFilter< InputImageType, OutputImageType> Superclass;
00059   typedef SmartPointer<Self> Pointer;
00060   typedef SmartPointer<const Self>  ConstPointer;
00061 
00063   itkNewMacro(Self);
00064 
00066   itkTypeMacro(MeanImageFilter, ImageToImageFilter);
00067   
00069   typedef typename InputImageType::PixelType InputPixelType;
00070   typedef typename OutputImageType::PixelType OutputPixelType;
00071   typedef typename NumericTraits<InputPixelType>::RealType InputRealType;
00072   
00073   typedef typename InputImageType::RegionType InputImageRegionType;
00074   typedef typename OutputImageType::RegionType OutputImageRegionType;
00075 
00076   typedef typename InputImageType::SizeType InputSizeType;
00077 
00079   itkSetMacro(Radius, InputSizeType);
00080 
00082   itkGetConstReferenceMacro(Radius, InputSizeType);
00083   
00090   virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00091 
00092 protected:
00093   MeanImageFilter();
00094   virtual ~MeanImageFilter() {}
00095   void PrintSelf(std::ostream& os, Indent indent) const;
00096 
00107   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00108                             int threadId );
00109 
00110 private:
00111   MeanImageFilter(const Self&); //purposely not implemented
00112   void operator=(const Self&); //purposely not implemented
00113 
00114   InputSizeType m_Radius;
00115 };
00116   
00117 } // end namespace itk
00118 
00119 #ifndef ITK_MANUAL_INSTANTIATION
00120 #include "itkMeanImageFilter.txx"
00121 #endif
00122 
00123 #endif

Generated at Fri May 21 01:15:02 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000