VMTK
Loading...
Searching...
No Matches
itkVesselEnhancingDiffusion3DImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Insight Segmentation & Registration Toolkit
4
5=========================================================================*/
6#ifndef __itkVesselEnhancingDiffusion3DImageFilter_h
7#define __itkVesselEnhancingDiffusion3DImageFilter_h
8
9#include "itkImageToImageFilter.h"
10#include <vector>
11
12namespace itk
13{
14
60
61
62
63
64template <class PixelType = short int, unsigned int Dimension = 3>
66 public ImageToImageFilter<Image<PixelType, Dimension> ,
67 Image<PixelType, Dimension> >
68{
69
70public:
71
72 typedef float Precision;
73 typedef Image<PixelType, Dimension> ImageType;
74 typedef Image<Precision,Dimension> PrecisionImageType;
75
77 typedef ImageToImageFilter<ImageType,ImageType> Superclass;
78 typedef SmartPointer<Self> Pointer;
79 typedef SmartPointer<const Self> ConstPointer;
80
83
85 itkSetMacro(Iterations, unsigned int);
86 itkSetMacro(RecalculateVesselness, unsigned int);
87
91
94 itkSetMacro(Sensitivity, Precision);
95
96 void SetScales(const std::vector<Precision> scales)
97 {
98 m_Scales = scales;
99 }
100 itkBooleanMacro(DarkObjectLightBackground);
101 itkSetMacro(DarkObjectLightBackground,bool);
103 itkSetMacro(Verbose,bool);
104
105 // some defaults for lowdose example
106 // used in the paper
108 {
109 m_TimeStep = 0.001;
110 m_Iterations = 30;
111 m_RecalculateVesselness = 100;
112 m_Alpha = 0.5;
113 m_Beta = 0.5;
114 m_Gamma = 5.0;
115 m_Epsilon = 0.01;
116 m_Omega = 25.0;
117 m_Sensitivity = 5.0;
118
119 m_Scales.resize(5);
120 m_Scales[0] = 0.300;
121 m_Scales[1] = 0.482;
122 m_Scales[2] = 0.775;
123 m_Scales[3] = 1.245;
124 m_Scales[4] = 2.000;
125
126 m_DarkObjectLightBackground = false;
127 m_Verbose = true;
128 }
129
130protected:
133 void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE;
134 void GenerateData() ITK_OVERRIDE;
135
136private:
137
139 void operator=(const Self&);
140
141 Precision m_TimeStep;
142 unsigned int m_Iterations;
143 unsigned int m_RecalculateVesselness;
144 Precision m_Alpha;
145 Precision m_Beta;
146 Precision m_Gamma;
147 Precision m_Epsilon;
148 Precision m_Omega;
149 Precision m_Sensitivity;
150 std::vector<Precision> m_Scales;
151 bool m_DarkObjectLightBackground;
152 bool m_Verbose;
153
154 unsigned int m_CurrentIteration;
155
156 // current hessian for which we have max vesselresponse
157 typename PrecisionImageType::Pointer m_Dxx;
158 typename PrecisionImageType::Pointer m_Dxy;
159 typename PrecisionImageType::Pointer m_Dxz;
160 typename PrecisionImageType::Pointer m_Dyy;
161 typename PrecisionImageType::Pointer m_Dyz;
162 typename PrecisionImageType::Pointer m_Dzz;
163
164 void VED3DSingleIteration (typename ImageType::Pointer );
165
166 // Calculates maxvessel response of the range
167 // of scales and stores the hessian of each voxel
168 // into the member images m_Dij.
169 void MaxVesselResponse (const typename ImageType::Pointer);
170
171 // calculates diffusion tensor
172 // based on current values of hessian (for which we have
173 // maximum vessel response).
174 void DiffusionTensor();
175
176 inline Precision VesselnessFunction3D ( // sorted magn increasing
177 const Precision, // l1
178 const Precision, // l2
179 const Precision // l3
180 );
181
182
183};
184
185
186} // end namespace itk
187
188#ifndef ITK_MANUAL_INSTANTIATION
189#include "itkVesselEnhancingDiffusion3DImageFilter.txx"
190#endif
191
192#endif
193
itkSetMacro(Iterations, unsigned int)
void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
itkSetMacro(DarkObjectLightBackground, bool)
itkBooleanMacro(DarkObjectLightBackground)
itkSetMacro(RecalculateVesselness, unsigned int)
itkTypeMacro(VesselEnhancingDiffusion3DImageFilter, ImageToImageFilter)