18#ifndef itkLevelSetFunction_h
19#define itkLevelSetFunction_h
22#include "vnl/vnl_matrix_fixed.h"
65template <
typename TImageType>
84 static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
88 using typename Superclass::ImageType;
89 using typename Superclass::PixelType;
91 using typename Superclass::PixelRealType;
92 using typename Superclass::RadiusType;
93 using typename Superclass::NeighborhoodType;
94 using typename Superclass::NeighborhoodScalesType;
95 using typename Superclass::FloatOffsetType;
113 vnl_matrix_fixed<ScalarValueType, Self::ImageDimension, Self::ImageDimension>
m_dxy;
128 return m_ZeroVectorConstant;
133 virtual ScalarValueType
141 virtual ScalarValueType
149 virtual ScalarValueType
159 m_AdvectionWeight = a;
164 return m_AdvectionWeight;
172 m_PropagationWeight = p;
177 return m_PropagationWeight;
185 m_CurvatureWeight = c;
190 return m_CurvatureWeight;
198 m_LaplacianSmoothingWeight = c;
203 return m_LaplacianSmoothingWeight;
211 m_EpsilonMagnitude =
e;
216 return m_EpsilonMagnitude;
270 virtual ScalarValueType
286 m_UseMinimalCurvature = b;
292 return m_UseMinimalCurvature;
298 this->SetUseMinimalCurvature(
true);
304 this->SetUseMinimalCurvature(
false);
357 std::slice x_slice[Self::ImageDimension];
365 bool m_UseMinimalCurvature{
false };
392#ifndef ITK_MANUAL_INSTANTIATION
393# include "itkLevelSetFunction.hxx"
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
typename ImageType::PixelType PixelType
typename ConstNeighborhoodIterator< TImageType >::RadiusType RadiusType
Simulate a standard C array with copy semantics.
Control indentation during Print() invocation.
The LevelSetFunction class is a generic function object which can be used to create a level set metho...
virtual void Initialize(const RadiusType &r)
static double GetMaximumPropagationTimeStep()
virtual ScalarValueType ComputeMinimalCurvature(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd=0)
ScalarValueType GetAdvectionWeight() const
virtual ScalarValueType ComputeCurvatureTerm(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd=0)
ScalarValueType GetLaplacianSmoothingWeight() const
virtual void SetAdvectionWeight(const ScalarValueType a)
void ReleaseGlobalDataPointer(void *GlobalData) const override
void SetEpsilonMagnitude(const ScalarValueType e)
virtual VectorType AdvectionField(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
virtual ScalarValueType PropagationSpeed(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
virtual ScalarValueType CurvatureSpeed(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=nullptr) const
~LevelSetFunction() override=default
static VectorType InitializeZeroVectorConstant()
static void SetMaximumPropagationTimeStep(double n)
PixelType ComputeUpdate(const NeighborhoodType &it, void *globalData, const FloatOffsetType &=FloatOffsetType(0.0)) override
static double GetMaximumCurvatureTimeStep()
ScalarValueType GetPropagationWeight() const
void UseMinimalCurvatureOn()
void UseMinimalCurvatureOff()
virtual ScalarValueType LaplacianSmoothingSpeed(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
void * GetGlobalDataPointer() const override
virtual ScalarValueType Compute3DMinimalCurvature(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd=0)
void SetLaplacianSmoothingWeight(const ScalarValueType c)
void PrintSelf(std::ostream &os, Indent indent) const override
TimeStepType ComputeGlobalTimeStep(void *GlobalData) const override
ScalarValueType GetCurvatureWeight() const
static VectorType m_ZeroVectorConstant
ScalarValueType GetEpsilonMagnitude() const
virtual void SetPropagationWeight(const ScalarValueType p)
virtual ScalarValueType ComputeMeanCurvature(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd=0)
void SetUseMinimalCurvature(bool b)
bool GetUseMinimalCurvature() const
virtual void SetCurvatureWeight(const ScalarValueType c)
PixelType ScalarValueType
static void SetMaximumCurvatureTimeStep(double n)
Light weight base class for most itk classes.
A templated class holding a n-Dimensional vector.
ImageBaseType::SpacingType VectorType
static constexpr double e
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
ScalarValueType m_MaxAdvectionChange
vnl_matrix_fixed< ScalarValueType, Self::ImageDimension, Self::ImageDimension > m_dxy
ScalarValueType m_MaxPropagationChange
ScalarValueType m_GradMagSqr
ScalarValueType m_MaxCurvatureChange