18 #ifndef itkLevelSetFunction_h
19 #define itkLevelSetFunction_h
22 #include "vnl/vnl_matrix_fixed.h"
65 template<
typename TImageType >
85 static constexpr
unsigned int ImageDimension = Superclass::ImageDimension;
114 Self::ImageDimension,
129 {
return m_ZeroVectorConstant; }
154 { m_AdvectionWeight = a; }
156 {
return m_AdvectionWeight; }
161 { m_PropagationWeight = p; }
163 {
return m_PropagationWeight; }
168 { m_CurvatureWeight = c; }
170 {
return m_CurvatureWeight; }
175 { m_LaplacianSmoothingWeight = c; }
177 {
return m_LaplacianSmoothingWeight; }
182 { m_EpsilonMagnitude =
e; }
184 {
return m_EpsilonMagnitude; }
188 PixelType ComputeUpdate(
const NeighborhoodType & neighborhood,
190 const FloatOffsetType & = FloatOffsetType(0.0) )
override;
198 TimeStepType ComputeGlobalTimeStep(
void *GlobalData)
const override;
220 virtual void Initialize(
const RadiusType & r);
230 virtual ScalarValueType ComputeCurvatureTerm(
const NeighborhoodType &,
231 const FloatOffsetType &,
232 GlobalDataStruct *gd = 0
235 virtual ScalarValueType ComputeMeanCurvature(
const NeighborhoodType &,
236 const FloatOffsetType &,
237 GlobalDataStruct *gd = 0
240 virtual ScalarValueType ComputeMinimalCurvature(
const NeighborhoodType &,
241 const FloatOffsetType &,
242 GlobalDataStruct *gd = 0
245 virtual ScalarValueType Compute3DMinimalCurvature(
const NeighborhoodType &,
246 const FloatOffsetType &,
247 GlobalDataStruct *gd = 0
253 m_UseMinimalCurvature = b;
258 return m_UseMinimalCurvature;
263 this->SetUseMinimalCurvature(
true);
268 this->SetUseMinimalCurvature(
false);
310 void PrintSelf(std::ostream & s,
Indent indent)
const override;
317 std::slice x_slice[Self::ImageDimension];
325 bool m_UseMinimalCurvature{
false};
329 static VectorType InitializeZeroVectorConstant();
351 #ifndef ITK_MANUAL_INSTANTIATION
352 #include "itkLevelSetFunction.hxx"
PixelType ScalarValueType
static void SetMaximumCurvatureTimeStep(double n)
static VectorType m_ZeroVectorConstant
ScalarValueType m_MaxCurvatureChange
void * GetGlobalDataPointer() const override
Light weight base class for most itk classes.
The LevelSetFunction class is a generic function object which can be used to create a level set metho...
void ReleaseGlobalDataPointer(void *GlobalData) const override
Define numeric traits for std::vector.
ScalarValueType m_GradMagSqr
static double GetMaximumCurvatureTimeStep()
ScalarValueType GetEpsilonMagnitude() const
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
ScalarValueType m_AdvectionWeight
bool GetUseMinimalCurvature() const
virtual ScalarValueType PropagationSpeed(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
virtual ScalarValueType LaplacianSmoothingSpeed(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
virtual ScalarValueType CurvatureSpeed(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=nullptr) const
Simulate a standard C array with copy semnatics.
ScalarValueType m_PropagationWeight
typename ConstNeighborhoodIterator< TImageType >::RadiusType RadiusType
static double GetMaximumPropagationTimeStep()
A templated class holding a n-Dimensional vector.
virtual void SetPropagationWeight(const ScalarValueType p)
ScalarValueType m_EpsilonMagnitude
ScalarValueType m_CurvatureWeight
typename Superclass::PixelType PixelType
ScalarValueType GetLaplacianSmoothingWeight() const
void UseMinimalCurvatureOff()
vnl_matrix_fixed< ScalarValueType, Self::ImageDimension, Self::ImageDimension > m_dxy
static constexpr double e
The base of the natural logarithm or Euler's number
ScalarValueType m_MaxPropagationChange
Control indentation during Print() invocation.
ScalarValueType m_MaxAdvectionChange
ScalarValueType GetAdvectionWeight() const
virtual void SetCurvatureWeight(const ScalarValueType c)
virtual void SetAdvectionWeight(const ScalarValueType a)
ImageBaseType::SpacingType VectorType
void UseMinimalCurvatureOn()
ScalarValueType GetCurvatureWeight() const
static void SetMaximumPropagationTimeStep(double n)
void SetLaplacianSmoothingWeight(const ScalarValueType c)
signed long OffsetValueType
void SetUseMinimalCurvature(bool b)
void SetEpsilonMagnitude(const ScalarValueType e)
ScalarValueType GetPropagationWeight() const
virtual VectorType AdvectionField(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
ScalarValueType m_LaplacianSmoothingWeight