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: 2006/03/29 14:53:40 $
00007   Version:   $Revision: 1.5 $
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 __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);
00052 
00054   typedef TInputImage InputImageType;
00055   typedef TOutputImage OutputImageType;
00056 
00058   typedef MeanImageFilter Self;
00059   typedef ImageToImageFilter< InputImageType, OutputImageType> Superclass;
00060   typedef SmartPointer<Self> Pointer;
00061   typedef SmartPointer<const Self>  ConstPointer;
00062 
00064   itkNewMacro(Self);
00065 
00067   itkTypeMacro(MeanImageFilter, ImageToImageFilter);
00068 
00070   typedef typename InputImageType::PixelType InputPixelType;
00071   typedef typename OutputImageType::PixelType OutputPixelType;
00072   typedef typename NumericTraits<InputPixelType>::RealType InputRealType;
00073 
00074   typedef typename InputImageType::RegionType InputImageRegionType;
00075   typedef typename OutputImageType::RegionType OutputImageRegionType;
00076 
00077   typedef typename InputImageType::SizeType InputSizeType;
00078 
00080   itkSetMacro(Radius, InputSizeType);
00081 
00083   itkGetConstReferenceMacro(Radius, InputSizeType);
00084 
00091   virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00092 
00093 #ifdef ITK_USE_CONCEPT_CHECKING
00094 
00095   itkConceptMacro(InputHasNumericTraitsCheck,
00096                   (Concept::HasNumericTraits<InputPixelType>));
00097 
00099 #endif
00100 
00101 protected:
00102   MeanImageFilter();
00103   virtual ~MeanImageFilter() {}
00104   void PrintSelf(std::ostream& os, Indent indent) const;
00105 
00116   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00117                             int threadId );
00118 
00119 private:
00120   MeanImageFilter(const Self&); //purposely not implemented
00121   void operator=(const Self&); //purposely not implemented
00122 
00123   InputSizeType m_Radius;
00124 };
00125   
00126 } // end namespace itk
00127 
00128 #ifndef ITK_MANUAL_INSTANTIATION
00129 #include "itkMeanImageFilter.txx"
00130 #endif
00131 
00132 #endif
00133 

Generated at Sun Sep 23 13:28:29 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000