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

itkRayCastInterpolateImageFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003 Program:   Insight Segmentation & Registration Toolkit
00004 Module:    $RCSfile: itkRayCastInterpolateImageFunction.h,v $
00005 Language:  C++
00006 Date:      $Date: 2008-05-13 15:32:36 $
00007 Version:   $Revision: 1.16 $
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 __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 = double>
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 
00114   virtual OutputType Evaluate( const PointType& point ) const;
00115 
00127   virtual OutputType EvaluateAtContinuousIndex( 
00128     const ContinuousIndexType &index ) const;
00129 
00130 
00132   itkSetObjectMacro( Transform, TransformType );
00133 
00135   itkGetObjectMacro( Transform, TransformType );
00136 
00138   itkSetObjectMacro( Interpolator, InterpolatorType );
00139 
00141   itkGetObjectMacro( Interpolator, InterpolatorType );
00142 
00144   itkSetMacro( FocalPoint, InputPointType );
00145 
00147   itkGetMacro( FocalPoint, InputPointType );
00148 
00150   itkSetMacro( Threshold, double );
00151 
00153   itkGetMacro( Threshold, double );
00154 
00158   inline bool IsInsideBuffer( const PointType & ) const
00159     { 
00160     return true;
00161     }
00162   bool IsInsideBuffer( const ContinuousIndexType &  ) const
00163     {
00164     return true;
00165     }
00166   bool IsInsideBuffer( const IndexType &  ) const
00167     { 
00168     return true;
00169     }
00171 
00172 protected:
00173 
00175   RayCastInterpolateImageFunction();
00176 
00178   ~RayCastInterpolateImageFunction(){};
00179 
00181   void PrintSelf(std::ostream& os, Indent indent) const;
00182   
00184   TransformPointer m_Transform;
00185 
00187   InputPointType m_FocalPoint;
00188 
00190   double m_Threshold;
00191 
00193   InterpolatorPointer m_Interpolator;
00194 
00195 
00196 private:
00197   RayCastInterpolateImageFunction( const Self& ); //purposely not implemented
00198   void operator=( const Self& ); //purposely not implemented
00199 
00200 
00201 };
00202 
00203 } // namespace itk
00204 
00205 #ifndef ITK_MANUAL_INSTANTIATION
00206 #include "itkRayCastInterpolateImageFunction.txx"
00207 #endif
00208 
00209 #endif
00210 

Generated at Sat Feb 28 13:22:51 2009 for ITK by doxygen 1.5.6 written by Dimitri van Heesch, © 1997-2000