VMTK
Loading...
Searching...
No Matches
vtkvmtkObjectnessMeasureImageFilter Class Reference

Wraps itk::HessianToObjectnessMeasureImageFilter / itk::MultiScaleHessianBasedMeasureImageFilter. More...

#include <vtkvmtkObjectnessMeasureImageFilter.h>

Inheritance diagram for vtkvmtkObjectnessMeasureImageFilter:
[legend]
Collaboration diagram for vtkvmtkObjectnessMeasureImageFilter:
[legend]

Public Types

enum  { EQUISPACED , LOGARITHMIC }
typedef vtkSimpleImageToImageFilter Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkvmtkObjectnessMeasureImageFilter * NewInstance () const
void SetSigmaStepMethodToEquispaced ()
void SetSigmaStepMethodToLogarithmic ()
virtual vtkImageData * GetScalesOutput ()
virtual double GetSigmaMin ()
virtual void SetSigmaMin (double)
virtual double GetSigmaMax ()
virtual void SetSigmaMax (double)
virtual int GetNumberOfSigmaSteps ()
virtual void SetNumberOfSigmaSteps (int)
virtual int GetSigmaStepMethod ()
virtual void SetSigmaStepMethod (int)
virtual int GetUseScaledObjectness ()
virtual void SetUseScaledObjectness (int)
virtual double GetAlpha ()
virtual void SetAlpha (double)
virtual double GetBeta ()
virtual void SetBeta (double)
virtual double GetGamma ()
virtual void SetGamma (double)
virtual int GetObjectDimension ()
virtual void SetObjectDimension (int)

Static Public Member Functions

static vtkvmtkObjectnessMeasureImageFilter * New ()
static int IsTypeOf (const char *type)
static vtkvmtkObjectnessMeasureImageFilter * SafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBase * NewInstanceInternal () const
 vtkvmtkObjectnessMeasureImageFilter ()
 ~vtkvmtkObjectnessMeasureImageFilter ()
virtual void SimpleExecute (vtkImageData *input, vtkImageData *output) override

Detailed Description

Wraps itk::HessianToObjectnessMeasureImageFilter / itk::MultiScaleHessianBasedMeasureImageFilter.

vtkvmtkObjectnessMeasureImageFilter computes a Frangi-style multiscale, Hessian-eigenvalue-based "objectness" measure that responds to blob-, tube-, or plate-like structures depending on ObjectDimension (0 = blob, 1 = line/vessel, 2 = plate), evaluated at multiple Gaussian scales between SigmaMin and SigmaMax and combined by taking, at each voxel, the response of the scale that maximizes it. It is the more general filter behind the vmtkimageobjectenhancement pype script (vtkvmtkVesselnessMeasureImageFilter specializes the same underlying machinery to ObjectDimension = 1 for vessel enhancement). Like the other ITK wrappers in this module, it is a thin vtkSimpleImageToImageFilter: SimpleExecute() converts the VTK input to a float itk::Image, configures and runs itk::MultiScaleHessianBasedMeasureImageFilter with an itk::HessianToObjectnessMeasureImageFilter as its per-scale measure, and converts the objectness output (and, if requested, the per-voxel scale at which the maximum response was found, via ScalesOutput) back to vtkImageData.

See also
vtkvmtkVesselnessMeasureImageFilter, vtkvmtkSatoVesselnessMeasureImageFilter

Definition at line 51 of file vtkvmtkObjectnessMeasureImageFilter.h.

Member Typedef Documentation

◆ Superclass

typedef vtkSimpleImageToImageFilter vtkvmtkObjectnessMeasureImageFilter::Superclass

Definition at line 55 of file vtkvmtkObjectnessMeasureImageFilter.h.

Member Enumeration Documentation

◆ anonymous enum

Constructor & Destructor Documentation

◆ vtkvmtkObjectnessMeasureImageFilter()

vtkvmtkObjectnessMeasureImageFilter::vtkvmtkObjectnessMeasureImageFilter ( )
protected

Definition at line 36 of file vtkvmtkObjectnessMeasureImageFilter.cxx.

37{
38 this->SigmaMin = 1.0;
39 this->SigmaMax = 1.0;
40 this->NumberOfSigmaSteps = 1;
41 this->SigmaStepMethod = EQUISPACED;
42 this->UseScaledObjectness = 0;
43 this->Alpha = 1.0;
44 this->Beta = 1.0;
45 this->Gamma = 1.0;
46 this->ObjectDimension = 1;
47 this->ScalesOutput = NULL;
48}

◆ ~vtkvmtkObjectnessMeasureImageFilter()

vtkvmtkObjectnessMeasureImageFilter::~vtkvmtkObjectnessMeasureImageFilter ( )
protected

Definition at line 50 of file vtkvmtkObjectnessMeasureImageFilter.cxx.

51{
52 if (this->ScalesOutput)
53 {
54 this->ScalesOutput->Delete();
55 this->ScalesOutput = NULL;
56 }
57}

Member Function Documentation

◆ New()

vtkvmtkObjectnessMeasureImageFilter * vtkvmtkObjectnessMeasureImageFilter::New ( )
static

◆ IsTypeOf()

int vtkvmtkObjectnessMeasureImageFilter::IsTypeOf ( const char * type)
static

◆ IsA()

virtual int vtkvmtkObjectnessMeasureImageFilter::IsA ( const char * type)
virtual

◆ SafeDownCast()

vtkvmtkObjectnessMeasureImageFilter * vtkvmtkObjectnessMeasureImageFilter::SafeDownCast ( vtkObjectBase * o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase * vtkvmtkObjectnessMeasureImageFilter::NewInstanceInternal ( ) const
protectedvirtual

◆ NewInstance()

vtkvmtkObjectnessMeasureImageFilter * vtkvmtkObjectnessMeasureImageFilter::NewInstance ( ) const

◆ GetSigmaMin()

virtual double vtkvmtkObjectnessMeasureImageFilter::GetSigmaMin ( )
virtual

Set/get the smallest Gaussian scale (standard deviation, in physical units) at which the Hessian-based objectness measure is evaluated. Default: 1.0.

◆ SetSigmaMin()

virtual void vtkvmtkObjectnessMeasureImageFilter::SetSigmaMin ( double )
virtual

Set/get the smallest Gaussian scale (standard deviation, in physical units) at which the Hessian-based objectness measure is evaluated. Default: 1.0.

◆ GetSigmaMax()

virtual double vtkvmtkObjectnessMeasureImageFilter::GetSigmaMax ( )
virtual

Set/get the largest Gaussian scale (standard deviation, in physical units) at which the Hessian-based objectness measure is evaluated. Default: 1.0.

◆ SetSigmaMax()

virtual void vtkvmtkObjectnessMeasureImageFilter::SetSigmaMax ( double )
virtual

Set/get the largest Gaussian scale (standard deviation, in physical units) at which the Hessian-based objectness measure is evaluated. Default: 1.0.

◆ GetNumberOfSigmaSteps()

virtual int vtkvmtkObjectnessMeasureImageFilter::GetNumberOfSigmaSteps ( )
virtual

Set/get the number of discrete scales sampled between SigmaMin and SigmaMax (inclusive). Default: 1.

◆ SetNumberOfSigmaSteps()

virtual void vtkvmtkObjectnessMeasureImageFilter::SetNumberOfSigmaSteps ( int )
virtual

Set/get the number of discrete scales sampled between SigmaMin and SigmaMax (inclusive). Default: 1.

◆ GetSigmaStepMethod()

virtual int vtkvmtkObjectnessMeasureImageFilter::GetSigmaStepMethod ( )
virtual

Set/get how intermediate scales between SigmaMin and SigmaMax are distributed: EQUISPACED for linear spacing, LOGARITHMIC for logarithmic spacing. Use SetSigmaStepMethodToEquispaced / SetSigmaStepMethodToLogarithmic for convenience. Default: EQUISPACED.

◆ SetSigmaStepMethod()

virtual void vtkvmtkObjectnessMeasureImageFilter::SetSigmaStepMethod ( int )
virtual

Set/get how intermediate scales between SigmaMin and SigmaMax are distributed: EQUISPACED for linear spacing, LOGARITHMIC for logarithmic spacing. Use SetSigmaStepMethodToEquispaced / SetSigmaStepMethodToLogarithmic for convenience. Default: EQUISPACED.

◆ SetSigmaStepMethodToEquispaced()

void vtkvmtkObjectnessMeasureImageFilter::SetSigmaStepMethodToEquispaced ( )
inline

Convenience method equivalent to SetSigmaStepMethod(EQUISPACED).

Definition at line 97 of file vtkvmtkObjectnessMeasureImageFilter.h.

98 {
100 }

◆ SetSigmaStepMethodToLogarithmic()

void vtkvmtkObjectnessMeasureImageFilter::SetSigmaStepMethodToLogarithmic ( )
inline

Convenience method equivalent to SetSigmaStepMethod(LOGARITHMIC).

Definition at line 105 of file vtkvmtkObjectnessMeasureImageFilter.h.

106 {
108 }

◆ GetUseScaledObjectness()

virtual int vtkvmtkObjectnessMeasureImageFilter::GetUseScaledObjectness ( )
virtual

Toggle scaling of the objectness measure output by the maximum Frobenius norm of the Hessian found over the multiscale analysis, which normalizes the response range. Default: off.

◆ SetUseScaledObjectness()

virtual void vtkvmtkObjectnessMeasureImageFilter::SetUseScaledObjectness ( int )
virtual

Toggle scaling of the objectness measure output by the maximum Frobenius norm of the Hessian found over the multiscale analysis, which normalizes the response range. Default: off.

◆ GetAlpha()

virtual double vtkvmtkObjectnessMeasureImageFilter::GetAlpha ( )
virtual

Set/get the Frangi objectness weight controlling sensitivity to the ratio between the smallest and the geometric mean/other eigenvalues (deviation from a blob), i.e. the alpha parameter of the underlying Hessian-based measure. Default: 1.0.

◆ SetAlpha()

virtual void vtkvmtkObjectnessMeasureImageFilter::SetAlpha ( double )
virtual

Set/get the Frangi objectness weight controlling sensitivity to the ratio between the smallest and the geometric mean/other eigenvalues (deviation from a blob), i.e. the alpha parameter of the underlying Hessian-based measure. Default: 1.0.

◆ GetBeta()

virtual double vtkvmtkObjectnessMeasureImageFilter::GetBeta ( )
virtual

Set/get the Frangi objectness weight controlling sensitivity to deviation from a plate-like structure (the beta parameter of the underlying Hessian-based measure). Default: 1.0.

◆ SetBeta()

virtual void vtkvmtkObjectnessMeasureImageFilter::SetBeta ( double )
virtual

Set/get the Frangi objectness weight controlling sensitivity to deviation from a plate-like structure (the beta parameter of the underlying Hessian-based measure). Default: 1.0.

◆ GetGamma()

virtual double vtkvmtkObjectnessMeasureImageFilter::GetGamma ( )
virtual

Set/get the Frangi objectness weight controlling sensitivity to the overall Hessian magnitude (used to suppress the response in low-contrast/background regions). Default: 1.0.

◆ SetGamma()

virtual void vtkvmtkObjectnessMeasureImageFilter::SetGamma ( double )
virtual

Set/get the Frangi objectness weight controlling sensitivity to the overall Hessian magnitude (used to suppress the response in low-contrast/background regions). Default: 1.0.

◆ GetObjectDimension()

virtual int vtkvmtkObjectnessMeasureImageFilter::GetObjectDimension ( )
virtual

Set/get the dimensionality of the structure to enhance: 0 for blob-like objects, 1 for line/tube-like (vessel) objects, 2 for plate-like objects. Default: 1.

◆ SetObjectDimension()

virtual void vtkvmtkObjectnessMeasureImageFilter::SetObjectDimension ( int )
virtual

Set/get the dimensionality of the structure to enhance: 0 for blob-like objects, 1 for line/tube-like (vessel) objects, 2 for plate-like objects. Default: 1.

◆ GetScalesOutput()

virtual vtkImageData * vtkvmtkObjectnessMeasureImageFilter::GetScalesOutput ( )
virtual

Get the image, with the same extent as the output, holding the Gaussian scale at which the maximum objectness response was found at each voxel. Valid only after Update() has been called.

◆ SimpleExecute()

void vtkvmtkObjectnessMeasureImageFilter::SimpleExecute ( vtkImageData * input,
vtkImageData * output )
overrideprotectedvirtual

Definition at line 59 of file vtkvmtkObjectnessMeasureImageFilter.cxx.

60{
61 typedef itk::Image<float,3> ImageType;
62
63 ImageType::Pointer inImage = ImageType::New();
64
66
67 typedef itk::SymmetricSecondRankTensor<float,3> HessianPixelType;
68 typedef itk::Image<HessianPixelType,3> HessianImageType;
69 typedef itk::HessianToObjectnessMeasureImageFilter<HessianImageType,ImageType> ObjectnessFilterType;
70 typedef itk::MultiScaleHessianBasedMeasureImageFilter<ImageType,HessianImageType,ImageType> MultiScaleFilterType;
71 typedef MultiScaleFilterType::ScalesImageType ScalesImageType;
72
73 ObjectnessFilterType::Pointer objectnessFilter = ObjectnessFilterType::New();
74 objectnessFilter->SetScaleObjectnessMeasure(this->UseScaledObjectness);
75 objectnessFilter->SetBrightObject(true);
76 objectnessFilter->SetObjectDimension(this->ObjectDimension);
77 objectnessFilter->SetAlpha(this->Alpha);
78 objectnessFilter->SetBeta(this->Beta);
79 objectnessFilter->SetGamma(this->Gamma);
80
81 MultiScaleFilterType::Pointer multiScaleFilter = MultiScaleFilterType::New();
82 multiScaleFilter->SetInput(inImage);
83 multiScaleFilter->SetSigmaMinimum(this->SigmaMin);
84 multiScaleFilter->SetSigmaMaximum(this->SigmaMax);
85 multiScaleFilter->SetNumberOfSigmaSteps(this->NumberOfSigmaSteps);
86 if (this->SigmaStepMethod == EQUISPACED)
87 {
88 multiScaleFilter->SetSigmaStepMethodToEquispaced();
89 }
90 else if (this->SigmaStepMethod == LOGARITHMIC)
91 {
92 multiScaleFilter->SetSigmaStepMethodToLogarithmic();
93 }
94 multiScaleFilter->GenerateScalesOutputOn();
95 multiScaleFilter->SetHessianToMeasureFilter(objectnessFilter);
96 multiScaleFilter->Update();
97
98 if (this->ScalesOutput)
99 {
100 this->ScalesOutput->Delete();
101 this->ScalesOutput = NULL;
102 }
103
104 this->ScalesOutput = vtkImageData::New();
105
106 ScalesImageType::Pointer scalesImage = const_cast<ScalesImageType*>(multiScaleFilter->GetScalesOutput());
107
108 vtkvmtkITKFilterUtilities::ITKToVTKImage<ScalesImageType>(scalesImage,this->ScalesOutput);
109
110 vtkvmtkITKFilterUtilities::ITKToVTKImage<ImageType>(multiScaleFilter->GetOutput(),output);
111}
static void ITKToVTKImage(typename TImage::Pointer input, vtkImageData *output)
static void VTKToITKImage(vtkImageData *input, typename TImage::Pointer output)

The documentation for this class was generated from the following files: