18 #ifndef itkLevelSetFunction_h
19 #define itkLevelSetFunction_h
22 #include "vnl/vnl_matrix_fixed.h"
65 template <
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;
222 ComputeUpdate(
const NeighborhoodType & it,
224 const FloatOffsetType & = FloatOffsetType(0.0))
override;
233 ComputeGlobalTimeStep(
void * GlobalData)
const override;
257 Initialize(
const RadiusType & r);
270 virtual ScalarValueType
271 ComputeCurvatureTerm(
const NeighborhoodType &,
const FloatOffsetType &, GlobalDataStruct * gd = 0);
273 virtual ScalarValueType
274 ComputeMeanCurvature(
const NeighborhoodType &,
const FloatOffsetType &, GlobalDataStruct * gd = 0);
276 virtual ScalarValueType
277 ComputeMinimalCurvature(
const NeighborhoodType &,
const FloatOffsetType &, GlobalDataStruct * gd = 0);
279 virtual ScalarValueType
280 Compute3DMinimalCurvature(
const NeighborhoodType &,
const FloatOffsetType &, GlobalDataStruct * gd = 0);
286 m_UseMinimalCurvature = b;
292 return m_UseMinimalCurvature;
298 this->SetUseMinimalCurvature(
true);
304 this->SetUseMinimalCurvature(
false);
343 , m_PropagationWeight(ScalarValueType{})
344 , m_CurvatureWeight(ScalarValueType{})
345 , m_LaplacianSmoothingWeight(ScalarValueType{})
348 ~LevelSetFunction()
override =
default;
350 PrintSelf(std::ostream & os, Indent indent)
const override;
357 std::slice x_slice[Self::ImageDimension];
365 bool m_UseMinimalCurvature{
false };
370 InitializeZeroVectorConstant();
392 #ifndef ITK_MANUAL_INSTANTIATION
393 # include "itkLevelSetFunction.hxx"