18 #ifndef __itkRegionBasedLevelSetFunction_h
19 #define __itkRegionBasedLevelSetFunction_h
23 #include "vnl/vnl_matrix_fixed.h"
63 template <
class TInput,
76 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;
154 this->m_DomainFunction = f;
166 m_Center = it.
Size() / 2;
169 for(
unsigned int i = 0; i < ImageDimension; i++)
178 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; }
225 { this->m_Lambda1 = lambda1; }
227 {
return this->m_Lambda1; }
231 { this->m_Lambda2 = lambda2; }
233 {
return this->m_Lambda2; }
237 { this->m_OverlapPenaltyWeight = gamma; }
239 {
return this->m_OverlapPenaltyWeight; }
243 { m_CurvatureWeight = c; }
245 {
return m_CurvatureWeight; }
248 { this->m_AdvectionWeight = iA; }
250 {
return this->m_AdvectionWeight; }
254 { m_ReinitializationSmoothingWeight = c; }
256 {
return m_ReinitializationSmoothingWeight; }
260 { this->m_VolumeMatchingWeight = tau; }
262 {
return this->m_VolumeMatchingWeight; }
266 { this->m_Volume = volume; }
268 {
return this->m_Volume; }
271 void SetFunctionId(
const unsigned int& iFid )
272 { this->m_FunctionId = iFid; }
274 virtual void ReleaseGlobalDataPointer(
void *GlobalData)
const
275 {
delete (GlobalDataStruct *) GlobalData; }
277 virtual ScalarValueType ComputeCurvature(
const NeighborhoodType &,
278 const FloatOffsetType &, GlobalDataStruct *gd );
285 {
return NumericTraits<ScalarValueType>::One; }
292 {
return NumericTraits<ScalarValueType>::One; }
342 std::slice x_slice[itkGetStaticConstMacro(ImageDimension)];
344 ::size_t m_xStride[itkGetStaticConstMacro(ImageDimension)];
345 double m_InvSpacing[itkGetStaticConstMacro(ImageDimension)];
350 void ComputeHImage();
403 GlobalDataStruct *globalData );
406 virtual void ComputeParameters() = 0;
410 virtual void UpdateSharedDataParameters() = 0;
416 static VectorType InitializeZeroVectorConstant();
423 void operator=(
const Self&);
428 #ifndef ITK_MANUAL_INSTANTIATION