18 #ifndef itkLevelSetFunction_h
19 #define itkLevelSetFunction_h
22 #include "vnl/vnl_matrix_fixed.h"
65 template<
typename TImageType >
83 itkStaticConstMacro(ImageDimension,
unsigned int, Superclass::ImageDimension);
112 itkGetStaticConstMacro(ImageDimension),
113 itkGetStaticConstMacro(ImageDimension) >
m_dxy;
127 {
return m_ZeroVectorConstant; }
152 { m_AdvectionWeight = a; }
154 {
return m_AdvectionWeight; }
159 { m_PropagationWeight = p; }
161 {
return m_PropagationWeight; }
166 { m_CurvatureWeight = c; }
168 {
return m_CurvatureWeight; }
173 { m_LaplacianSmoothingWeight = c; }
175 {
return m_LaplacianSmoothingWeight; }
180 { m_EpsilonMagnitude =
e; }
182 {
return m_EpsilonMagnitude; }
186 virtual PixelType ComputeUpdate(
const NeighborhoodType & neighborhood,
188 const FloatOffsetType & = FloatOffsetType(0.0) ) ITK_OVERRIDE;
196 virtual TimeStepType ComputeGlobalTimeStep(
void *GlobalData) const ITK_OVERRIDE;
205 virtual
void * GetGlobalDataPointer() const ITK_OVERRIDE
218 virtual void Initialize(
const RadiusType & r);
228 virtual ScalarValueType ComputeCurvatureTerm(
const NeighborhoodType &,
229 const FloatOffsetType &,
230 GlobalDataStruct *gd = 0
233 virtual ScalarValueType ComputeMeanCurvature(
const NeighborhoodType &,
234 const FloatOffsetType &,
235 GlobalDataStruct *gd = 0
238 virtual ScalarValueType ComputeMinimalCurvature(
const NeighborhoodType &,
239 const FloatOffsetType &,
240 GlobalDataStruct *gd = 0
243 virtual ScalarValueType Compute3DMinimalCurvature(
const NeighborhoodType &,
244 const FloatOffsetType &,
245 GlobalDataStruct *gd = 0
251 m_UseMinimalCurvature = b;
256 return m_UseMinimalCurvature;
261 this->SetUseMinimalCurvature(
true);
266 this->SetUseMinimalCurvature(
false);
300 m_UseMinimalCurvature(false),
310 void PrintSelf(std::ostream & s,
Indent indent)
const ITK_OVERRIDE;
317 std::slice x_slice[itkGetStaticConstMacro(ImageDimension)];
329 static VectorType InitializeZeroVectorConstant();
354 #ifndef ITK_MANUAL_INSTANTIATION
355 #include "itkLevelSetFunction.hxx"
static void SetMaximumCurvatureTimeStep(double n)
static VectorType m_ZeroVectorConstant
Superclass::RadiusType RadiusType
ScalarValueType m_MaxCurvatureChange
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...
virtual ~LevelSetFunction() override
PixelType ScalarValueType
Superclass::NeighborhoodType NeighborhoodType
Superclass::PixelType PixelType
bool m_UseMinimalCurvature
signed long OffsetValueType
ScalarValueType m_GradMagSqr
static double GetMaximumCurvatureTimeStep()
Superclass::FloatOffsetType FloatOffsetType
ScalarValueType GetEpsilonMagnitude() const
Superclass::ImageType ImageType
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
vnl_matrix_fixed< ScalarValueType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) > m_dxy
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
Simulate a standard C array with copy semnatics.
ScalarValueType m_PropagationWeight
Superclass::NeighborhoodScalesType NeighborhoodScalesType
SmartPointer< Self > Pointer
static double GetMaximumPropagationTimeStep()
virtual void ReleaseGlobalDataPointer(void *GlobalData) const override
virtual ScalarValueType CurvatureSpeed(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
A templated class holding a n-Dimensional vector.
virtual void SetPropagationWeight(const ScalarValueType p)
ScalarValueType m_EpsilonMagnitude
ScalarValueType m_CurvatureWeight
ImageType::PixelType PixelType
Superclass::PixelRealType PixelRealType
ScalarValueType GetLaplacianSmoothingWeight() const
void UseMinimalCurvatureOff()
ScalarValueType m_MaxPropagationChange
Control indentation during Print() invocation.
ScalarValueType m_MaxAdvectionChange
ScalarValueType GetAdvectionWeight() const
FixedArray< ScalarValueType, itkGetStaticConstMacro(ImageDimension) > VectorType
SmartPointer< const Self > ConstPointer
Define additional traits for native types such as int or float.
virtual void SetCurvatureWeight(const ScalarValueType c)
virtual void SetAdvectionWeight(const ScalarValueType a)
void UseMinimalCurvatureOn()
static ITK_CONSTEXPR_VAR double e
The base of the natural logarithm or Euler's number
ScalarValueType GetCurvatureWeight() const
static void SetMaximumPropagationTimeStep(double n)
void SetLaplacianSmoothingWeight(const ScalarValueType c)
void SetUseMinimalCurvature(bool b)
void SetEpsilonMagnitude(const ScalarValueType e)
ScalarValueType GetPropagationWeight() const
virtual VectorType AdvectionField(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
FiniteDifferenceFunction< TImageType > Superclass
ScalarValueType m_LaplacianSmoothingWeight