SimpleITK  
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
itk::simple::GeodesicActiveContourLevelSetImageFilter Class Reference

Segments structures in images based on a user supplied edge potential map. More...

#include <sitkGeodesicActiveContourLevelSetImageFilter.h>

+ Inheritance diagram for itk::simple::GeodesicActiveContourLevelSetImageFilter:
+ Collaboration diagram for itk::simple::GeodesicActiveContourLevelSetImageFilter:

Detailed Description

Segments structures in images based on a user supplied edge potential map.

IMPORTANT
The SegmentationLevelSetImageFilter class and the GeodesicActiveContourLevelSetFunction class contain additional information necessary to gain full understanding of how to use this filter.
OVERVIEW
This class is a level set method segmentation filter. An initial contour is propagated outwards (or inwards) until it ''sticks'' to the shape boundaries. This is done by using a level set speed function based on a user supplied edge potential map.
INPUTS
This filter requires two inputs. The first input is a initial level set. The initial level set is a real image which contains the initial contour/surface as the zero level set. For example, a signed distance function from the initial contour/surface is typically used. Unlike the simpler ShapeDetectionLevelSetImageFilter the initial contour does not have to lie wholly within the shape to be segmented. The initial contour is allow to overlap the shape boundary. The extra advection term in the update equation behaves like a doublet and attracts the contour to the boundary. This approach for segmentation follows that of Caselles et al (1997).
The second input is the feature image. For this filter, this is the edge potential map. General characteristics of an edge potential map is that it has values close to zero in regions near the edges and values close to one inside the shape itself. Typically, the edge potential map is compute from the image gradient, for example:

\[ g(I) = 1 / ( 1 + | (\nabla * G)(I)| ) \]

\[ g(I) = \exp^{-|(\nabla * G)(I)|} \]

where \( I \) is image intensity and \( (\nabla * G) \) is the derivative of Gaussian operator.

See SegmentationLevelSetImageFilter and SparseFieldLevelSetImageFilter for more information on Inputs.
PARAMETERS
The PropagationScaling parameter can be used to switch from propagation outwards (POSITIVE scaling parameter) versus propagating inwards (NEGATIVE scaling parameter).

This implementation allows the user to set the weights between the propagation, advection and curvature term using methods SetPropagationScaling() , SetAdvectionScaling() , SetCurvatureScaling() . In general, the larger the CurvatureScaling, the smoother the resulting contour. To follow the implementation in Caselles et al paper, set the PropagationScaling to \( c \) (the inflation or balloon force) and AdvectionScaling and CurvatureScaling both to 1.0.

OUTPUTS
The filter outputs a single, scalar, real-valued image. Negative values in the output image represent the inside of the segmented region and positive values in the image represent the outside of the segmented region. The zero crossings of the image correspond to the position of the propagating front.
See SparseFieldLevelSetImageFilter and SegmentationLevelSetImageFilter for more information.
REFERENCES
"Geodesic Active Contours", V. Caselles, R. Kimmel and G. Sapiro. International Journal on Computer Vision, Vol 22, No. 1, pp 61-97, 1997
See also
SegmentationLevelSetImageFilter
GeodesicActiveContourLevelSetFunction
SparseFieldLevelSetImageFilter
itk::simple::GeodesicActiveContourLevelSet for the procedural interface
itk::GeodesicActiveContourLevelSetImageFilter for the Doxygen on the original ITK class.

Definition at line 93 of file sitkGeodesicActiveContourLevelSetImageFilter.h.

Public Types

using PixelIDTypeList = RealPixelIDTypeList
 
using Self = GeodesicActiveContourLevelSetImageFilter
 
- Public Types inherited from itk::simple::ImageFilter
using Self = ImageFilter
 
- Public Types inherited from itk::simple::ProcessObject
using Self = ProcessObject
 

Public Member Functions

Image Execute (const Image &initialImage, const Image &featureImage)
 
Image Execute (Image &&initialImage, const Image &featureImage)
 
 GeodesicActiveContourLevelSetImageFilter ()
 
double GetAdvectionScaling () const
 
double GetCurvatureScaling () const
 
uint32_t GetElapsedIterations () const
 Number of iterations run. More...
 
double GetMaximumRMSError () const
 
std::string GetName () const
 
uint32_t GetNumberOfIterations () const
 
double GetPropagationScaling () const
 
bool GetReverseExpansionDirection () const
 
double GetRMSChange () const
 The Root Mean Square of the levelset upon termination. More...
 
SelfReverseExpansionDirectionOff ()
 
SelfReverseExpansionDirectionOn ()
 
SelfSetAdvectionScaling (double AdvectionScaling)
 
SelfSetCurvatureScaling (double CurvatureScaling)
 
SelfSetMaximumRMSError (double MaximumRMSError)
 
SelfSetNumberOfIterations (uint32_t NumberOfIterations)
 
SelfSetPropagationScaling (double PropagationScaling)
 
SelfSetReverseExpansionDirection (bool ReverseExpansionDirection)
 
std::string ToString () const
 
virtual ~GeodesicActiveContourLevelSetImageFilter ()
 
- Public Member Functions inherited from itk::simple::ImageFilter
 ImageFilter ()
 
virtual ~ImageFilter ()=0
 
- Public Member Functions inherited from itk::simple::ProcessObject
virtual void Abort ()
 
virtual int AddCommand (itk::simple::EventEnum event, const std::function< void()> &func)
 Directly add a callback to observe an event. More...
 
virtual int AddCommand (itk::simple::EventEnum event, itk::simple::Command &cmd)
 Add a Command Object to observer the event. More...
 
virtual float GetProgress () const
 An Active Measurement of the progress of execution. More...
 
virtual bool HasCommand (itk::simple::EventEnum event) const
 Query of this object has any registered commands for event. More...
 
 ProcessObject ()
 
virtual void RemoveAllCommands ()
 Remove all registered commands. More...
 
virtual ~ProcessObject ()
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
virtual bool GetDebug () const
 
virtual void SetDebug (bool debugFlag)
 
virtual void SetNumberOfThreads (unsigned int n)
 
virtual unsigned int GetNumberOfThreads () const
 
virtual void SetNumberOfWorkUnits (unsigned int n)
 
virtual unsigned int GetNumberOfWorkUnits () const
 

Private Types

using MemberFunctionType = Image(Self::*)(const Image *initialImage, const Image *featureImage)
 

Private Member Functions

template<class TImageType >
Image ExecuteInternal (const Image *initialImage, const Image *featureImage)
 

Private Attributes

double m_AdvectionScaling {1.0}
 
double m_CurvatureScaling {1.0}
 
uint32_t m_ElapsedIterations {0}
 
bool m_InPlace {false}
 
double m_MaximumRMSError {0.01}
 
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
 
uint32_t m_NumberOfIterations {1000u}
 
double m_PropagationScaling {1.0}
 
bool m_ReverseExpansionDirection {false}
 
double m_RMSChange {0.0}
 

Friends

struct detail::MemberFunctionAddressor< MemberFunctionType >
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::simple::ProcessObject
static bool GetGlobalDefaultDebug ()
 
static void GlobalDefaultDebugOff ()
 
static void GlobalDefaultDebugOn ()
 
static void SetGlobalDefaultDebug (bool debugFlag)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static void SetGlobalWarningDisplay (bool flag)
 
static bool GetGlobalWarningDisplay ()
 
static double GetGlobalDefaultCoordinateTolerance ()
 Access the global tolerance to determine congruent spaces. More...
 
static void SetGlobalDefaultCoordinateTolerance (double)
 Access the global tolerance to determine congruent spaces. More...
 
static double GetGlobalDefaultDirectionTolerance ()
 Access the global tolerance to determine congruent spaces. More...
 
static void SetGlobalDefaultDirectionTolerance (double)
 Access the global tolerance to determine congruent spaces. More...
 
static bool SetGlobalDefaultThreader (const std::string &threader)
 Set/Get the default threader used for process objects. More...
 
static std::string GetGlobalDefaultThreader ()
 Set/Get the default threader used for process objects. More...
 
static void SetGlobalDefaultNumberOfThreads (unsigned int n)
 
static unsigned int GetGlobalDefaultNumberOfThreads ()
 Set/Get the default threader used for process objects. More...
 
- Protected Member Functions inherited from itk::simple::ImageFilter
void CheckImageMatchingDimension (const Image &image1, const Image &image2, const std::string &image2Name)
 
void CheckImageMatchingPixelType (const Image &image1, const Image &image2, const std::string &image2Name)
 
void CheckImageMatchingSize (const Image &image1, const Image &image2, const std::string &image2Name)
 
- Protected Member Functions inherited from itk::simple::ProcessObject
virtual unsigned long AddITKObserver (const itk::EventObject &, itk::Command *)
 
virtual itk::ProcessObjectGetActiveProcess ()
 
virtual void OnActiveProcessDelete ()
 
virtual void onCommandDelete (const itk::simple::Command *cmd) noexcept
 
virtual void PreUpdate (itk::ProcessObject *p)
 
virtual void RemoveITKObserver (EventCommand &e)
 
- Protected Member Functions inherited from itk::simple::NonCopyable
 NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 
- Static Protected Member Functions inherited from itk::simple::ImageFilter
template<class TImageType >
static void FixNonZeroIndex (TImageType *img)
 
- Static Protected Member Functions inherited from itk::simple::ProcessObject
template<class TImageType >
static TImageType::ConstPointer CastImageToITK (const Image &img)
 
template<class TPixelType , unsigned int VImageDimension, unsigned int VLength, template< typename, unsigned int > class TVector>
static Image CastITKToImage (itk::Image< TVector< TPixelType, VLength >, VImageDimension > *img)
 
template<unsigned int VImageDimension, unsigned int VLength, template< unsigned int > class TVector>
static Image CastITKToImage (itk::Image< TVector< VLength >, VImageDimension > *img)
 
template<class TImageType >
static Image CastITKToImage (TImageType *img)
 
static const itk::EventObjectGetITKEventObject (EventEnum e)
 
template<typename T >
static std::ostream & ToStringHelper (std::ostream &os, const T &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const char &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const signed char &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const unsigned char &v)
 

Member Typedef Documentation

◆ MemberFunctionType

using itk::simple::GeodesicActiveContourLevelSetImageFilter::MemberFunctionType = Image (Self::*)( const Image * initialImage, const Image * featureImage )
private

Setup for member function dispatching

Definition at line 193 of file sitkGeodesicActiveContourLevelSetImageFilter.h.

◆ PixelIDTypeList

Define the pixels types supported by this filter

Definition at line 105 of file sitkGeodesicActiveContourLevelSetImageFilter.h.

◆ Self

Constructor & Destructor Documentation

◆ ~GeodesicActiveContourLevelSetImageFilter()

virtual itk::simple::GeodesicActiveContourLevelSetImageFilter::~GeodesicActiveContourLevelSetImageFilter ( )
virtual

Destructor

◆ GeodesicActiveContourLevelSetImageFilter()

itk::simple::GeodesicActiveContourLevelSetImageFilter::GeodesicActiveContourLevelSetImageFilter ( )

Default Constructor that takes no arguments and initializes default parameters

Member Function Documentation

◆ Execute() [1/2]

Image itk::simple::GeodesicActiveContourLevelSetImageFilter::Execute ( const Image initialImage,
const Image featureImage 
)

◆ Execute() [2/2]

Image itk::simple::GeodesicActiveContourLevelSetImageFilter::Execute ( Image &&  initialImage,
const Image featureImage 
)

Execute the filter on the input image

◆ ExecuteInternal()

template<class TImageType >
Image itk::simple::GeodesicActiveContourLevelSetImageFilter::ExecuteInternal ( const Image initialImage,
const Image featureImage 
)
private

◆ GetAdvectionScaling()

double itk::simple::GeodesicActiveContourLevelSetImageFilter::GetAdvectionScaling ( ) const
inline

◆ GetCurvatureScaling()

double itk::simple::GeodesicActiveContourLevelSetImageFilter::GetCurvatureScaling ( ) const
inline

◆ GetElapsedIterations()

uint32_t itk::simple::GeodesicActiveContourLevelSetImageFilter::GetElapsedIterations ( ) const
inline

Number of iterations run.

This is a measurement. Its value is updated in the Execute methods, so the value will only be valid after an execution.

Definition at line 165 of file sitkGeodesicActiveContourLevelSetImageFilter.h.

◆ GetMaximumRMSError()

double itk::simple::GeodesicActiveContourLevelSetImageFilter::GetMaximumRMSError ( ) const
inline

◆ GetName()

std::string itk::simple::GeodesicActiveContourLevelSetImageFilter::GetName ( ) const
inlinevirtual

Name of this class

Implements itk::simple::ProcessObject.

Definition at line 177 of file sitkGeodesicActiveContourLevelSetImageFilter.h.

◆ GetNumberOfIterations()

uint32_t itk::simple::GeodesicActiveContourLevelSetImageFilter::GetNumberOfIterations ( ) const
inline

◆ GetPropagationScaling()

double itk::simple::GeodesicActiveContourLevelSetImageFilter::GetPropagationScaling ( ) const
inline

◆ GetReverseExpansionDirection()

bool itk::simple::GeodesicActiveContourLevelSetImageFilter::GetReverseExpansionDirection ( ) const
inline

◆ GetRMSChange()

double itk::simple::GeodesicActiveContourLevelSetImageFilter::GetRMSChange ( ) const
inline

The Root Mean Square of the levelset upon termination.

This is a measurement. Its value is updated in the Execute methods, so the value will only be valid after an execution.

Definition at line 173 of file sitkGeodesicActiveContourLevelSetImageFilter.h.

◆ ReverseExpansionDirectionOff()

Self& itk::simple::GeodesicActiveContourLevelSetImageFilter::ReverseExpansionDirectionOff ( )
inline

◆ ReverseExpansionDirectionOn()

Self& itk::simple::GeodesicActiveContourLevelSetImageFilter::ReverseExpansionDirectionOn ( )
inline

Set the value of ReverseExpansionDirection to true or false respectfully.

Definition at line 153 of file sitkGeodesicActiveContourLevelSetImageFilter.h.

◆ SetAdvectionScaling()

Self& itk::simple::GeodesicActiveContourLevelSetImageFilter::SetAdvectionScaling ( double  AdvectionScaling)
inline

◆ SetCurvatureScaling()

Self& itk::simple::GeodesicActiveContourLevelSetImageFilter::SetCurvatureScaling ( double  CurvatureScaling)
inline

◆ SetMaximumRMSError()

Self& itk::simple::GeodesicActiveContourLevelSetImageFilter::SetMaximumRMSError ( double  MaximumRMSError)
inline

◆ SetNumberOfIterations()

Self& itk::simple::GeodesicActiveContourLevelSetImageFilter::SetNumberOfIterations ( uint32_t  NumberOfIterations)
inline

◆ SetPropagationScaling()

Self& itk::simple::GeodesicActiveContourLevelSetImageFilter::SetPropagationScaling ( double  PropagationScaling)
inline

◆ SetReverseExpansionDirection()

Self& itk::simple::GeodesicActiveContourLevelSetImageFilter::SetReverseExpansionDirection ( bool  ReverseExpansionDirection)
inline

◆ ToString()

std::string itk::simple::GeodesicActiveContourLevelSetImageFilter::ToString ( ) const
virtual

Print ourselves out

Reimplemented from itk::simple::ProcessObject.

Friends And Related Function Documentation

◆ detail::MemberFunctionAddressor< MemberFunctionType >

Member Data Documentation

◆ m_AdvectionScaling

double itk::simple::GeodesicActiveContourLevelSetImageFilter::m_AdvectionScaling {1.0}
private

◆ m_CurvatureScaling

double itk::simple::GeodesicActiveContourLevelSetImageFilter::m_CurvatureScaling {1.0}
private

◆ m_ElapsedIterations

uint32_t itk::simple::GeodesicActiveContourLevelSetImageFilter::m_ElapsedIterations {0}
private

◆ m_InPlace

bool itk::simple::GeodesicActiveContourLevelSetImageFilter::m_InPlace {false}
private

◆ m_MaximumRMSError

double itk::simple::GeodesicActiveContourLevelSetImageFilter::m_MaximumRMSError {0.01}
private

◆ m_MemberFactory

std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType> > itk::simple::GeodesicActiveContourLevelSetImageFilter::m_MemberFactory
private

◆ m_NumberOfIterations

uint32_t itk::simple::GeodesicActiveContourLevelSetImageFilter::m_NumberOfIterations {1000u}
private

◆ m_PropagationScaling

double itk::simple::GeodesicActiveContourLevelSetImageFilter::m_PropagationScaling {1.0}
private

◆ m_ReverseExpansionDirection

bool itk::simple::GeodesicActiveContourLevelSetImageFilter::m_ReverseExpansionDirection {false}
private

◆ m_RMSChange

double itk::simple::GeodesicActiveContourLevelSetImageFilter::m_RMSChange {0.0}
private

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