00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _itkRayCastInterpolateImageFunction_h
00018 #define _itkRayCastInterpolateImageFunction_h
00019
00020 #include "itkInterpolateImageFunction.h"
00021 #include "itkTransform.h"
00022 #include "itkVector.h"
00023
00024 namespace itk
00025 {
00026
00038 template <class TInputImage, class TCoordRep = float>
00039 class ITK_EXPORT RayCastInterpolateImageFunction :
00040 public InterpolateImageFunction<TInputImage,TCoordRep>
00041 {
00042 public:
00044 typedef RayCastInterpolateImageFunction Self;
00045 typedef InterpolateImageFunction<TInputImage,TCoordRep> Superclass;
00046 typedef SmartPointer<Self> Pointer;
00047 typedef SmartPointer<const Self> ConstPointer;
00048
00050 itkStaticConstMacro(InputImageDimension, unsigned int,
00051 TInputImage::ImageDimension);
00052
00057 typedef Transform<TCoordRep,3,3> TransformType;
00058
00059 typedef typename TransformType::Pointer TransformPointer;
00060 typedef typename TransformType::InputPointType InputPointType;
00061 typedef typename TransformType::OutputPointType OutputPointType;
00062 typedef typename TransformType::ParametersType TransformParametersType;
00063 typedef typename TransformType::JacobianType TransformJacobianType;
00064
00065 typedef typename Superclass::InputPixelType PixelType;
00066
00067 typedef typename TInputImage::SizeType SizeType;
00068
00069 typedef Vector<TCoordRep, 3> DirectionType;
00070
00072 typedef InterpolateImageFunction<TInputImage,TCoordRep> InterpolatorType;
00073
00074 typedef typename InterpolatorType::Pointer InterpolatorPointer;
00075
00076
00078 itkTypeMacro(RayCastInterpolateImageFunction, InterpolateImageFunction);
00079
00081 itkNewMacro(Self);
00082
00084 typedef typename Superclass::OutputType OutputType;
00085
00087 typedef typename Superclass::InputImageType InputImageType;
00088
00090 typedef typename Superclass::RealType RealType;
00091
00093 itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
00094
00096 typedef typename Superclass::PointType PointType;
00097
00099 typedef typename Superclass::IndexType IndexType;
00100
00102 typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
00103
00104
00105
00116 virtual OutputType Evaluate( const PointType& point ) const;
00117
00129 virtual OutputType EvaluateAtContinuousIndex(
00130 const ContinuousIndexType &index ) const;
00131
00132
00134 itkSetObjectMacro( Transform, TransformType );
00136 itkGetObjectMacro( Transform, TransformType );
00137
00139 itkSetObjectMacro( Interpolator, InterpolatorType );
00141 itkGetObjectMacro( Interpolator, InterpolatorType );
00142
00144 itkSetMacro( FocalPoint, InputPointType );
00146 itkGetMacro( FocalPoint, InputPointType );
00147
00149 itkSetMacro( Threshold, double );
00151 itkGetMacro( Threshold, double );
00152
00156 inline bool IsInsideBuffer( const PointType & ) const
00157 {
00158 return true;
00159 }
00160 bool IsInsideBuffer( const ContinuousIndexType & ) const
00161 {
00162 return true;
00163 }
00164 bool IsInsideBuffer( const IndexType & ) const
00165 {
00166 return true;
00167 }
00168
00169 protected:
00170
00172 RayCastInterpolateImageFunction();
00173
00175 ~RayCastInterpolateImageFunction(){};
00176
00178 void PrintSelf(std::ostream& os, Indent indent) const;
00179
00181 TransformPointer m_Transform;
00182
00184 InputPointType m_FocalPoint;
00185
00187 double m_Threshold;
00188
00190 InterpolatorPointer m_Interpolator;
00191
00192
00193 private:
00194 RayCastInterpolateImageFunction( const Self& );
00195 void operator=( const Self& );
00196
00197
00198 };
00199
00200 }
00201
00202 #ifndef ITK_MANUAL_INSTANTIATION
00203 #include "itkRayCastInterpolateImageFunction.txx"
00204 #endif
00205
00206 #endif