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

Wraps itk::FWHMFeatureImageFilter. More...

#include <vtkvmtkFWHMFeatureImageFilter.h>

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

Public Types

typedef vtkSimpleImageToImageFilter Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkvmtkFWHMFeatureImageFilter * NewInstance () const
virtual int GetUseImageSpacing ()
virtual void SetUseImageSpacing (int)
virtual void UseImageSpacingOn ()
virtual void UseImageSpacingOff ()
virtual int * GetRadius ()
virtual void GetRadius (int data[3])
virtual void SetRadius (int data[])
virtual double GetBackgroundValue ()
virtual void SetBackgroundValue (double)

Static Public Member Functions

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

Protected Member Functions

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

Detailed Description

Wraps itk::FWHMFeatureImageFilter.

vtkvmtkFWHMFeatureImageFilter builds a feature image for full-width-half-maximum (FWHM) level set segmentation. For every pixel of the (internally float-cast, assumed 3D) input, a local maximum is estimated by grayscale dilation with a ball structuring element of radius Radius, the pixel value is compared to half that local maximum (offset by BackgroundValue), and the resulting difference is passed through a sigmoid to produce a smooth output roughly in [-1, 1]: positive inside the FWHM-bright region, negative outside. This is one of the feature image construction methods ("fwhm") offered by the vmtkimagefeatures pype script, typically for use as the FeatureImage/ SpeedImage of a subsequent level set segmentation.

See also
vtkvmtkGeodesicActiveContourLevelSetImageFilter, vtkvmtkCurvesLevelSetImageFilter

Definition at line 45 of file vtkvmtkFWHMFeatureImageFilter.h.

Member Typedef Documentation

◆ Superclass

typedef vtkSimpleImageToImageFilter vtkvmtkFWHMFeatureImageFilter::Superclass

Definition at line 49 of file vtkvmtkFWHMFeatureImageFilter.h.

Constructor & Destructor Documentation

◆ vtkvmtkFWHMFeatureImageFilter()

vtkvmtkFWHMFeatureImageFilter::vtkvmtkFWHMFeatureImageFilter ( )
protected

Definition at line 35 of file vtkvmtkFWHMFeatureImageFilter.cxx.

36{
37 int radius[3];
38 radius[0] = radius[1] = radius[2] = 1;
39 this->SetRadius(radius);
40 this->BackgroundValue = 0.0;
41 this->UseImageSpacing = 1;
42}
virtual void SetRadius(int data[])

◆ ~vtkvmtkFWHMFeatureImageFilter()

vtkvmtkFWHMFeatureImageFilter::~vtkvmtkFWHMFeatureImageFilter ( )
protected

Definition at line 44 of file vtkvmtkFWHMFeatureImageFilter.cxx.

45{
46 if (this->Radius)
47 {
48 delete[] this->Radius;
49 this->Radius = NULL;
50 }
51}

Member Function Documentation

◆ New()

vtkvmtkFWHMFeatureImageFilter * vtkvmtkFWHMFeatureImageFilter::New ( )
static

◆ IsTypeOf()

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

◆ IsA()

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

◆ SafeDownCast()

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

◆ NewInstanceInternal()

virtual vtkObjectBase * vtkvmtkFWHMFeatureImageFilter::NewInstanceInternal ( ) const
protectedvirtual

◆ NewInstance()

vtkvmtkFWHMFeatureImageFilter * vtkvmtkFWHMFeatureImageFilter::NewInstance ( ) const

◆ GetUseImageSpacing()

virtual int vtkvmtkFWHMFeatureImageFilter::GetUseImageSpacing ( )
virtual

Toggle use of the image spacing (as opposed to an isotropic unit spacing) when computing the structuring element used for local-maximum estimation. Default: on.

◆ SetUseImageSpacing()

virtual void vtkvmtkFWHMFeatureImageFilter::SetUseImageSpacing ( int )
virtual

Toggle use of the image spacing (as opposed to an isotropic unit spacing) when computing the structuring element used for local-maximum estimation. Default: on.

◆ UseImageSpacingOn()

virtual void vtkvmtkFWHMFeatureImageFilter::UseImageSpacingOn ( )
virtual

Toggle use of the image spacing (as opposed to an isotropic unit spacing) when computing the structuring element used for local-maximum estimation. Default: on.

◆ UseImageSpacingOff()

virtual void vtkvmtkFWHMFeatureImageFilter::UseImageSpacingOff ( )
virtual

Toggle use of the image spacing (as opposed to an isotropic unit spacing) when computing the structuring element used for local-maximum estimation. Default: on.

◆ GetRadius() [1/2]

virtual int * vtkvmtkFWHMFeatureImageFilter::GetRadius ( )
virtual

Set/get the (x,y,z) radius, in voxels, of the ball structuring element used to estimate the local maximum via grayscale dilation. Default: (1,1,1).

◆ GetRadius() [2/2]

virtual void vtkvmtkFWHMFeatureImageFilter::GetRadius ( int data[3])
virtual

Set/get the (x,y,z) radius, in voxels, of the ball structuring element used to estimate the local maximum via grayscale dilation. Default: (1,1,1).

◆ SetRadius()

virtual void vtkvmtkFWHMFeatureImageFilter::SetRadius ( int data[])
virtual

Set/get the (x,y,z) radius, in voxels, of the ball structuring element used to estimate the local maximum via grayscale dilation. Default: (1,1,1).

◆ GetBackgroundValue()

virtual double vtkvmtkFWHMFeatureImageFilter::GetBackgroundValue ( )
virtual

Set/get the background value subtracted when computing the half-maximum threshold used to build the feature image. Default: 0.0.

◆ SetBackgroundValue()

virtual void vtkvmtkFWHMFeatureImageFilter::SetBackgroundValue ( double )
virtual

Set/get the background value subtracted when computing the half-maximum threshold used to build the feature image. Default: 0.0.

◆ SimpleExecute()

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

Definition at line 53 of file vtkvmtkFWHMFeatureImageFilter.cxx.

54{
55 typedef itk::Image<float,3> ImageType;
56
57 ImageType::Pointer inImage = ImageType::New();
58
60
61 typedef itk::FWHMFeatureImageFilter<ImageType, ImageType> FWHMFeatureFilterType;
62 typedef FWHMFeatureFilterType::StructuringElementRadiusType RadiusType;
63
64 RadiusType radius;
65 radius[0] = this->Radius[0];
66 radius[1] = this->Radius[1];
67 radius[2] = this->Radius[2];
68
69 FWHMFeatureFilterType::Pointer fwhmFeatureFilter = FWHMFeatureFilterType::New();
70 fwhmFeatureFilter->SetInput(inImage);
71 fwhmFeatureFilter->SetRadius(radius);
72 fwhmFeatureFilter->SetUseImageSpacing(this->UseImageSpacing);
73 fwhmFeatureFilter->SetBackgroundValue(this->BackgroundValue);
74 fwhmFeatureFilter->Update();
75
76 vtkvmtkITKFilterUtilities::ITKToVTKImage<ImageType>(fwhmFeatureFilter->GetOutput(),output);
77}
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: