00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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:
00052 typedef ScatterMatrixImageFunction Self;
00053 typedef ImageFunction<TInputImage,
00054 vnl_matrix<
00055 ITK_TYPENAME NumericTraits<typename TInputImage::PixelType::ValueType>::RealType >,
00056 TCoordRep > Superclass;
00057 typedef SmartPointer<Self> Pointer;
00058 typedef SmartPointer<const Self> ConstPointer;
00059
00061 itkTypeMacro(ScatterMatrixImageFunction, ImageFunction);
00062
00064 itkNewMacro(Self);
00065
00067 typedef TInputImage InputImageType;
00068
00070 typedef typename Superclass::OutputType OutputType;
00071
00073 typedef typename Superclass::IndexType IndexType;
00074
00076 typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
00077
00079 typedef typename Superclass::PointType PointType;
00080
00082 itkStaticConstMacro(ImageDimension, unsigned int,
00083 InputImageType::ImageDimension);
00084
00086 typedef vnl_matrix<
00087 typename NumericTraits<typename InputImageType::PixelType::ValueType>::RealType >
00088 RealType;
00089
00091 virtual RealType EvaluateAtIndex( const IndexType& index ) const;
00092
00094 virtual RealType Evaluate( const PointType& point ) const
00095 {
00096 IndexType index;
00097 this->ConvertPointToNearestIndex( point, index );
00098 return this->EvaluateAtIndex( index );
00099 }
00100 virtual RealType EvaluateAtContinuousIndex(
00101 const ContinuousIndexType& cindex ) const
00102 {
00103 IndexType index;
00104 this->ConvertContinuousIndexToNearestIndex( cindex, index );
00105 return this->EvaluateAtIndex( index ) ;
00106 }
00107
00110 itkSetMacro( NeighborhoodRadius, unsigned int );
00111 itkGetConstReferenceMacro( NeighborhoodRadius, unsigned int );
00112
00113 protected:
00114 ScatterMatrixImageFunction();
00115 ~ScatterMatrixImageFunction(){};
00116 void PrintSelf(std::ostream& os, Indent indent) const;
00117
00118 private:
00119 ScatterMatrixImageFunction( const Self& );
00120 void operator=( const Self& );
00121
00122 unsigned int m_NeighborhoodRadius;
00123
00124 };
00125
00126 }
00127
00128 #ifndef ITK_MANUAL_INSTANTIATION
00129 #include "itkScatterMatrixImageFunction.txx"
00130 #endif
00131
00132 #endif
00133