Shapeworks Studio  2.1
Shape analysis software suite
List of all members | Public Types | Public Member Functions | Protected Member Functions
itk::PSMImplicitSurfaceImageFilter< TInputImage, TOutputImage > Class Template Reference

This filter generates an antialiased and smoothed signed distance transform from the input label map image. More...

#include <itkPSMImplicitSurfaceImageFilter.h>

+ Inheritance diagram for itk::PSMImplicitSurfaceImageFilter< TInputImage, TOutputImage >:
+ Collaboration diagram for itk::PSMImplicitSurfaceImageFilter< TInputImage, TOutputImage >:

Public Types

typedef PSMImplicitSurfaceImageFilter Self
 
typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass
 
typedef SmartPointer< SelfPointer
 
typedef SmartPointer< const SelfConstPointer
 
typedef TInputImage InputImageType
 
typedef TOutputImage OutputImageType
 
typedef OutputImageType::PixelType PixelType
 

Public Member Functions

 itkNewMacro (Self)
 
 itkTypeMacro (PSMImplicitSurfaceImageFilter, ImageToImageFilter)
 
 itkStaticConstMacro (Dimension, unsigned int, TInputImage::ImageDimension)
 
void GenerateData ()
 
 itkSetMacro (SmoothingSigma, double)
 
 itkGetMacro (SmoothingSigma, double)
 
 itkSetMacro (IsosurfaceValue, PixelType)
 
 itkGetMacro (IsosurfaceValue, PixelType)
 

Protected Member Functions

void PrintSelf (std::ostream &os, Indent indent) const
 

Detailed Description

template<class TInputImage, class TOutputImage>
class itk::PSMImplicitSurfaceImageFilter< TInputImage, TOutputImage >

This filter generates an antialiased and smoothed signed distance transform from the input label map image.

This filter may be used to turn a label map (segmentation) image into a smoothed, signed distance transform image. The distance transform image can be used as an implicit surface representation, where the zero level-set in the image represents the surface. Outputs from this filter are suitable for direct input into any of the PSM shape modeling filters, such as PSMEntropyShapeModelingFilter.

There are two parameters for this filter. The first parameter, IsosurfaceValue, is the value of the level-set in the input volume that you wish to be converted to the zero level-set in the output and, thus, the implicit surface representation. By default, this value is 0.5. The second parameter, SmoothingSigma, is the standard deviation of the Gaussian blurring kernel that is applied to the signed distance transform. By default, this parameter is zero, which indicates no blurring should occur. In general, some smoothing may be desireable to remove artifacts in the distance transform. Size of the blurring kernel is specified in physical units of the input volume.

This filter is templated over the input and output image types. Typical input and output image types are unsigned char for the input (label map) and a float image for the output (signed distance transform).

Author
Josh Cates

Definition at line 60 of file itkPSMImplicitSurfaceImageFilter.h.

Member Typedef Documentation

template<class TInputImage, class TOutputImage>
typedef TInputImage itk::PSMImplicitSurfaceImageFilter< TInputImage, TOutputImage >::InputImageType

Image-type-related typedefs

Definition at line 71 of file itkPSMImplicitSurfaceImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef PSMImplicitSurfaceImageFilter itk::PSMImplicitSurfaceImageFilter< TInputImage, TOutputImage >::Self

Standard class typedefs.

Definition at line 65 of file itkPSMImplicitSurfaceImageFilter.h.

Member Function Documentation

template<class TInputImage , class TOutputImage >
void itk::PSMImplicitSurfaceImageFilter< TInputImage, TOutputImage >::GenerateData ( )

Do the work of batch-processing the input images.

Definition at line 41 of file itkPSMImplicitSurfaceImageFilter.hxx.

42 {
43  // Allocate outputs
44  typename TOutputImage::Pointer output = this->GetOutput();
45  output->SetBufferedRegion( output->GetRequestedRegion() );
46  output->Allocate();
47 
48  // Create a process accumulator for tracking the progress of minipipeline
49  ProgressAccumulator::Pointer progress = ProgressAccumulator::New();
50  progress->SetMiniPipelineFilter(this);
51 
52  // Set up the mini-filter pipeline
53  typename itk::AntiAliasBinaryImageFilter<InputImageType, OutputImageType>::Pointer anti
54  = itk::AntiAliasBinaryImageFilter<InputImageType, OutputImageType>::New();
55  anti->SetInput(this->GetInput());
56  anti->SetNumberOfIterations(100);
57  anti->SetMaximumRMSError(0.0);
58  anti->SetIsoSurfaceValue(m_IsosurfaceValue);
59  progress->RegisterInternalFilter(anti, 1.0f / 3.0f);
60 
61  typename itk::ReinitializeLevelSetImageFilter<OutputImageType>::Pointer filt
62  = itk::ReinitializeLevelSetImageFilter<OutputImageType>::New();
63  filt->SetInput(anti->GetOutput());
64  filt->NarrowBandingOff();
65  filt->SetLevelSetValue(0.0);
66  progress->RegisterInternalFilter(filt, 1.0f / 3.0f);
67 
68  typename itk::DiscreteGaussianImageFilter<OutputImageType, OutputImageType>::Pointer blur
69  = itk::DiscreteGaussianImageFilter<OutputImageType, OutputImageType>::New();
70  blur->SetInput(filt->GetOutput());
71  blur->SetVariance(m_SmoothingSigma * m_SmoothingSigma);
72  blur->SetUseImageSpacingOn();
73  progress->RegisterInternalFilter(blur, 1.0f / 3.0f);
74 
75  // pipe to the output image
76  blur->GraftOutput(this->GetOutput());
77  blur->Update();
78  // also necessary for pipe to output
79  // see itkImageSource for description
80  this->GraftOutput(blur->GetOutput());
81 }
template<class TInputImage, class TOutputImage>
itk::PSMImplicitSurfaceImageFilter< TInputImage, TOutputImage >::itkNewMacro ( Self  )

Method for creation through the object factory.

template<class TInputImage, class TOutputImage>
itk::PSMImplicitSurfaceImageFilter< TInputImage, TOutputImage >::itkSetMacro ( SmoothingSigma  ,
double   
)

Set/Get the Gaussian smoothing standard deviation parameter. The default value is zero, which means no smoothing will take place by default. The value is in given in the units of the output image volume.

template<class TInputImage, class TOutputImage>
itk::PSMImplicitSurfaceImageFilter< TInputImage, TOutputImage >::itkSetMacro ( IsosurfaceValue  ,
PixelType   
)

Get/Set the value for the isosurface in the input image volume. This is the value in the input image that will be converted to the zero level-set in the output volume. The default value is zero.

template<class TInputImage, class TOutputImage>
itk::PSMImplicitSurfaceImageFilter< TInputImage, TOutputImage >::itkStaticConstMacro ( Dimension  ,
unsigned  int,
TInputImage::ImageDimension   
)

Dimensionality of the domain of the particle system.

template<class TInputImage, class TOutputImage>
itk::PSMImplicitSurfaceImageFilter< TInputImage, TOutputImage >::itkTypeMacro ( PSMImplicitSurfaceImageFilter< TInputImage, TOutputImage >  ,
ImageToImageFilter   
)

Run-time type information (and related methods).


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