VMTK
Loading...
Searching...
No Matches
itkAnisotropicDiffusionVesselEnhancementFunction.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Insight Segmentation & Registration Toolkit
4
5 Copyright (c) Insight Software Consortium. All rights reserved.
6 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
7
8 This software is distributed WITHOUT ANY WARRANTY; without even
9 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10 PURPOSE. See the above copyright notices for more information.
11
12=========================================================================*/
13#ifndef __itkAnisotropicDiffusionVesselEnhancementFunction_h
14#define __itkAnisotropicDiffusionVesselEnhancementFunction_h
15
16#include "itkFiniteDifferenceFunction.h"
17#include "vnl/vnl_matrix_fixed.h"
18#include "itkSymmetricSecondRankTensor.h"
19
20namespace itk {
21
38template <class TImageType>
40 : public FiniteDifferenceFunction<TImageType>
41{
42public:
45 typedef FiniteDifferenceFunction<TImageType> Superclass;
46 typedef SmartPointer<Self> Pointer;
47 typedef SmartPointer<const Self> ConstPointer;
48
51
54 FiniteDifferenceFunction );
55
57 itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
58
60 typedef double TimeStepType;
61 typedef typename Superclass::ImageType ImageType;
62 typedef typename Superclass::PixelType PixelType;
63 typedef double ScalarValueType;
64 typedef typename Superclass::RadiusType RadiusType;
65 typedef typename Superclass::NeighborhoodType NeighborhoodType;
66 typedef typename Superclass::FloatOffsetType FloatOffsetType;
67
68
69 typedef itk::Image< SymmetricSecondRankTensor<double,itkGetStaticConstMacro(ImageDimension)>,
70 itkGetStaticConstMacro(ImageDimension)> DiffusionTensorImageType;
71
72
75 typedef ZeroFluxNeumannBoundaryCondition<DiffusionTensorImageType>
77
78
80 typedef ConstNeighborhoodIterator<DiffusionTensorImageType,
83
85 typedef itk::SymmetricSecondRankTensor< double > TensorPixelType;
86
93 {
95 vnl_matrix_fixed<ScalarValueType,
96 itkGetStaticConstMacro(ImageDimension),
97 itkGetStaticConstMacro(ImageDimension)> m_dxy;
98
100 vnl_matrix_fixed<ScalarValueType,
101 itkGetStaticConstMacro(ImageDimension),
102 itkGetStaticConstMacro(ImageDimension)> m_DT_dxy;
103
105 ScalarValueType m_dx[itkGetStaticConstMacro(ImageDimension)];
106
108 };
109
111 virtual PixelType ComputeUpdate(const NeighborhoodType &neighborhood,
112 void *globalData,
113 const FloatOffsetType& = FloatOffsetType(0.0)) ITK_OVERRIDE;
114
117 const NeighborhoodType &neighborhood,
118 const DiffusionTensorNeighborhoodType &neighborhoodTensor,
119 void *globalData,
120 const FloatOffsetType& = FloatOffsetType(0.0));
121
123 virtual TimeStepType ComputeGlobalTimeStep(void *GlobalData) const ITK_OVERRIDE;
124
127 virtual void *GetGlobalDataPointer() const ITK_OVERRIDE
128 {
129 GlobalDataStruct *ans = new GlobalDataStruct();
130 return ans;
131 }
132
133 virtual void ReleaseGlobalDataPointer(void *GlobalData) const ITK_OVERRIDE
134 { delete (GlobalDataStruct *) GlobalData; }
135
140 {
141 m_TimeStep = t;
142 }
143
145 {
146 return m_TimeStep;
147 }
148
149protected:
151
153 void PrintSelf(std::ostream &s, Indent indent) const ITK_OVERRIDE;
154
156 std::slice x_slice[itkGetStaticConstMacro(ImageDimension)];
157
159 ::size_t m_Center;
160
162 ::size_t m_xStride[itkGetStaticConstMacro(ImageDimension)];
163
164private:
165 //purposely not implemented
167 void operator=(const Self&); //purposely not implemented
168
169 TimeStepType m_TimeStep;
170};
171
172} // namespace itk
173
174#if ITK_TEMPLATE_EXPLICIT
175# include "Templates/itkAnisotropicDiffusionVesselEnhancementFunction+-.h"
176#endif
177
178#ifndef ITK_MANUAL_INSTANTIATION
179# include "itkAnisotropicDiffusionVesselEnhancementFunction.txx"
180#endif
181
182#endif
itk::Image< SymmetricSecondRankTensor< double, itkGetStaticConstMacro(ImageDimension)>, itkGetStaticConstMacro(ImageDimension)> DiffusionTensorImageType
itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension)
virtual PixelType ComputeUpdate(const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &=FloatOffsetType(0.0)) ITK_OVERRIDE
ZeroFluxNeumannBoundaryCondition< DiffusionTensorImageType > DefaultBoundaryConditionType
virtual TimeStepType ComputeGlobalTimeStep(void *GlobalData) const ITK_OVERRIDE
void PrintSelf(std::ostream &s, Indent indent) const ITK_OVERRIDE
itkTypeMacro(AnisotropicDiffusionVesselEnhancementFunction, FiniteDifferenceFunction)
ConstNeighborhoodIterator< DiffusionTensorImageType, DefaultBoundaryConditionType > DiffusionTensorNeighborhoodType
vnl_matrix_fixed< ScalarValueType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension)> m_DT_dxy
vnl_matrix_fixed< ScalarValueType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension)> m_dxy