Slicer  5.2
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
itkDiffusionTensor3DInterpolateImageFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Diffusion Applications
4  Module: $HeadURL$
5  Language: C++
6  Date: $Date$
7  Version: $Revision$
8 
9  Copyright (c) Brigham and Women's Hospital (BWH) All Rights Reserved.
10 
11  See License.txt or http://www.slicer.org/copyright/copyright.txt for details.
12 
13 ==========================================================================*/
14 #ifndef itkDiffusionTensor3DInterpolateImageFunction_h
15 #define itkDiffusionTensor3DInterpolateImageFunction_h
16 
17 #include <itkObject.h>
18 #include "itkDiffusionTensor3D.h"
19 #include <itkImage.h>
20 #include <itkPoint.h>
21 #include <itkImageFunction.h>
22 
23 namespace itk
24 {
31 template <class TData, class TCoordRep = double>
33  public ImageFunction<Image<DiffusionTensor3D<TData>, 3>,
34  DiffusionTensor3D<TData>,
35  TCoordRep
36  >
37 {
38 public:
39  typedef TData TensorType;
41  typedef DiffusionTensor3D<TensorType> TensorDataType;
42  typedef Image<TensorDataType, 3> DiffusionImageType;
43  typedef typename DiffusionImageType::Pointer DiffusionImageTypePointer;
44  typedef Point<double, 3> PointType;
45  typedef SmartPointer<Self> Pointer;
46  typedef SmartPointer<const Self> ConstPointer;
47  typedef typename TensorDataType::RealValueType TensorRealType;
48 
49  typedef ImageFunction<Image<DiffusionTensor3D<TData>, 3>,
50  DiffusionTensor3D<TData>,
51  TCoordRep
53 
54  typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
55  typedef typename Superclass::IndexType IndexType;
56 
59 
60 // ///Copied from itkInterpolateImageFunction.h
61 
70  TensorDataType Evaluate( const PointType& point ) const override
71  {
72  ContinuousIndexType index;
73 
74  this->GetInputImage()->TransformPhysicalPointToContinuousIndex( point, index );
75  return this->EvaluateAtContinuousIndex( index );
76  }
77 
88  TensorDataType EvaluateAtContinuousIndex( const ContinuousIndexType & index ) const override = 0;
89 
99  TensorDataType EvaluateAtIndex( const IndexType & index ) const override
100  {
101  return this->GetInputImage()->GetPixel( index );
102  }
103 
104 // void SetDefaultPixelValue( TensorRealType defaultPixelValue ) ;
105 // itkGetMacro( DefaultPixelValue , TensorRealType ) ;
106 protected:
108  unsigned long m_LatestTime;
109 // TensorRealType m_DefaultPixelValue ;
110 // TensorDataType m_DefaultPixel ;
111 };
112 
113 } // end namespace itk
114 #ifndef ITK_MANUAL_INSTANTIATION
115 #include "itkDiffusionTensor3DInterpolateImageFunction.txx"
116 #endif
117 
118 #endif
TensorDataType EvaluateAtIndex(const IndexType &index) const override
Simplified inverse ITK transforms.
itkTypeMacro(DiffusionTensor3DInterpolateImageFunction, ImageFunction)
ImageFunction< Image< DiffusionTensor3D< TData >, 3 >, DiffusionTensor3D< TData >, TCoordRep > Superclass
TensorDataType Evaluate(const PointType &point) const override
TensorDataType EvaluateAtContinuousIndex(const ContinuousIndexType &index) const override=0