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

itkVectorMeanImageFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkVectorMeanImageFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-03-03 15:11:41 $
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 __itkVectorMeanImageFunction_h
00018 #define __itkVectorMeanImageFunction_h
00019 
00020 #include "itkImageFunction.h"
00021 #include "itkNumericTraits.h"
00022 
00023 namespace itk
00024 {
00025 
00043 template <class TInputImage, class TCoordRep = float >
00044 class ITK_EXPORT VectorMeanImageFunction :
00045   public ImageFunction< TInputImage, 
00046     FixedArray< 
00047       ITK_TYPENAME NumericTraits<typename TInputImage::PixelType::ValueType>::RealType,
00048       ::itk::GetVectorDimension<typename TInputImage::PixelType>::VectorDimension >,
00049     TCoordRep >
00050 {
00051 public:
00052 
00054   typedef VectorMeanImageFunction   Self;
00055   typedef ImageFunction<TInputImage, 
00056     FixedArray< 
00057       ITK_TYPENAME NumericTraits<typename TInputImage::PixelType::ValueType>::RealType,
00058       ::itk::GetVectorDimension<typename TInputImage::PixelType>::VectorDimension >,
00059     TCoordRep >                     Superclass;
00060   typedef SmartPointer<Self>        Pointer;
00061   typedef SmartPointer<const Self>  ConstPointer;
00062 
00064   itkTypeMacro(VectorMeanImageFunction, ImageFunction);
00065 
00067   itkNewMacro(Self);
00068 
00070   typedef TInputImage InputImageType;
00071 
00073   typedef typename Superclass::OutputType OutputType;
00074 
00076   typedef typename Superclass::IndexType IndexType;
00077 
00079   typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
00080 
00082   typedef typename Superclass::PointType PointType;
00083 
00085   itkStaticConstMacro(ImageDimension, unsigned int,
00086                       InputImageType::ImageDimension);
00087 
00089   typedef FixedArray<
00090     typename NumericTraits<typename InputImageType::PixelType::ValueType>::RealType,
00091     ::itk::GetVectorDimension<typename TInputImage::PixelType>::VectorDimension >
00092                                                                             RealType;
00093 
00095   virtual RealType EvaluateAtIndex( const IndexType& index ) const;
00096 
00098   virtual RealType Evaluate( const PointType& point ) const
00099     { 
00100     IndexType index;
00101     this->ConvertPointToNearestIndex( point, index );
00102     return this->EvaluateAtIndex( index ); 
00103     }
00104   virtual RealType EvaluateAtContinuousIndex( 
00105     const ContinuousIndexType& cindex ) const
00106     { 
00107     IndexType index;
00108     this->ConvertContinuousIndexToNearestIndex( cindex, index );
00109     return this->EvaluateAtIndex( index ); 
00110     }
00112 
00115   itkSetMacro( NeighborhoodRadius, unsigned int );
00116   itkGetConstReferenceMacro( NeighborhoodRadius, unsigned int );
00118 
00119 protected:
00120   VectorMeanImageFunction();
00121   ~VectorMeanImageFunction(){};
00122   void PrintSelf(std::ostream& os, Indent indent) const;
00123 
00124 private:
00125   VectorMeanImageFunction( const Self& ); //purposely not implemented
00126   void operator=( const Self& ); //purposely not implemented
00127 
00128   unsigned int m_NeighborhoodRadius;
00129 
00130 };
00131 
00132 } // end namespace itk
00133 
00134 // Define instantiation macro for this template.
00135 #define ITK_TEMPLATE_VectorMeanImageFunction(_, EXPORT, x, y) namespace itk { \
00136   _(2(class EXPORT VectorMeanImageFunction< ITK_TEMPLATE_2 x >)) \
00137   namespace Templates { typedef VectorMeanImageFunction< ITK_TEMPLATE_2 x > \
00138                         VectorMeanImageFunction##y; } \
00139   }
00140 
00141 #if ITK_TEMPLATE_EXPLICIT
00142 # include "Templates/itkVectorMeanImageFunction+-.h"
00143 #endif
00144 
00145 #if ITK_TEMPLATE_TXX
00146 # include "itkVectorMeanImageFunction.txx"
00147 #endif
00148 
00149 #endif
00150 

Generated at Mon Jul 12 2010 20:12:06 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000