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

Generates the upwind gradient field of fast marching arrival times. More...

#include <sitkFastMarchingUpwindGradientImageFilter.h>

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

Public Types

using PixelIDTypeList = BasicPixelIDTypeList
 
using Self = FastMarchingUpwindGradientImageFilter
 
- Public Types inherited from itk::simple::ImageFilter
using Self = ImageFilter
 
- Public Types inherited from itk::simple::ProcessObject
using Self = ProcessObject
 

Public Member Functions

SelfAddTargetPoint (std::vector< unsigned int > point)
 Add TargetPoints point. More...
 
SelfAddTrialPoint (std::vector< unsigned int > point)
 Add TrialPoints point. More...
 
SelfClearTargetPoints ()
 Remove all TargetPoints points. More...
 
SelfClearTrialPoints ()
 Remove all TrialPoints points. More...
 
Image Execute (const Image &image1)
 
 FastMarchingUpwindGradientImageFilter ()
 
Image GetGradientImage () const
 
std::vector< double > GetInitialTrialValues () const
 
std::string GetName () const
 
double GetNormalizationFactor () const
 
unsigned int GetNumberOfTargets () const
 
double GetTargetOffset () const
 
std::vector< std::vector< unsigned int > > GetTargetPoints () const
 
double GetTargetValue () const
 
std::vector< std::vector< unsigned int > > GetTrialPoints () const
 
SelfSetInitialTrialValues (std::vector< double > InitialTrialValues)
 Set the initial seed values for corresponding trial point. More...
 
SelfSetNormalizationFactor (double NormalizationFactor)
 
SelfSetNumberOfTargets (unsigned int NumberOfTargets)
 
SelfSetTargetOffset (double TargetOffset)
 
SelfSetTargetPoints (std::vector< std::vector< unsigned int > > TargetPoints)
 
SelfSetTrialPoints (std::vector< std::vector< unsigned int > > TrialPoints)
 
std::string ToString () const
 
virtual ~FastMarchingUpwindGradientImageFilter ()
 
- 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 &image1)
 

Private Member Functions

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

Private Attributes

Image m_GradientImage {Image()}
 
std::vector< double > m_InitialTrialValues {std::vector<double>()}
 
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
 
double m_NormalizationFactor {1.0}
 
unsigned int m_NumberOfTargets {0u}
 
double m_TargetOffset {1.0}
 
std::vector< std::vector< unsigned int > > m_TargetPoints {std::vector< std::vector<unsigned int > >()}
 
double m_TargetValue {0.0}
 
std::vector< std::vector< unsigned int > > m_TrialPoints {std::vector< std::vector<unsigned int > >()}
 

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)
 

Detailed Description

Generates the upwind gradient field of fast marching arrival times.

This filter adds some extra functionality to its base class. While the solution T(x) of the Eikonal equation is being generated by the base class with the fast marching method, the filter generates the upwind gradient vectors of T(x), storing them in an image.

Since the Eikonal equation generates the arrival times of a wave traveling at a given speed, the generated gradient vectors can be interpreted as the slowness (1/velocity) vectors of the front (the quantity inside the modulus operator in the Eikonal equation).

Gradient vectors are computed using upwind finite differences, that is, information only propagates from points where the wavefront has already passed. This is consistent with how the fast marching method works.

One more extra feature is the possibility to define a set of Target points where the propagation stops. This can be used to avoid computing the Eikonal solution for the whole domain. The front can be stopped either when one Target point is reached or all Target points are reached. The propagation can stop after a time TargetOffset has passed since the stop condition is met. This way the solution is computed a bit downstream the Target points, so that the level sets of T(x) corresponding to the Target are smooth.

For an alternative implementation, see itk::FastMarchingUpwindGradientImageFilterBase .

Author
Luca Antiga Ph.D. Biomedical Technologies Laboratory, Bioengineering Department, Mario Negri Institute, Italy.
See also
itk::simple::FastMarchingUpwindGradient for the procedural interface
itk::FastMarchingUpwindGradientImageFilter for the Doxygen on the original ITK class.

Definition at line 51 of file sitkFastMarchingUpwindGradientImageFilter.h.

Member Typedef Documentation

◆ MemberFunctionType

Setup for member function dispatching

Definition at line 163 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ PixelIDTypeList

Define the pixels types supported by this filter

Definition at line 63 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ Self

Definition at line 53 of file sitkFastMarchingUpwindGradientImageFilter.h.

Constructor & Destructor Documentation

◆ ~FastMarchingUpwindGradientImageFilter()

virtual itk::simple::FastMarchingUpwindGradientImageFilter::~FastMarchingUpwindGradientImageFilter ( )
virtual

Destructor

◆ FastMarchingUpwindGradientImageFilter()

itk::simple::FastMarchingUpwindGradientImageFilter::FastMarchingUpwindGradientImageFilter ( )

Default Constructor that takes no arguments and initializes default parameters

Member Function Documentation

◆ AddTargetPoint()

Self& itk::simple::FastMarchingUpwindGradientImageFilter::AddTargetPoint ( std::vector< unsigned int >  point)
inline

Add TargetPoints point.

Definition at line 98 of file sitkFastMarchingUpwindGradientImageFilter.h.

References itk::point().

◆ AddTrialPoint()

Self& itk::simple::FastMarchingUpwindGradientImageFilter::AddTrialPoint ( std::vector< unsigned int >  point)
inline

Add TrialPoints point.

Definition at line 74 of file sitkFastMarchingUpwindGradientImageFilter.h.

References itk::point().

◆ ClearTargetPoints()

Self& itk::simple::FastMarchingUpwindGradientImageFilter::ClearTargetPoints ( )
inline

Remove all TargetPoints points.

Definition at line 100 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ ClearTrialPoints()

Self& itk::simple::FastMarchingUpwindGradientImageFilter::ClearTrialPoints ( )
inline

Remove all TrialPoints points.

Definition at line 76 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ Execute()

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

Execute the filter on the input image

◆ ExecuteInternal()

template<class TImageType >
Image itk::simple::FastMarchingUpwindGradientImageFilter::ExecuteInternal ( const Image image1)
private

◆ GetGradientImage()

Image itk::simple::FastMarchingUpwindGradientImageFilter::GetGradientImage ( ) const
inline

Get the gradient image.

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 137 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ GetInitialTrialValues()

std::vector<double> itk::simple::FastMarchingUpwindGradientImageFilter::GetInitialTrialValues ( ) const
inline

Definition at line 130 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ GetName()

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

Name of this class

Implements itk::simple::ProcessObject.

Definition at line 149 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ GetNormalizationFactor()

double itk::simple::FastMarchingUpwindGradientImageFilter::GetNormalizationFactor ( ) const
inline

Set/Get the Normalization Factor for the Speed Image . The values in the Speed Image is divided by this factor. This allows the use of images with integer pixel types to represent the speed.

Definition at line 121 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ GetNumberOfTargets()

unsigned int itk::simple::FastMarchingUpwindGradientImageFilter::GetNumberOfTargets ( ) const
inline

Get the number of targets.

Definition at line 86 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ GetTargetOffset()

double itk::simple::FastMarchingUpwindGradientImageFilter::GetTargetOffset ( ) const
inline

Get the TargetOffset ivar.

Definition at line 111 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ GetTargetPoints()

std::vector< std::vector< unsigned int > > itk::simple::FastMarchingUpwindGradientImageFilter::GetTargetPoints ( ) const
inline

Get the container of Target Points.

Definition at line 96 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ GetTargetValue()

double itk::simple::FastMarchingUpwindGradientImageFilter::GetTargetValue ( ) const
inline

Get the arrival time corresponding to the last reached target. If TargetReachedMode is set to NoTargets, TargetValue contains the last (aka largest) Eikonal solution value generated.

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 145 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ GetTrialPoints()

std::vector< std::vector< unsigned int > > itk::simple::FastMarchingUpwindGradientImageFilter::GetTrialPoints ( ) const
inline

Definition at line 72 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ SetInitialTrialValues()

Self& itk::simple::FastMarchingUpwindGradientImageFilter::SetInitialTrialValues ( std::vector< double >  InitialTrialValues)
inline

Set the initial seed values for corresponding trial point.

Definition at line 126 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ SetNormalizationFactor()

Self& itk::simple::FastMarchingUpwindGradientImageFilter::SetNormalizationFactor ( double  NormalizationFactor)
inline

Set/Get the Normalization Factor for the Speed Image . The values in the Speed Image is divided by this factor. This allows the use of images with integer pixel types to represent the speed.

Definition at line 116 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ SetNumberOfTargets()

Self& itk::simple::FastMarchingUpwindGradientImageFilter::SetNumberOfTargets ( unsigned int  NumberOfTargets)
inline

Definition at line 81 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ SetTargetOffset()

Self& itk::simple::FastMarchingUpwindGradientImageFilter::SetTargetOffset ( double  TargetOffset)
inline

Set how long (in terms of arrival times) after targets are reached the front must stop. This is useful to ensure that the level set of target arrival time is smooth.

Definition at line 106 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ SetTargetPoints()

Self& itk::simple::FastMarchingUpwindGradientImageFilter::SetTargetPoints ( std::vector< std::vector< unsigned int > >  TargetPoints)
inline

Set the container of Target Points. If a target point is reached, the propagation stops. Trial points are represented as a VectorContainer of LevelSetNodes.

Definition at line 91 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ SetTrialPoints()

Self& itk::simple::FastMarchingUpwindGradientImageFilter::SetTrialPoints ( std::vector< std::vector< unsigned int > >  TrialPoints)
inline

Definition at line 68 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ ToString()

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

Print ourselves out

Reimplemented from itk::simple::ProcessObject.

Friends And Related Function Documentation

◆ detail::MemberFunctionAddressor< MemberFunctionType >

Definition at line 167 of file sitkFastMarchingUpwindGradientImageFilter.h.

Member Data Documentation

◆ m_GradientImage

Image itk::simple::FastMarchingUpwindGradientImageFilter::m_GradientImage {Image()}
private

Definition at line 185 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ m_InitialTrialValues

std::vector<double> itk::simple::FastMarchingUpwindGradientImageFilter::m_InitialTrialValues {std::vector<double>()}
private

Definition at line 182 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ m_MemberFactory

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

Definition at line 169 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ m_NormalizationFactor

double itk::simple::FastMarchingUpwindGradientImageFilter::m_NormalizationFactor {1.0}
private

Definition at line 180 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ m_NumberOfTargets

unsigned int itk::simple::FastMarchingUpwindGradientImageFilter::m_NumberOfTargets {0u}
private

Definition at line 174 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ m_TargetOffset

double itk::simple::FastMarchingUpwindGradientImageFilter::m_TargetOffset {1.0}
private

Definition at line 178 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ m_TargetPoints

std::vector< std::vector<unsigned int> > itk::simple::FastMarchingUpwindGradientImageFilter::m_TargetPoints {std::vector< std::vector<unsigned int > >()}
private

Definition at line 176 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ m_TargetValue

double itk::simple::FastMarchingUpwindGradientImageFilter::m_TargetValue {0.0}
private

Definition at line 187 of file sitkFastMarchingUpwindGradientImageFilter.h.

◆ m_TrialPoints

std::vector< std::vector<unsigned int> > itk::simple::FastMarchingUpwindGradientImageFilter::m_TrialPoints {std::vector< std::vector<unsigned int > >()}
private

Definition at line 172 of file sitkFastMarchingUpwindGradientImageFilter.h.


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