ITK  5.3.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData > Class Template Referenceabstract

#include <itkScalarRegionBasedLevelSetFunction.h>

+ Inheritance diagram for itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >:
+ Collaboration diagram for itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >:

Public Types

using ConstFeatureIteratorType = ImageRegionConstIterator< FeatureImageType >
 
using ConstImageIteratorType = ImageRegionConstIteratorWithIndex< InputImageType >
 
using ConstPointer = SmartPointer< const Self >
 
using FeatureImageConstPointer = typename FeatureImageType::ConstPointer
 
using FeatureImageIteratorType = ImageRegionIteratorWithIndex< FeatureImageType >
 
using ImageIteratorType = ImageRegionIteratorWithIndex< InputImageType >
 
using ListImageType = Image< ListPixelType, Self::ImageDimension >
 
using ListPixelConstIterator = typename ListPixelType::const_iterator
 
using ListPixelIterator = typename ListPixelType::iterator
 
using ListPixelType = std::list< unsigned int >
 
using Pointer = SmartPointer< Self >
 
using Self = ScalarRegionBasedLevelSetFunction
 
using Superclass = RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >
 
- Public Types inherited from itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >
using ConstPointer = SmartPointer< const Self >
 
using FeatureImageConstPointer = typename FeatureImageType::ConstPointer
 
using FeatureImageType = TFeatureImage
 
using FeatureIndexType = typename FeatureImageType::IndexType
 
using FeatureOffsetType = typename FeatureImageType::OffsetType
 
using FeaturePixelType = typename FeatureImageType::PixelType
 
using FeatureSpacingType = typename FeatureImageType::SpacingType
 
using HeavisideFunctionConstPointer = typename HeavisideFunctionType::ConstPointer
 
using HeavisideFunctionType = HeavisideStepFunctionBase< InputPixelType, InputPixelType >
 
using InputImageConstPointer = typename InputImageType::ConstPointer
 
using InputImagePointer = typename InputImageType::Pointer
 
using InputImageType = TInputImage
 
using InputIndexType = typename InputImageType::IndexType
 
using InputIndexValueType = typename InputImageType::IndexValueType
 
using InputPixelType = typename InputImageType::PixelType
 
using InputPointType = typename InputImageType::PointType
 
using InputRegionType = typename InputImageType::RegionType
 
using InputSizeType = typename InputImageType::SizeType
 
using InputSizeValueType = typename InputImageType::SizeValueType
 
using Pointer = SmartPointer< Self >
 
using ScalarValueType = PixelType
 
using Self = RegionBasedLevelSetFunction
 
using SharedDataPointer = typename SharedDataType::Pointer
 
using SharedDataType = TSharedData
 
using Superclass = FiniteDifferenceFunction< TInputImage >
 
using TimeStepType = double
 
using VectorType = FixedArray< ScalarValueType, Self::ImageDimension >
 
- Public Types inherited from itk::FiniteDifferenceFunction< TInputImage >
using ConstPointer = SmartPointer< const Self >
 
using DefaultBoundaryConditionType = ZeroFluxNeumannBoundaryCondition< ImageType >
 
using FloatOffsetType = Vector< float, Self::ImageDimension >
 
using ImageType = TInputImage
 
using NeighborhoodScalesType = Vector< PixelRealType, Self::ImageDimension >
 
using NeighborhoodType = ConstNeighborhoodIterator< TInputImage, DefaultBoundaryConditionType >
 
using PixelRealType = double
 
using PixelType = typename ImageType::PixelType
 
using Pointer = SmartPointer< Self >
 
using RadiusType = typename ConstNeighborhoodIterator< TInputImage >::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

virtual const char * GetNameOfClass () const
 
void UpdatePixel (const unsigned int idx, NeighborhoodIterator< TInputImage > &iterator, InputPixelType &newValue, bool &status)
 
- Public Member Functions inherited from itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >
virtual VectorType AdvectionField (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
 
virtual void CalculateAdvectionImage ()
 
virtual ScalarValueType ComputeCurvature (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd)
 
TimeStepType ComputeGlobalTimeStep (void *GlobalData) const override
 
PixelType ComputeUpdate (const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &=FloatOffsetType(0.0)) override
 
virtual ScalarValueType CurvatureSpeed (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
 
ScalarValueType GetAdvectionWeight () const
 
virtual const FeatureImageTypeGetFeatureImage () const
 
void * GetGlobalDataPointer () const override
 
virtual void Initialize (const RadiusType &r)
 
virtual ScalarValueType LaplacianSmoothingSpeed (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
 
void ReleaseGlobalDataPointer (void *GlobalData) const override
 
void SetAdvectionWeight (const ScalarValueType &iA)
 
void SetDomainFunction (const HeavisideFunctionType *f)
 
virtual void SetFeatureImage (const FeatureImageType *f)
 
void SetFunctionId (const unsigned int iFid)
 
void SetInitialImage (InputImageType *f)
 
void SetSharedData (SharedDataPointer sharedDataIn)
 
void UpdateSharedData (bool forceUpdate)
 
void SetAreaWeight (const ScalarValueType &nu)
 
ScalarValueType GetAreaWeight () const
 
void SetLambda1 (const ScalarValueType &lambda1)
 
ScalarValueType GetLambda1 () const
 
void SetLambda2 (const ScalarValueType &lambda2)
 
ScalarValueType GetLambda2 () const
 
void SetOverlapPenaltyWeight (const ScalarValueType &gamma)
 
ScalarValueType GetOverlapPenaltyWeight () const
 
virtual void SetCurvatureWeight (const ScalarValueType c)
 
ScalarValueType GetCurvatureWeight () const
 
void SetReinitializationSmoothingWeight (const ScalarValueType c)
 
ScalarValueType GetReinitializationSmoothingWeight () const
 
void SetVolumeMatchingWeight (const ScalarValueType &tau)
 
ScalarValueType GetVolumeMatchingWeight () const
 
void SetVolume (const ScalarValueType &volume)
 
ScalarValueType GetVolume () const
 
- Public Member Functions inherited from itk::FiniteDifferenceFunction< TInputImage >
const NeighborhoodScalesType ComputeNeighborhoodScales () const
 
const RadiusTypeGetRadius () const
 
void GetScaleCoefficients (PixelRealType vals[ImageDimension]) const
 
virtual void InitializeIteration ()
 
void SetRadius (const RadiusType &r)
 
void SetScaleCoefficients (const PixelRealType vals[ImageDimension])
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual Pointer CreateAnother () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 
virtual void Register () const
 
virtual void SetReferenceCount (int)
 
virtual void UnRegister () const noexcept
 

Static Public Attributes

static constexpr unsigned int ImageDimension = TFeatureImage::ImageDimension
 
- Static Public Attributes inherited from itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >
static constexpr unsigned int ImageDimension
 
- Static Public Attributes inherited from itk::FiniteDifferenceFunction< TInputImage >
static constexpr unsigned int ImageDimension
 

Protected Member Functions

ScalarValueType ComputeOverlapParameters (const FeatureIndexType &featIndex, ScalarValueType &product) override
 
 ScalarRegionBasedLevelSetFunction ()
 
virtual void UpdateSharedDataInsideParameters (const unsigned int &iId, const FeaturePixelType &iVal, const ScalarValueType &iChange)=0
 
virtual void UpdateSharedDataOutsideParameters (const unsigned int &iId, const FeaturePixelType &iVal, const ScalarValueType &iChange)=0
 
 ~ScalarRegionBasedLevelSetFunction () override=default
 
- Protected Member Functions inherited from itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >
virtual ScalarValueType ComputeExternalTerm (const FeaturePixelType &iValue, const FeatureIndexType &iIdx)=0
 
ScalarValueType ComputeGlobalTerm (const ScalarValueType &imagePixel, const InputIndexType &inputIndex)
 
void ComputeHessian (const NeighborhoodType &it, GlobalDataStruct *globalData)
 
void ComputeHImage ()
 
virtual ScalarValueType ComputeInternalTerm (const FeaturePixelType &iValue, const FeatureIndexType &iIdx)=0
 
ScalarValueType ComputeLaplacian (GlobalDataStruct *gd)
 
virtual void ComputeParameters ()=0
 
ScalarValueType ComputeVolumeRegularizationTerm ()
 
 RegionBasedLevelSetFunction ()
 
virtual void UpdateSharedDataParameters ()=0
 
 ~RegionBasedLevelSetFunction () override=default
 
- Protected Member Functions inherited from itk::FiniteDifferenceFunction< TInputImage >
 FiniteDifferenceFunction ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~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 ()
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 
- Static Protected Member Functions inherited from itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >
static VectorType InitializeZeroVectorConstant ()
 
- Protected Attributes inherited from itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >
ScalarValueType m_AdvectionWeight
 
ScalarValueType m_AreaWeight
 
OffsetValueType m_Center
 
ScalarValueType m_CurvatureWeight
 
HeavisideFunctionConstPointer m_DomainFunction
 
FeatureImageConstPointer m_FeatureImage
 
unsigned int m_FunctionId
 
InputImageConstPointer m_InitialImage
 
double m_InvSpacing [Self::ImageDimension]
 
ScalarValueType m_Lambda1
 
ScalarValueType m_Lambda2
 
ScalarValueType m_OverlapPenaltyWeight
 
ScalarValueType m_ReinitializationSmoothingWeight
 
SharedDataPointer m_SharedData
 
bool m_UpdateC
 
ScalarValueType m_Volume
 
ScalarValueType m_VolumeMatchingWeight
 
OffsetValueType m_xStride [Self::ImageDimension]
 
std::slice x_slice [Self::ImageDimension]
 
- Protected Attributes inherited from itk::FiniteDifferenceFunction< TInputImage >
RadiusType m_Radius
 
PixelRealType m_ScaleCoefficients [ImageDimension]
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 
- Static Protected Attributes inherited from itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >
static double m_DT
 
static double m_WaveDT
 
static VectorType m_ZeroVectorConstant
 

Detailed Description

template<typename TInputImage, typename TFeatureImage, typename TSharedData>
class itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >

LevelSet function that computes a speed image based on regional integrals.

This class implements a level set function that computes the speed image by integrating values on the image domain. NOTE: The convention followed is inside of the level-set function is negative and outside is positive.

Based on the paper:

   "An active contour model without edges"
    T. Chan and L. Vese.
    In Scale-Space Theories in Computer Vision, pages 141-151, 1999.
Author
Mosaliganti K., Smith B., Gelas A., Gouaillard A., Megason S.

This code was taken from the Insight Journal paper:

"Cell Tracking using Coupled Active Surfaces for Nuclei and Membranes"
https://www.insight-journal.org/browse/publication/642
https://hdl.handle.net/10380/3055

That is based on the papers:

"Level Set Segmentation: Active Contours without edge"
https://www.insight-journal.org/browse/publication/322
https://hdl.handle.net/1926/1532

and

"Level set segmentation using coupled active surfaces"
https://www.insight-journal.org/browse/publication/323
https://hdl.handle.net/1926/1533

Definition at line 66 of file itkScalarRegionBasedLevelSetFunction.h.

Member Typedef Documentation

◆ ConstFeatureIteratorType

template<typename TInputImage , typename TFeatureImage , typename TSharedData >
using itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::ConstFeatureIteratorType = ImageRegionConstIterator<FeatureImageType>

Definition at line 116 of file itkScalarRegionBasedLevelSetFunction.h.

◆ ConstImageIteratorType

template<typename TInputImage , typename TFeatureImage , typename TSharedData >
using itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::ConstImageIteratorType = ImageRegionConstIteratorWithIndex<InputImageType>

Definition at line 114 of file itkScalarRegionBasedLevelSetFunction.h.

◆ ConstPointer

template<typename TInputImage , typename TFeatureImage , typename TSharedData >
using itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::ConstPointer = SmartPointer<const Self>

Definition at line 75 of file itkScalarRegionBasedLevelSetFunction.h.

◆ FeatureImageConstPointer

template<typename TInputImage , typename TFeatureImage , typename TSharedData >
using itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::FeatureImageConstPointer = typename FeatureImageType::ConstPointer

Definition at line 96 of file itkScalarRegionBasedLevelSetFunction.h.

◆ FeatureImageIteratorType

template<typename TInputImage , typename TFeatureImage , typename TSharedData >
using itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::FeatureImageIteratorType = ImageRegionIteratorWithIndex<FeatureImageType>

Definition at line 115 of file itkScalarRegionBasedLevelSetFunction.h.

◆ ImageIteratorType

template<typename TInputImage , typename TFeatureImage , typename TSharedData >
using itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::ImageIteratorType = ImageRegionIteratorWithIndex<InputImageType>

Definition at line 113 of file itkScalarRegionBasedLevelSetFunction.h.

◆ ListImageType

template<typename TInputImage , typename TFeatureImage , typename TSharedData >
using itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::ListImageType = Image<ListPixelType, Self::ImageDimension>

Definition at line 121 of file itkScalarRegionBasedLevelSetFunction.h.

◆ ListPixelConstIterator

template<typename TInputImage , typename TFeatureImage , typename TSharedData >
using itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::ListPixelConstIterator = typename ListPixelType::const_iterator

Definition at line 119 of file itkScalarRegionBasedLevelSetFunction.h.

◆ ListPixelIterator

template<typename TInputImage , typename TFeatureImage , typename TSharedData >
using itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::ListPixelIterator = typename ListPixelType::iterator

Definition at line 120 of file itkScalarRegionBasedLevelSetFunction.h.

◆ ListPixelType

template<typename TInputImage , typename TFeatureImage , typename TSharedData >
using itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::ListPixelType = std::list<unsigned int>

Definition at line 118 of file itkScalarRegionBasedLevelSetFunction.h.

◆ Pointer

template<typename TInputImage , typename TFeatureImage , typename TSharedData >
using itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::Pointer = SmartPointer<Self>

Definition at line 74 of file itkScalarRegionBasedLevelSetFunction.h.

◆ Self

template<typename TInputImage , typename TFeatureImage , typename TSharedData >
using itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::Self = ScalarRegionBasedLevelSetFunction

Definition at line 72 of file itkScalarRegionBasedLevelSetFunction.h.

◆ Superclass

template<typename TInputImage , typename TFeatureImage , typename TSharedData >
using itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::Superclass = RegionBasedLevelSetFunction<TInputImage, TFeatureImage, TSharedData>

Definition at line 73 of file itkScalarRegionBasedLevelSetFunction.h.

Constructor & Destructor Documentation

◆ ScalarRegionBasedLevelSetFunction()

template<typename TInputImage , typename TFeatureImage , typename TSharedData >
itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::ScalarRegionBasedLevelSetFunction ( )
inlineprotected

Definition at line 134 of file itkScalarRegionBasedLevelSetFunction.h.

◆ ~ScalarRegionBasedLevelSetFunction()

template<typename TInputImage , typename TFeatureImage , typename TSharedData >
itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::~ScalarRegionBasedLevelSetFunction ( )
overrideprotecteddefault

Member Function Documentation

◆ ComputeOverlapParameters()

template<typename TInputImage , typename TFeatureImage , typename TSharedData >
ScalarValueType itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::ComputeOverlapParameters ( const FeatureIndexType featIndex,
ScalarValueType pr 
)
overrideprotectedvirtual

Compute the overlap term.

Parameters
[in]featIndex
[out]pr= \( \prod_{i \neq j} H(\phi_i)\)
Returns
OverlapTerm = \( \sum_{i \neq j} H(\phi_i)\)

Implements itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >.

◆ GetNameOfClass()

template<typename TInputImage , typename TFeatureImage , typename TSharedData >
virtual const char* itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::GetNameOfClass ( ) const
virtual

◆ UpdatePixel()

template<typename TInputImage , typename TFeatureImage , typename TSharedData >
void itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::UpdatePixel ( const unsigned int  idx,
NeighborhoodIterator< TInputImage > &  iterator,
InputPixelType newValue,
bool &  status 
)

Performs the narrow-band update of the Heaviside function for each voxel. The characteristic function of each region is recomputed (note the shared data which contains information from the other level sets). Using the new H values, the previous c_i are updated.

◆ UpdateSharedDataInsideParameters()

template<typename TInputImage , typename TFeatureImage , typename TSharedData >
virtual void itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::UpdateSharedDataInsideParameters ( const unsigned int &  iId,
const FeaturePixelType iVal,
const ScalarValueType iChange 
)
protectedpure virtual

◆ UpdateSharedDataOutsideParameters()

template<typename TInputImage , typename TFeatureImage , typename TSharedData >
virtual void itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::UpdateSharedDataOutsideParameters ( const unsigned int &  iId,
const FeaturePixelType iVal,
const ScalarValueType iChange 
)
protectedpure virtual

Member Data Documentation

◆ ImageDimension

template<typename TInputImage , typename TFeatureImage , typename TSharedData >
constexpr unsigned int itk::ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::ImageDimension = TFeatureImage::ImageDimension
staticconstexpr

Definition at line 82 of file itkScalarRegionBasedLevelSetFunction.h.


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