ITK  5.2.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | Static Private Attributes | List of all members
itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType > Class Template Reference

#include <itkLevelSetFunctionWithRefitTerm.h>

+ Inheritance diagram for itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >:
+ Collaboration diagram for itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >:

Public Types

using ConstPointer = SmartPointer< const Self >
 
using FloatOffsetType = typename Superclass::FloatOffsetType
 
using GlobalDataStruct = typename Superclass::GlobalDataStruct
 
using ImageType = typename Superclass::ImageType
 
using IndexType = typename ImageType::IndexType
 
using NeighborhoodScalesType = typename Superclass::NeighborhoodScalesType
 
using NeighborhoodSizeValueType = typename NeighborhoodType::SizeValueType
 
using NeighborhoodType = typename Superclass::NeighborhoodType
 
using NodeType = typename SparseImageType::NodeType
 
using NormalVectorType = typename NodeType::NodeDataType
 
using Pointer = SmartPointer< Self >
 
using ScalarValueType = typename Superclass::ScalarValueType
 
using Self = LevelSetFunctionWithRefitTerm
 
using SparseImageType = TSparseImageType
 
using Superclass = LevelSetFunction< TImageType >
 
using TimeStepType = typename Superclass::TimeStepType
 
- Public Types inherited from itk::LevelSetFunction< TImageType >
using ConstPointer = SmartPointer< const Self >
 
using FloatOffsetType = typename Superclass::FloatOffsetType
 
using ImageType = typename Superclass::ImageType
 
using NeighborhoodScalesType = typename Superclass::NeighborhoodScalesType
 
using NeighborhoodType = typename Superclass::NeighborhoodType
 
using PixelRealType = typename Superclass::PixelRealType
 
using PixelType = typename Superclass::PixelType
 
using Pointer = SmartPointer< Self >
 
using RadiusType = typename Superclass::RadiusType
 
using ScalarValueType = PixelType
 
using Self = LevelSetFunction
 
using Superclass = FiniteDifferenceFunction< TImageType >
 
using TimeStepType = double
 
using VectorType = FixedArray< ScalarValueType, Self::ImageDimension >
 
- Public Types inherited from itk::FiniteDifferenceFunction< TImageType >
using ConstPointer = SmartPointer< const Self >
 
using DefaultBoundaryConditionType = ZeroFluxNeumannBoundaryCondition< ImageType >
 
using FloatOffsetType = Vector< float, Self::ImageDimension >
 
using ImageType = TImageType
 
using NeighborhoodScalesType = Vector< PixelRealType, Self::ImageDimension >
 
using NeighborhoodType = ConstNeighborhoodIterator< TImageType, DefaultBoundaryConditionType >
 
using PixelRealType = double
 
using PixelType = typename ImageType::PixelType
 
using Pointer = SmartPointer< Self >
 
using RadiusType = typename ConstNeighborhoodIterator< TImageType >::RadiusType
 
using Self = FiniteDifferenceFunction
 
using Superclass = LightObject
 
using TimeStepType = double
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

TimeStepType ComputeGlobalTimeStep (void *GlobalData) const override
 
virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetNameOfClass () const
 
SparseImageTypeGetSparseTargetImage () const
 
void SetOtherPropagationWeight (const ScalarValueType w)
 
void SetRefitWeight (const ScalarValueType w)
 
void SetSparseTargetImage (SparseImageType *im)
 
- Public Member Functions inherited from itk::LevelSetFunction< TImageType >
virtual VectorType AdvectionField (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
 
virtual ScalarValueType CurvatureSpeed (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=nullptr) const
 
virtual ScalarValueType LaplacianSmoothingSpeed (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
 
virtual ScalarValueType PropagationSpeed (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
 
virtual void SetAdvectionWeight (const ScalarValueType a)
 
ScalarValueType GetAdvectionWeight () const
 
virtual void SetPropagationWeight (const ScalarValueType p)
 
ScalarValueType GetPropagationWeight () const
 
virtual void SetCurvatureWeight (const ScalarValueType c)
 
ScalarValueType GetCurvatureWeight () const
 
void SetLaplacianSmoothingWeight (const ScalarValueType c)
 
ScalarValueType GetLaplacianSmoothingWeight () const
 
void SetEpsilonMagnitude (const ScalarValueType e)
 
ScalarValueType GetEpsilonMagnitude () const
 
PixelType ComputeUpdate (const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &=FloatOffsetType(0.0)) override
 
void * GetGlobalDataPointer () const override
 
virtual void Initialize (const RadiusType &r)
 
void ReleaseGlobalDataPointer (void *GlobalData) const override
 
virtual ScalarValueType ComputeCurvatureTerm (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd=0)
 
virtual ScalarValueType ComputeMeanCurvature (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd=0)
 
virtual ScalarValueType ComputeMinimalCurvature (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd=0)
 
virtual ScalarValueType Compute3DMinimalCurvature (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd=0)
 
void SetUseMinimalCurvature (bool b)
 
bool GetUseMinimalCurvature () const
 
void UseMinimalCurvatureOn ()
 
void UseMinimalCurvatureOff ()
 
- Public Member Functions inherited from itk::FiniteDifferenceFunction< TImageType >
const NeighborhoodScalesType ComputeNeighborhoodScales () const
 
const RadiusTypeGetRadius () const
 
void GetScaleCoefficients (PixelRealType vals[ImageDimension]) const
 
virtual void InitializeIteration ()
 
void SetRadius (const RadiusType &r)
 
void SetScaleCoefficients (PixelRealType vals[ImageDimension])
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 
virtual void Register () const
 
virtual void SetReferenceCount (int)
 
virtual void UnRegister () const noexcept
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::LevelSetFunction< TImageType >
static Pointer New ()
 
static void SetMaximumCurvatureTimeStep (double n)
 
static double GetMaximumCurvatureTimeStep ()
 
static void SetMaximumPropagationTimeStep (double n)
 
static double GetMaximumPropagationTimeStep ()
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Protected Member Functions

ScalarValueType ComputeCurvature (const NeighborhoodType &) const
 
 LevelSetFunctionWithRefitTerm ()
 
virtual ScalarValueType OtherPropagationSpeed (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
ScalarValueType PropagationSpeed (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const override
 
- Protected Member Functions inherited from itk::LevelSetFunction< TImageType >
 LevelSetFunction ()
 
 ~LevelSetFunction () override=default
 
- Protected Member Functions inherited from itk::FiniteDifferenceFunction< TImageType >
 FiniteDifferenceFunction ()
 
 ~FiniteDifferenceFunction () override=default
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Protected Attributes

ScalarValueType m_OtherPropagationWeight
 
ScalarValueType m_RefitWeight
 
- Protected Attributes inherited from itk::LevelSetFunction< TImageType >
std::slice x_slice [Self::ImageDimension]
 
OffsetValueType m_Center { 0 }
 
OffsetValueType m_xStride [Self::ImageDimension]
 
bool m_UseMinimalCurvature { false }
 
ScalarValueType m_EpsilonMagnitude
 
ScalarValueType m_AdvectionWeight
 
ScalarValueType m_PropagationWeight
 
ScalarValueType m_CurvatureWeight
 
ScalarValueType m_LaplacianSmoothingWeight
 
- Protected Attributes inherited from itk::FiniteDifferenceFunction< TImageType >
RadiusType m_Radius
 
PixelRealType m_ScaleCoefficients [ImageDimension]
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Private Attributes

ScalarValueType m_MinVectorNorm
 
SparseImageType::Pointer m_SparseTargetImage
 

Static Private Attributes

static const ScalarValueType m_DimConst
 
static const NeighborhoodSizeValueType m_NumVertex
 

Additional Inherited Members

- Static Public Attributes inherited from itk::LevelSetFunction< TImageType >
static constexpr unsigned int ImageDimension = Superclass::ImageDimension
 
- Static Public Attributes inherited from itk::FiniteDifferenceFunction< TImageType >
static constexpr unsigned int ImageDimension = ImageType::ImageDimension
 
- Static Protected Member Functions inherited from itk::LevelSetFunction< TImageType >
static VectorType InitializeZeroVectorConstant ()
 
- Static Protected Attributes inherited from itk::LevelSetFunction< TImageType >
static double m_WaveDT
 
static double m_DT
 
static VectorType m_ZeroVectorConstant
 

Detailed Description

template<typename TImageType, typename TSparseImageType>
class itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >

This class extends the LevelSetFunction class by adding a grow term based on a target curvature stored in a sparse image.

We extend the LevelSetFunction class to add a refitting term. This refitting term forces the curvature of the level set interface to match a prescribed curvature. The prescribed curvature is provided in a sparse image format. The NodeType for the sparse image should contain the member variables m_Curvature and m_CurvatureFlag. The refitting term is defined as part of the propagation term of the original LevelSetFunction. To this purpose we defined the PropagationSpeed method which computes the refitting term and also adds to this term the value returned by the new virtual OtherPropagationSpeed. Therefore, classes derived from this class MUST NOT overwrite the PropagationSpeed method. Instead classes wishing to define a propagation term must define OtherPropagationSpeed.
IMPORTANT
Subclasses MUST NOT overwrite the PropagationSpeed method. Define OtherPropagationSpeed instead.

Definition at line 52 of file itkLevelSetFunctionWithRefitTerm.h.

Member Typedef Documentation

◆ ConstPointer

template<typename TImageType , typename TSparseImageType >
using itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::ConstPointer = SmartPointer<const Self>

Definition at line 61 of file itkLevelSetFunctionWithRefitTerm.h.

◆ FloatOffsetType

template<typename TImageType , typename TSparseImageType >
using itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::FloatOffsetType = typename Superclass::FloatOffsetType

Definition at line 71 of file itkLevelSetFunctionWithRefitTerm.h.

◆ GlobalDataStruct

template<typename TImageType , typename TSparseImageType >
using itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::GlobalDataStruct = typename Superclass::GlobalDataStruct

Definition at line 73 of file itkLevelSetFunctionWithRefitTerm.h.

◆ ImageType

template<typename TImageType , typename TSparseImageType >
using itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::ImageType = typename Superclass::ImageType

Extract some parameters from the superclass.

Definition at line 70 of file itkLevelSetFunctionWithRefitTerm.h.

◆ IndexType

template<typename TImageType , typename TSparseImageType >
using itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::IndexType = typename ImageType::IndexType

Index type derived from the ImageType.

Definition at line 81 of file itkLevelSetFunctionWithRefitTerm.h.

◆ NeighborhoodScalesType

template<typename TImageType , typename TSparseImageType >
using itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::NeighborhoodScalesType = typename Superclass::NeighborhoodScalesType

Definition at line 75 of file itkLevelSetFunctionWithRefitTerm.h.

◆ NeighborhoodSizeValueType

template<typename TImageType , typename TSparseImageType >
using itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::NeighborhoodSizeValueType = typename NeighborhoodType::SizeValueType

Definition at line 78 of file itkLevelSetFunctionWithRefitTerm.h.

◆ NeighborhoodType

template<typename TImageType , typename TSparseImageType >
using itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::NeighborhoodType = typename Superclass::NeighborhoodType

Definition at line 74 of file itkLevelSetFunctionWithRefitTerm.h.

◆ NodeType

template<typename TImageType , typename TSparseImageType >
using itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::NodeType = typename SparseImageType::NodeType

The node type of the sparse image.

Definition at line 87 of file itkLevelSetFunctionWithRefitTerm.h.

◆ NormalVectorType

template<typename TImageType , typename TSparseImageType >
using itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::NormalVectorType = typename NodeType::NodeDataType

The type for the normal vectors of the level set image.

Definition at line 90 of file itkLevelSetFunctionWithRefitTerm.h.

◆ Pointer

template<typename TImageType , typename TSparseImageType >
using itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::Pointer = SmartPointer<Self>

Definition at line 60 of file itkLevelSetFunctionWithRefitTerm.h.

◆ ScalarValueType

template<typename TImageType , typename TSparseImageType >
using itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::ScalarValueType = typename Superclass::ScalarValueType

Definition at line 72 of file itkLevelSetFunctionWithRefitTerm.h.

◆ Self

template<typename TImageType , typename TSparseImageType >
using itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::Self = LevelSetFunctionWithRefitTerm

Standard class type aliases.

Definition at line 58 of file itkLevelSetFunctionWithRefitTerm.h.

◆ SparseImageType

template<typename TImageType , typename TSparseImageType >
using itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::SparseImageType = TSparseImageType

The sparse image type used for the curvature target.

Definition at line 84 of file itkLevelSetFunctionWithRefitTerm.h.

◆ Superclass

template<typename TImageType , typename TSparseImageType >
using itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::Superclass = LevelSetFunction<TImageType>

Definition at line 59 of file itkLevelSetFunctionWithRefitTerm.h.

◆ TimeStepType

template<typename TImageType , typename TSparseImageType >
using itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::TimeStepType = typename Superclass::TimeStepType

Definition at line 76 of file itkLevelSetFunctionWithRefitTerm.h.

Constructor & Destructor Documentation

◆ LevelSetFunctionWithRefitTerm()

template<typename TImageType , typename TSparseImageType >
itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::LevelSetFunctionWithRefitTerm ( )
protected

Member Function Documentation

◆ ComputeCurvature()

template<typename TImageType , typename TSparseImageType >
ScalarValueType itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::ComputeCurvature ( const NeighborhoodType ) const
protected

Computes the curvature of a level set neighborhood in a way that matches the curvature computation from normal vectors.

◆ ComputeGlobalTimeStep()

template<typename TImageType , typename TSparseImageType >
TimeStepType itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::ComputeGlobalTimeStep ( void *  GlobalData) const
overridevirtual

Computes the time step for an update given a global data structure. This calls the ComputeGlobalTimeStep method defined in LevelSetFunction and then imposes our own restrictions for the refitting term on the returned value.

Reimplemented from itk::LevelSetFunction< TImageType >.

◆ CreateAnother()

template<typename TImageType , typename TSparseImageType >
virtual::itk::LightObject::Pointer itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::CreateAnother ( ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::LevelSetFunction< TImageType >.

◆ GetNameOfClass()

template<typename TImageType , typename TSparseImageType >
virtual const char* itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods)

Reimplemented from itk::LevelSetFunction< TImageType >.

◆ GetSparseTargetImage()

template<typename TImageType , typename TSparseImageType >
SparseImageType* itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::GetSparseTargetImage ( ) const
inline

Returns the sparse image.

Definition at line 117 of file itkLevelSetFunctionWithRefitTerm.h.

◆ New()

template<typename TImageType , typename TSparseImageType >
static Pointer itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::New ( )
static

Standard New macro.

◆ OtherPropagationSpeed()

template<typename TImageType , typename TSparseImageType >
virtual ScalarValueType itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::OtherPropagationSpeed ( const NeighborhoodType ,
const FloatOffsetType ,
GlobalDataStruct = 0 
) const
inlineprotectedvirtual

Called by PropagationSpeed and added on to the refitting term. Function classes derived from this class should define this method for their propagation speed, NOT the actual PropagationSpeed method.

Definition at line 156 of file itkLevelSetFunctionWithRefitTerm.h.

References itk::NumericTraits< T >::ZeroValue().

◆ PrintSelf()

template<typename TImageType , typename TSparseImageType >
void itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::PrintSelf ( std::ostream &  s,
Indent  indent 
) const
overrideprotectedvirtual

Constants used in the time step calculation.

Reimplemented from itk::LevelSetFunction< TImageType >.

◆ PropagationSpeed()

template<typename TImageType , typename TSparseImageType >
ScalarValueType itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::PropagationSpeed ( const NeighborhoodType ,
const FloatOffsetType ,
GlobalDataStruct = 0 
) const
overrideprotected

Defines the virtual function in LevelSetFunction to add the refitting term. This function also calls OtherPropagationSpeed to provide a mechanism for subclasses to define other propagation terms.

◆ SetOtherPropagationWeight()

template<typename TImageType , typename TSparseImageType >
void itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::SetOtherPropagationWeight ( const ScalarValueType  w)
inline

This is the weight for propagation terms (other than refitting) that can be defined by subclasses.

Definition at line 102 of file itkLevelSetFunctionWithRefitTerm.h.

◆ SetRefitWeight()

template<typename TImageType , typename TSparseImageType >
void itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::SetRefitWeight ( const ScalarValueType  w)
inline

Set the relative weight of the refitting term.

Definition at line 94 of file itkLevelSetFunctionWithRefitTerm.h.

◆ SetSparseTargetImage()

template<typename TImageType , typename TSparseImageType >
void itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::SetSparseTargetImage ( SparseImageType im)
inline

Sets the sparse image which has nodes containing the member variable m_Curvature used in refitting.

Definition at line 110 of file itkLevelSetFunctionWithRefitTerm.h.

Member Data Documentation

◆ m_DimConst

template<typename TImageType , typename TSparseImageType >
const ScalarValueType itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::m_DimConst
staticprivate

Definition at line 170 of file itkLevelSetFunctionWithRefitTerm.h.

◆ m_MinVectorNorm

template<typename TImageType , typename TSparseImageType >
ScalarValueType itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::m_MinVectorNorm
private

The minimum vector norm parameter.

Definition at line 166 of file itkLevelSetFunctionWithRefitTerm.h.

◆ m_NumVertex

template<typename TImageType , typename TSparseImageType >
const NeighborhoodSizeValueType itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::m_NumVertex
staticprivate

Constants used in computations.

Definition at line 169 of file itkLevelSetFunctionWithRefitTerm.h.

◆ m_OtherPropagationWeight

template<typename TImageType , typename TSparseImageType >
ScalarValueType itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::m_OtherPropagationWeight
protected

The weight for other scalar propagation terms that can be defined by classes derived from this class.

Definition at line 135 of file itkLevelSetFunctionWithRefitTerm.h.

◆ m_RefitWeight

template<typename TImageType , typename TSparseImageType >
ScalarValueType itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::m_RefitWeight
protected

The weight for the refitting term.

Definition at line 131 of file itkLevelSetFunctionWithRefitTerm.h.

◆ m_SparseTargetImage

template<typename TImageType , typename TSparseImageType >
SparseImageType::Pointer itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >::m_SparseTargetImage
private

The sparse image that contains the target curvature information.

Definition at line 163 of file itkLevelSetFunctionWithRefitTerm.h.


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