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: 2008-10-16 18:05:25 $
00007   Version:   $Revision: 1.7 $
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 
00021 // First make sure that the configuration is available.
00022 // This line can be removed once the optimized versions
00023 // gets integrated into the main directories.
00024 #include "itkConfigure.h"
00025 
00026 #ifdef ITK_USE_CONSOLIDATED_MORPHOLOGY
00027 #include "itkOptMeanImageFilter.h"
00028 #else
00029 
00030 #include "itkImageToImageFilter.h"
00031 #include "itkImage.h"
00032 #include "itkNumericTraits.h"
00033 
00034 namespace itk
00035 {
00051 template <class TInputImage, class TOutputImage>
00052 class ITK_EXPORT MeanImageFilter :
00053     public ImageToImageFilter< TInputImage, TOutputImage >
00054 {
00055 public:
00057   itkStaticConstMacro(InputImageDimension, unsigned int,
00058                       TInputImage::ImageDimension);
00059   itkStaticConstMacro(OutputImageDimension, unsigned int,
00060                       TOutputImage::ImageDimension);
00062 
00064   typedef TInputImage  InputImageType;
00065   typedef TOutputImage OutputImageType;
00066 
00068   typedef MeanImageFilter                                      Self;
00069   typedef ImageToImageFilter< InputImageType, OutputImageType> Superclass;
00070   typedef SmartPointer<Self>                                   Pointer;
00071   typedef SmartPointer<const Self>                             ConstPointer;
00072 
00074   itkNewMacro(Self);
00075 
00077   itkTypeMacro(MeanImageFilter, ImageToImageFilter);
00078 
00080   typedef typename InputImageType::PixelType               InputPixelType;
00081   typedef typename OutputImageType::PixelType              OutputPixelType;
00082   typedef typename NumericTraits<InputPixelType>::RealType InputRealType;
00083 
00084   typedef typename InputImageType::RegionType  InputImageRegionType;
00085   typedef typename OutputImageType::RegionType OutputImageRegionType;
00086   typedef typename InputImageType::SizeType    InputSizeType;
00087 
00089   itkSetMacro(Radius, InputSizeType);
00090 
00092   itkGetConstReferenceMacro(Radius, InputSizeType);
00093 
00100   virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00101 
00102 #ifdef ITK_USE_CONCEPT_CHECKING
00103 
00104   itkConceptMacro(InputHasNumericTraitsCheck,
00105                   (Concept::HasNumericTraits<InputPixelType>));
00106 
00108 #endif
00109 
00110 protected:
00111   MeanImageFilter();
00112   virtual ~MeanImageFilter() {}
00113   void PrintSelf(std::ostream& os, Indent indent) const;
00114 
00125   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00126                             int threadId );
00127 
00128 private:
00129   MeanImageFilter(const Self&); //purposely not implemented
00130   void operator=(const Self&); //purposely not implemented
00131 
00132   InputSizeType m_Radius;
00133 };
00134   
00135 } // end namespace itk
00136 
00137 #ifndef ITK_MANUAL_INSTANTIATION
00138 #include "itkMeanImageFilter.txx"
00139 #endif
00140 
00141 #endif
00142 
00143 #endif
00144 

Generated at Tue Sep 15 03:55:19 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000