18 #ifndef __itkRegionBasedLevelSetFunction_h
19 #define __itkRegionBasedLevelSetFunction_h
23 #include "vnl/vnl_matrix_fixed.h"
64 template<
class TInput,
77 itkStaticConstMacro(ImageDimension,
unsigned int, Superclass::ImageDimension);
103 m_MaxCurvatureChange = null_value;
104 m_MaxAdvectionChange = null_value;
105 m_MaxGlobalChange = null_value;
111 itkGetStaticConstMacro(ImageDimension),
112 itkGetStaticConstMacro(ImageDimension) >
m_dxy;
153 this->m_DomainFunction = f;
165 m_Center = it.
Size() / 2;
168 for (
unsigned int i = 0; i < ImageDimension; i++ )
174 #if !defined( CABLE_CONFIGURATION )
177 this->m_SharedData = sharedDataIn;
181 void UpdateSharedData(
bool forceUpdate);
183 void * GetGlobalDataPointer()
const
185 return new GlobalDataStruct;
188 TimeStepType ComputeGlobalTimeStep(
void *GlobalData)
const;
191 virtual PixelType ComputeUpdate(
const NeighborhoodType & neighborhood,
192 void *globalData,
const FloatOffsetType & = FloatOffsetType(0.0) );
200 {
return m_FeatureImage.GetPointer(); }
206 for (
unsigned int i = 0; i < ImageDimension; i++ )
208 this->m_InvSpacing[i] = 1 / spacing[i];
215 {
return this->m_ZeroVectorConstant; }
219 { this->m_AreaWeight = nu; }
221 {
return this->m_AreaWeight; }
226 { this->m_Lambda1 = lambda1; }
228 {
return this->m_Lambda1; }
233 { this->m_Lambda2 = lambda2; }
235 {
return this->m_Lambda2; }
240 { this->m_OverlapPenaltyWeight = gamma; }
242 {
return this->m_OverlapPenaltyWeight; }
247 { m_CurvatureWeight = c; }
249 {
return m_CurvatureWeight; }
253 { this->m_AdvectionWeight = iA; }
255 {
return this->m_AdvectionWeight; }
259 { m_ReinitializationSmoothingWeight = c; }
261 {
return m_ReinitializationSmoothingWeight; }
266 { this->m_VolumeMatchingWeight = tau; }
268 {
return this->m_VolumeMatchingWeight; }
273 { this->m_Volume = volume; }
275 {
return this->m_Volume; }
279 void SetFunctionId(
const unsigned int & iFid)
280 { this->m_FunctionId = iFid; }
282 virtual void ReleaseGlobalDataPointer(
void *GlobalData)
const
283 {
delete (GlobalDataStruct *)GlobalData; }
285 virtual ScalarValueType ComputeCurvature(
const NeighborhoodType &,
286 const FloatOffsetType &, GlobalDataStruct *gd);
350 std::slice x_slice[itkGetStaticConstMacro(ImageDimension)];
353 double m_InvSpacing[itkGetStaticConstMacro(ImageDimension)];
358 void ComputeHImage();
409 GlobalDataStruct *globalData);
412 virtual void ComputeParameters() = 0;
416 virtual void UpdateSharedDataParameters() = 0;
422 static VectorType InitializeZeroVectorConstant();
428 void operator=(
const Self &);
433 #ifndef ITK_MANUAL_INSTANTIATION
434 #include "itkRegionBasedLevelSetFunction.hxx"