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

itkScatterMatrixImageFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkScatterMatrixImageFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-03-03 15:09:09 $
00007   Version:   $Revision: 1.4 $
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 __itkScatterMatrixImageFunction_h
00018 #define __itkScatterMatrixImageFunction_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 ScatterMatrixImageFunction :
00045   public ImageFunction< TInputImage, 
00046     vnl_matrix< 
00047       ITK_TYPENAME NumericTraits<typename TInputImage::PixelType::ValueType>::RealType >,
00048     TCoordRep >
00049 {
00050 public:
00051 
00053   typedef ScatterMatrixImageFunction Self;
00054   typedef ImageFunction<TInputImage, 
00055     vnl_matrix< 
00056       ITK_TYPENAME NumericTraits<typename TInputImage::PixelType::ValueType>::RealType >,
00057     TCoordRep >                      Superclass;
00058   typedef SmartPointer<Self>         Pointer;
00059   typedef SmartPointer<const Self>   ConstPointer;
00060 
00062   itkTypeMacro(ScatterMatrixImageFunction, ImageFunction);
00063 
00065   itkNewMacro(Self);
00066 
00068   typedef TInputImage InputImageType;
00069 
00071   typedef typename Superclass::OutputType OutputType;
00072 
00074   typedef typename Superclass::IndexType IndexType;
00075 
00077   typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
00078 
00080   typedef typename Superclass::PointType PointType;
00081 
00083   itkStaticConstMacro(ImageDimension, unsigned int,
00084                       InputImageType::ImageDimension);
00085 
00087   typedef vnl_matrix<
00088     typename NumericTraits<typename InputImageType::PixelType::ValueType>::RealType >
00089                                                                             RealType;
00090 
00092   virtual RealType EvaluateAtIndex( const IndexType& index ) const;
00093 
00095   virtual RealType Evaluate( const PointType& point ) const
00096     { 
00097     IndexType index;
00098     this->ConvertPointToNearestIndex( point, index );
00099     return this->EvaluateAtIndex( index ); 
00100     }
00101   virtual RealType EvaluateAtContinuousIndex( 
00102     const ContinuousIndexType& cindex ) const
00103     { 
00104     IndexType index;
00105     this->ConvertContinuousIndexToNearestIndex( cindex, index );
00106     return this->EvaluateAtIndex( index ); 
00107     }
00109 
00112   itkSetMacro( NeighborhoodRadius, unsigned int );
00113   itkGetConstReferenceMacro( NeighborhoodRadius, unsigned int );
00115 
00116 protected:
00117   ScatterMatrixImageFunction();
00118   ~ScatterMatrixImageFunction(){};
00119   void PrintSelf(std::ostream& os, Indent indent) const;
00120 
00121 private:
00122   ScatterMatrixImageFunction( const Self& ); //purposely not implemented
00123   void operator=( const Self& ); //purposely not implemented
00124 
00125   unsigned int m_NeighborhoodRadius;
00126 
00127 };
00128 
00129 } // end namespace itk
00130 
00131 // Define instantiation macro for this template.
00132 #define ITK_TEMPLATE_ScatterMatrixImageFunction(_, EXPORT, x, y) namespace itk { \
00133   _(2(class EXPORT ScatterMatrixImageFunction< ITK_TEMPLATE_2 x >)) \
00134   namespace Templates { typedef ScatterMatrixImageFunction< ITK_TEMPLATE_2 x > \
00135                                                 ScatterMatrixImageFunction##y; } \
00136   }
00137 
00138 #if ITK_TEMPLATE_EXPLICIT
00139 # include "Templates/itkScatterMatrixImageFunction+-.h"
00140 #endif
00141 
00142 #if ITK_TEMPLATE_TXX
00143 # include "itkScatterMatrixImageFunction.txx"
00144 #endif
00145 
00146 #endif
00147 

Generated at Tue Sep 15 04:50:12 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000