33 #ifndef __vtkvmtkVesselEnhancingDiffusion3DImageFilter_h 34 #define __vtkvmtkVesselEnhancingDiffusion3DImageFilter_h 37 #include "vtkvmtkITKImageToImageFilterFF.h" 38 #include "itkVesselEnhancingDiffusion3DImageFilter.h" 39 #include "vtkvmtkWin32Header.h" 40 #include "vtkVersion.h" 48 vtkSetMacro(SigmaMin,
double);
49 vtkGetMacro(SigmaMin,
double);
51 vtkSetMacro(SigmaMax,
double);
52 vtkGetMacro(SigmaMax,
double);
54 vtkSetMacro(NumberOfSigmaSteps,
int);
55 vtkGetMacro(NumberOfSigmaSteps,
int);
59 this->SigmaStepMethod = EQUISPACED_STEPS;
64 this->SigmaStepMethod = LOGARITHMIC_STEPS;
69 DelegateITKInputMacro(SetTimeStep,value);
74 DelegateITKInputMacro(SetEpsilon,value);
79 DelegateITKInputMacro(SetOmega,value);
84 DelegateITKInputMacro(SetSensitivity,value);
89 DelegateITKInputMacro(SetIterations,value);
94 DelegateITKInputMacro(SetAlpha,value);
99 DelegateITKInputMacro(SetBeta,value);
104 DelegateITKInputMacro(SetGamma,value);
109 DelegateITKInputMacro(SetRecalculateVesselness,value);
116 if (this->NumberOfSigmaSteps < 2)
118 return this->SigmaMin;
121 switch (this->SigmaStepMethod)
123 case EQUISPACED_STEPS:
125 double stepSize = ( SigmaMax - SigmaMin ) / (NumberOfSigmaSteps-1);
126 if (stepSize < 1e-10)
130 sigmaValue = SigmaMin + stepSize * scaleLevel;
133 case LOGARITHMIC_STEPS:
135 double stepSize = ( vcl_log(SigmaMax) - vcl_log(SigmaMin) ) / (NumberOfSigmaSteps-1);
136 if (stepSize < 1e-10)
140 sigmaValue = vcl_exp( vcl_log (SigmaMin) + stepSize * scaleLevel);
144 vtkErrorMacro(
"Error: undefined sigma step method.");
154 std::vector<float> scales;
155 for (
int i=0; i<this->NumberOfSigmaSteps; i++)
157 scales.push_back(this->ComputeSigmaValue(i));
159 this->GetImageFilterPointer()->SetScales(scales);
160 #if (VTK_MAJOR_VERSION <= 5) 161 if (this->GetOutput(0))
163 this->GetOutput(0)->Update();
164 if ( this->GetOutput(0)->GetSource() )
182 typedef itk::VesselEnhancingDiffusion3DImageFilter<Superclass::InputImageType::PixelType>
ImageFilterType;
186 this->SigmaMin = 0.0;
187 this->SigmaMax = 0.0;
188 this->NumberOfSigmaSteps = 0;
189 this->SigmaStepMethod = EQUISPACED_STEPS;
191 this->GetImageFilterPointer()->SetDefaultPars();
void SetSensitivity(double value)
vtkvmtkITKImageToImageFilterFF Superclass
void SetGamma(double value)
itk::VesselEnhancingDiffusion3DImageFilter< Superclass::InputImageType::PixelType > ImageFilterType
double ComputeSigmaValue(int scaleLevel)
~vtkvmtkVesselEnhancingDiffusion3DImageFilter()
void SetOmega(double value)
vtkvmtkVesselEnhancingDiffusion3DImageFilter()
void SetRecalculateVesselness(int value)
void SetEpsilon(double value)
void SetTimeStep(double value)
void SetBeta(double value)
Wrapper class around itk::VesselEnhancingDiffusion3DImageFilter.
void SetSigmaStepMethodToLogarithmic()
void SetSigmaStepMethodToEquispaced()
ImageFilterType * GetImageFilterPointer()
void SetNumberOfIterations(int value)
void SetAlpha(double value)