18 #ifndef itkMultiphaseSparseFiniteDifferenceImageFilter_h
19 #define itkMultiphaseSparseFiniteDifferenceImageFilter_h
176 template <
typename TInputImage,
177 typename TFeatureImage,
178 typename TOutputImage,
180 typename TIdCell =
unsigned int>
201 static constexpr
unsigned int ImageDimension = Superclass::ImageDimension;
283 itkSetMacro(NumberOfLayers,
unsigned int);
284 itkGetConstMacro(NumberOfLayers,
unsigned int);
289 itkGetConstMacro(IsoSurfaceValue,
ValueType);
296 itkSetMacro(InterpolateSurfaceLocation,
bool);
297 itkGetConstMacro(InterpolateSurfaceLocation,
bool);
298 itkBooleanMacro(InterpolateSurfaceLocation);
304 this->Superclass::SetFunctionCount(n);
306 m_SparseData.resize(this->m_FunctionCount,
nullptr);
308 for (
IdCellType i = 0; i < this->m_FunctionCount; i++)
314 #ifdef ITK_USE_CONCEPT_CHECKING
326 while (!m_SparseData.empty())
328 delete m_SparseData.back();
329 m_SparseData.pop_back();
334 PrintSelf(std::ostream & os,
Indent indent)
const override;
341 m_LayerNodeStore = LayerNodeStorageType::New();
342 m_LayerNodeStore->SetGrowthStrategyToExponential();
381 return (value + dt * change);
388 PostProcessOutput()
override;
395 InitializeBackgroundPixels();
399 Initialize()
override;
406 CopyInputToOutput()
override;
416 ApplyUpdate(TimeStepType dt)
override;
421 CalculateChange()
override;
427 ConstructLayer(SparseDataStruct * sparsePtr, StatusType from, StatusType to);
434 ConstructActiveLayer();
438 InitializeActiveLayerValues();
443 InitializeBackgroundConstants();
453 PropagateLayerValues(SparseDataStruct * sparsePtr, StatusType from, StatusType to, StatusType promote,
int InOrOut);
460 PropagateAllLayerValues();
463 PropagateFunctionLayerValues(
unsigned int functionIndex);
469 UpdateActiveLayerValues(TimeStepType dt, LayerType * StatusUpList, LayerType * StatusDownList);
473 ProcessStatusList(LayerType * InputList,
474 LayerType * OutputList,
475 StatusType ChangeToStatus,
476 StatusType SearchForStatus);
480 ProcessOutsideList(LayerType * OutsideList, StatusType ChangeToStatus);
483 InitializeIteration()
override;
487 unsigned int itkNotUsed(idx),
490 bool & itkNotUsed(status))
493 itkGetConstMacro(ValueZero, ValueType);
548 double m_RMSSum{ 0. };
549 unsigned int m_RMSCounter{ 0 };
557 #ifndef ITK_MANUAL_INSTANTIATION
558 # include "itkMultiphaseSparseFiniteDifferenceImageFilter.hxx"