18 #ifndef __itkMultiphaseSparseFiniteDifferenceImageFilter_h
19 #define __itkMultiphaseSparseFiniteDifferenceImageFilter_h
176 template<
class TInputImage,
class TFeatureImage,
class TOutputImage,
class TFunction,
177 typename TIdCell =
unsigned int >
180 TFeatureImage, TOutputImage, TFunction, TIdCell >
187 TFeatureImage, TOutputImage, TFunction, TIdCell >
Superclass;
197 itkStaticConstMacro(ImageDimension,
unsigned int, Superclass::ImageDimension);
233 typedef typename Superclass::FiniteDifferenceFunctionType
235 typedef typename Superclass::FiniteDifferenceFunctionPointer
237 typedef typename FiniteDifferenceFunctionType::FloatOffsetType
285 itkSetMacro(NumberOfLayers,
unsigned int);
286 itkGetConstMacro(NumberOfLayers,
unsigned int);
291 itkGetConstMacro(IsoSurfaceValue,
ValueType);
298 itkSetMacro(InterpolateSurfaceLocation,
bool);
299 itkGetConstMacro(InterpolateSurfaceLocation,
bool);
303 void InterpolateSurfaceLocationOn()
304 { this->SetInterpolateSurfaceLocation(
true); }
305 void InterpolateSurfaceLocationOff()
306 { this->SetInterpolateSurfaceLocation(
false); }
311 this->Superclass::SetFunctionCount(n);
313 m_SparseData.resize(this->m_FunctionCount, 0);
315 for (
IdCellType i = 0; i < this->m_FunctionCount; i++ )
321 #ifdef ITK_USE_CONCEPT_CHECKING
336 while ( !m_SparseData.empty() )
338 if ( m_SparseData.back() )
340 delete m_SparseData.back();
342 m_SparseData.pop_back();
347 virtual void PrintSelf(std::ostream & os,
Indent indent)
const;
353 m_LayerNodeStore = LayerNodeStorageType::New();
354 m_LayerNodeStore->SetGrowthStrategyToExponential();
393 return ( value + dt * change );
399 virtual void PostProcessOutput();
405 virtual void InitializeBackgroundPixels();
414 void CopyInputToOutput();
421 void ApplyUpdate(TimeStepType dt);
425 TimeStepType CalculateChange();
430 void ConstructLayer(SparseDataStruct *sparsePtr, StatusType from, StatusType
437 void ConstructActiveLayer();
440 void InitializeActiveLayerValues();
444 void InitializeBackgroundConstants();
453 void PropagateLayerValues(SparseDataStruct *sparsePtr, StatusType from,
454 StatusType to, StatusType promote,
int InOrOut);
460 void PropagateAllLayerValues();
462 void PropagateFunctionLayerValues(
unsigned int functionIndex);
467 void UpdateActiveLayerValues(TimeStepType dt, LayerType *StatusUpList,
468 LayerType *StatusDownList);
471 void ProcessStatusList(LayerType *InputList, LayerType *OutputList,
472 StatusType ChangeToStatus, StatusType SearchForStatus);
475 void ProcessOutsideList(LayerType *OutsideList, StatusType ChangeToStatus);
477 void InitializeIteration();
479 virtual void UpdatePixel(
unsigned int itkNotUsed(functionIndex),
unsigned int itkNotUsed(idx),
482 bool & itkNotUsed(status) ){}
484 itkGetConstMacro(ValueZero, ValueType);
537 void operator=(
const Self &);
551 #ifndef ITK_MANUAL_INSTANTIATION
552 #include "itkMultiphaseSparseFiniteDifferenceImageFilter.hxx"