18 #ifndef __itkLevelSetFunction_h
19 #define __itkLevelSetFunction_h
22 #include "vnl/vnl_matrix_fixed.h"
65 template<
class 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) );
196 virtual TimeStepType ComputeGlobalTimeStep(
void *GlobalData)
const;
205 virtual void * GetGlobalDataPointer()
const
218 virtual void Initialize(
const RadiusType & r);
224 virtual void ReleaseGlobalDataPointer(
void *GlobalData)
const
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
249 void SetUseMinimalCurvature(
bool b)
251 m_UseMinimalCurvature = b;
254 bool GetUseMinimalCurvature()
const
256 return m_UseMinimalCurvature;
259 void UseMinimalCurvatureOn()
261 this->SetUseMinimalCurvature(
true);
264 void UseMinimalCurvatureOff()
266 this->SetUseMinimalCurvature(
false);
273 static void SetMaximumCurvatureTimeStep(
double n)
278 static double GetMaximumCurvatureTimeStep()
287 static void SetMaximumPropagationTimeStep(
double n)
292 static double GetMaximumPropagationTimeStep()
301 m_AdvectionWeight = m_PropagationWeight =
302 m_CurvatureWeight = m_LaplacianSmoothingWeight =
304 m_UseMinimalCurvature =
false;
308 void PrintSelf(std::ostream & s,
Indent indent)
const;
315 std::slice x_slice[itkGetStaticConstMacro(ImageDimension)];
327 static VectorType InitializeZeroVectorConstant();
348 void operator=(
const Self &);
354 #define ITK_TEMPLATE_LevelSetFunction(_, EXPORT, TypeX, TypeY) \
357 _( 1 ( class EXPORT LevelSetFunction< ITK_TEMPLATE_1 TypeX > ) ) \
358 namespace Templates \
360 typedef LevelSetFunction< ITK_TEMPLATE_1 TypeX > \
361 LevelSetFunction##TypeY; \
365 #if ITK_TEMPLATE_EXPLICIT
366 #include "Templates/itkLevelSetFunction+-.h"
370 #include "itkLevelSetFunction.hxx"