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

A method for estimation of a surface from a binary volume. More...

#include <sitkAntiAliasBinaryImageFilter.h>

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

Public Types

typedef IntegerPixelIDTypeList PixelIDTypeList
typedef AntiAliasBinaryImageFilter Self
- Public Types inherited from itk::simple::ImageFilter< 1 >
typedef ImageFilter Self
- Public Types inherited from itk::simple::ProcessObject
typedef ProcessObject Self

Public Member Functions

 AntiAliasBinaryImageFilter ()
Image Execute (const Image &image1)
Image Execute (const Image &image1, double maximumRMSError, uint32_t numberOfIterations)
uint32_t GetElapsedIterations () const
 Number of iterations run. More...
double GetMaximumRMSError () const
std::string GetName () const
uint32_t GetNumberOfIterations () const
double GetRMSChange () const
 The Root Mean Square of the levelset upon termination. More...
SelfSetMaximumRMSError (double MaximumRMSError)
SelfSetNumberOfIterations (uint32_t NumberOfIterations)
std::string ToString () const
 ~AntiAliasBinaryImageFilter ()
- Public Member Functions inherited from itk::simple::ImageFilter< 1 >
 ImageFilter ()
virtual ~ImageFilter ()=0
- Public Member Functions inherited from itk::simple::ProcessObject
virtual void Abort ()
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

Private Types

typedef Image(Self::* MemberFunctionType) (const Image &image1)

Private Member Functions

template<class TImageType >
Image ExecuteInternal (const Image &image1)

Private Attributes

uint32_t m_ElapsedIterations
double m_MaximumRMSError
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
uint32_t m_NumberOfIterations
double m_RMSChange


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 void SetGlobalDefaultNumberOfThreads (unsigned int n)
static unsigned int GetGlobalDefaultNumberOfThreads ()
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...
- 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) throw ()
virtual void PreUpdate (itk::ProcessObject *p)
virtual void RemoveITKObserver (EventCommand &e)
- Protected Member Functions inherited from itk::simple::NonCopyable
 NonCopyable ()
- Static Protected Member Functions inherited from itk::simple::ImageFilter< 1 >
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 TImageType >
static Image CastITKToImage (TImageType *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)
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)

Detailed Description

A method for estimation of a surface from a binary volume.

This filter implements a surface-fitting method for estimation of a surface from a binary volume. This process can be used to reduce aliasing artifacts which result in visualization of binary partitioned surfaces.
The binary volume (filter input) is used as a set of constraints in an iterative relaxation process of an estimated ND surface. The surface is described implicitly as the zero level set of a volume $ \phi $ and allowed to deform under curvature flow. A set of constraints is imposed on this movement as follows:

\[ u_{i,j,k}^{n+1} = \left\{ \begin{array}{ll} \mbox{max} (u_{i,j,k}^{n} + \Delta t H_{i,j,k}^{n}, 0) & \mbox{\f$B_{i,j,k} = 1\f$} \\ \mbox{min} (u_{i,j,k}^{n} + \Delta t H_{i,j,k}^{n}, 0) & \mbox{\f$B_{i,j,k} = -1\f$} \end{array}\right. \]

where $ u_{i,j,k}^{n} $ is the value of $ \phi $ at discrete index $ (i,j,k) $ and iteration $ n $ , $ H $ is the gradient magnitude times mean curvature of $ \phi $ , and $ B $ is the binary input volume, with 1 denoting an inside pixel and -1 denoting an outside pixel.
This implementation uses a sparse field level set solver instead of the narrow band implementation described in the reference below, which may introduce some differences in how fast and how accurately (in terms of RMS error) the solution converges.
Whitaker, Ross. "Reducing Aliasing Artifacts In Iso-Surfaces of Binary Volumes" IEEE Volume Visualization and Graphics Symposium, October 2000, pp.23-32.
The MaximumRMSChange parameter is used to determine when the solution has converged. A lower value will result in a tighter-fitting solution, but will require more computations. Too low a value could put the solver into an infinite loop. Values should always be less than 1.0. A value of 0.07 is a good starting estimate.
The MaximumIterations parameter can be used to halt the solution after a specified number of iterations.
The input is an N-dimensional image of any type. It is assumed to be a binary image. The filter will use an isosurface value that is halfway between the min and max values in the image. A signed data type is not necessary for the input.
The filter will output a level set image of real, signed values. The zero crossings of this (N-dimensional) image represent the position of the isosurface value of interest. Values outside the zero level set are negative and values inside the zero level set are positive values.
The output image type you use to instantiate this filter should be a real valued scalar type. In other words: doubles or floats.
The filter is relatively straightforward to use. Tests and examples exist to illustrate. The important thing is to understand the input and output types so you can properly interperet your results.
In the common case, the only parameter that will need to be set is the MaximumRMSChange parameter, which determines when the solver halts.
Wiki Examples:

Definition at line 86 of file sitkAntiAliasBinaryImageFilter.h.

Member Typedef Documentation

typedef Image(Self::* itk::simple::AntiAliasBinaryImageFilter::MemberFunctionType) (const Image &image1)

Setup for member function dispatching

Definition at line 152 of file sitkAntiAliasBinaryImageFilter.h.

Define the pixels types supported by this filter

Definition at line 98 of file sitkAntiAliasBinaryImageFilter.h.

Definition at line 88 of file sitkAntiAliasBinaryImageFilter.h.

Constructor & Destructor Documentation

itk::simple::AntiAliasBinaryImageFilter::AntiAliasBinaryImageFilter ( )

Default Constructor that takes no arguments and initializes default parameters

itk::simple::AntiAliasBinaryImageFilter::~AntiAliasBinaryImageFilter ( )


Member Function Documentation

Image itk::simple::AntiAliasBinaryImageFilter::Execute ( const Image image1)

Execute the filter on the input image

Image itk::simple::AntiAliasBinaryImageFilter::Execute ( const Image image1,
double  maximumRMSError,
uint32_t  numberOfIterations 

Execute the filter on the input image with the given parameters

template<class TImageType >
Image itk::simple::AntiAliasBinaryImageFilter::ExecuteInternal ( const Image image1)
uint32_t itk::simple::AntiAliasBinaryImageFilter::GetElapsedIterations ( ) const

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 123 of file sitkAntiAliasBinaryImageFilter.h.

double itk::simple::AntiAliasBinaryImageFilter::GetMaximumRMSError ( ) const

Definition at line 108 of file sitkAntiAliasBinaryImageFilter.h.

std::string itk::simple::AntiAliasBinaryImageFilter::GetName ( ) const

Name of this class

Implements itk::simple::ProcessObject.

Definition at line 134 of file sitkAntiAliasBinaryImageFilter.h.

uint32_t itk::simple::AntiAliasBinaryImageFilter::GetNumberOfIterations ( ) const

Definition at line 116 of file sitkAntiAliasBinaryImageFilter.h.

double itk::simple::AntiAliasBinaryImageFilter::GetRMSChange ( ) const

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 131 of file sitkAntiAliasBinaryImageFilter.h.

Self& itk::simple::AntiAliasBinaryImageFilter::SetMaximumRMSError ( double  MaximumRMSError)

Definition at line 104 of file sitkAntiAliasBinaryImageFilter.h.

Self& itk::simple::AntiAliasBinaryImageFilter::SetNumberOfIterations ( uint32_t  NumberOfIterations)

Definition at line 112 of file sitkAntiAliasBinaryImageFilter.h.

std::string itk::simple::AntiAliasBinaryImageFilter::ToString ( ) const

Print ourselves out

Reimplemented from itk::simple::ProcessObject.

Friends And Related Function Documentation

Definition at line 157 of file sitkAntiAliasBinaryImageFilter.h.

Member Data Documentation

uint32_t itk::simple::AntiAliasBinaryImageFilter::m_ElapsedIterations

Definition at line 167 of file sitkAntiAliasBinaryImageFilter.h.

double itk::simple::AntiAliasBinaryImageFilter::m_MaximumRMSError

Definition at line 163 of file sitkAntiAliasBinaryImageFilter.h.

nsstd::auto_ptr<detail::MemberFunctionFactory<MemberFunctionType> > itk::simple::AntiAliasBinaryImageFilter::m_MemberFactory

Definition at line 159 of file sitkAntiAliasBinaryImageFilter.h.

uint32_t itk::simple::AntiAliasBinaryImageFilter::m_NumberOfIterations

Definition at line 165 of file sitkAntiAliasBinaryImageFilter.h.

double itk::simple::AntiAliasBinaryImageFilter::m_RMSChange

Definition at line 169 of file sitkAntiAliasBinaryImageFilter.h.

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