Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
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
23namespace itk
24{
31template <class TData, class TCoordRep = double>
32class DiffusionTensor3DInterpolateImageFunction : public ImageFunction<Image<DiffusionTensor3D<TData>, 3>, DiffusionTensor3D<TData>, TCoordRep>
33{
34public:
35 typedef TData TensorType;
37 typedef DiffusionTensor3D<TensorType> TensorDataType;
38 typedef Image<TensorDataType, 3> DiffusionImageType;
39 typedef typename DiffusionImageType::Pointer DiffusionImageTypePointer;
40 typedef Point<double, 3> PointType;
41 typedef SmartPointer<Self> Pointer;
42 typedef SmartPointer<const Self> ConstPointer;
43 typedef typename TensorDataType::RealValueType TensorRealType;
44
45 typedef ImageFunction<Image<DiffusionTensor3D<TData>, 3>, DiffusionTensor3D<TData>, TCoordRep> Superclass;
46
47 typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
48 typedef typename Superclass::IndexType IndexType;
49
52
53 // ///Copied from itkInterpolateImageFunction.h
54
63 TensorDataType Evaluate(const PointType& point) const override
64 {
66
67 this->GetInputImage()->TransformPhysicalPointToContinuousIndex(point, index);
68 return this->EvaluateAtContinuousIndex(index);
69 }
70
82
91
92 TensorDataType EvaluateAtIndex(const IndexType& index) const override { return this->GetInputImage()->GetPixel(index); }
93
94 // void SetDefaultPixelValue( TensorRealType defaultPixelValue ) ;
95 // itkGetMacro( DefaultPixelValue , TensorRealType ) ;
96protected:
98 unsigned long m_LatestTime;
99 // TensorRealType m_DefaultPixelValue ;
100 // TensorDataType m_DefaultPixel ;
101};
102
103} // end namespace itk
104#ifndef ITK_MANUAL_INSTANTIATION
105# include "itkDiffusionTensor3DInterpolateImageFunction.txx"
106#endif
107
108#endif
TensorDataType EvaluateAtContinuousIndex(const ContinuousIndexType &index) const override=0
itkTypeMacro(DiffusionTensor3DInterpolateImageFunction, ImageFunction)
TensorDataType Evaluate(const PointType &point) const override
ImageFunction< Image< DiffusionTensor3D< TData >, 3 >, DiffusionTensor3D< TData >, TCoordRep > Superclass
TensorDataType EvaluateAtIndex(const IndexType &index) const override
Simplified inverse ITK transforms.