18 #ifndef itkMultiphaseSparseFiniteDifferenceImageFilter_h
19 #define itkMultiphaseSparseFiniteDifferenceImageFilter_h
176 template<
typename TInputImage,
typename TFeatureImage,
typename TOutputImage,
typename 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);
304 { this->SetInterpolateSurfaceLocation(
true); }
306 { this->SetInterpolateSurfaceLocation(
false); }
311 this->Superclass::SetFunctionCount(n);
313 m_SparseData.resize(this->m_FunctionCount, ITK_NULLPTR);
315 for (
IdCellType i = 0; i < this->m_FunctionCount; i++ )
321 #ifdef ITK_USE_CONCEPT_CHECKING
336 while ( !m_SparseData.empty() )
338 delete m_SparseData.back();
339 m_SparseData.pop_back();
343 virtual void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
349 m_LayerNodeStore = LayerNodeStorageType::New();
350 m_LayerNodeStore->SetGrowthStrategyToExponential();
389 return ( value + dt * change );
395 virtual void PostProcessOutput() ITK_OVERRIDE;
401 virtual
void InitializeBackgroundPixels();
404 void Initialize() ITK_OVERRIDE;
410 void CopyInputToOutput() ITK_OVERRIDE;
413 void AllocateUpdateBuffer() ITK_OVERRIDE {}
417 void ApplyUpdate(TimeStepType dt) ITK_OVERRIDE;
421 TimeStepType CalculateChange() ITK_OVERRIDE;
426 void ConstructLayer(SparseDataStruct *sparsePtr, StatusType from, StatusType
433 void ConstructActiveLayer();
436 void InitializeActiveLayerValues();
440 void InitializeBackgroundConstants();
449 void PropagateLayerValues(SparseDataStruct *sparsePtr, StatusType from,
450 StatusType to, StatusType promote,
int InOrOut);
456 void PropagateAllLayerValues();
458 void PropagateFunctionLayerValues(
unsigned int functionIndex);
463 void UpdateActiveLayerValues(TimeStepType dt, LayerType *StatusUpList,
464 LayerType *StatusDownList);
467 void ProcessStatusList(LayerType *InputList, LayerType *OutputList,
468 StatusType ChangeToStatus, StatusType SearchForStatus);
471 void ProcessOutsideList(LayerType *OutsideList, StatusType ChangeToStatus);
473 void InitializeIteration() ITK_OVERRIDE;
475 virtual
void UpdatePixel(
unsigned int itkNotUsed(functionIndex),
unsigned int itkNotUsed(idx),
478 bool & itkNotUsed(status) ){}
480 itkGetConstMacro(ValueZero, ValueType);
546 #ifndef ITK_MANUAL_INSTANTIATION
547 #include "itkMultiphaseSparseFiniteDifferenceImageFilter.hxx"
std::vector< SparseDataStruct * > m_SparseData
NeighborListType::OffsetType OffsetType
ValueType m_IsoSurfaceValue
LayerType::ConstIterator LayerConstIterator
SmartPointer< const Self > ConstPointer
Superclass::InputPointType InputPointType
Superclass::InputSizeValueType InputSizeValueType
Superclass::FiniteDifferenceFunctionType FiniteDifferenceFunctionType
unsigned int m_NumberOfLayers
SparseFieldLevelSetNode< OutputIndexType > LayerNodeType
void InterpolateSurfaceLocationOn()
bool m_InterpolateSurfaceLocation
unsigned int m_CurrentFunctionIndex
static const ValueType m_ValueZero
ValueType m_BackgroundValue
Superclass::OutputImageType OutputImageType
std::vector< ValueType > UpdateBufferType
Image< StatusType, itkGetStaticConstMacro(ImageDimension) > StatusImageType
static const ValueType m_ValueOne
Superclass::OutputPixelType OutputPixelType
void SetFunctionCount(const IdCellType &n)
A convenience class for storing indices which reference neighbor pixels within a neighborhood.
Superclass::OutputRegionType OutputRegionType
Superclass::InputImageType InputImageType
Superclass::OutputIndexValueType OutputIndexValueType
Superclass::FeatureSizeType FeatureSizeType
Superclass::FeaturePointType FeaturePointType
Superclass::OutputIndexType OutputIndexType
NeighborhoodAlgorithm::ImageBoundaryFacesCalculator< StatusImageType > BFCType
Base class for all process objects that output image data.
NeighborListType m_NeighborList
The non-const version of the ConstSparseFieldLayerIterator.
unsigned int m_RMSCounter
Superclass::InputIndexValueType InputIndexValueType
static const StatusType m_StatusBoundaryPixel
FiniteDifferenceFunctionType::FloatOffsetType FiniteDifferenceFunctionFloatOffsetType
LayerListType::const_iterator LayerListConstIterator
LayerNodeStoragePointer m_LayerNodeStore
static double m_ConstantGradientValue
Splits an image into a main region and several "face" regions which are used to handle computations o...
Superclass::FeatureImageType FeatureImageType
Superclass::FiniteDifferenceFunctionPointer FiniteDifferenceFunctionPointer
Superclass::InputSpacingType InputSpacingType
Superclass::InputSizeType InputSizeType
MultiphaseSparseFiniteDifferenceImageFilter Self
Superclass::FeatureImagePointer FeatureImagePointer
static const StatusType m_StatusActiveChangingDown
Superclass::InputOffsetValueType InputOffsetValueType
UpdateBufferType::const_iterator UpdateBufferConstIterator
Superclass::OutputImagePointer OutputImagePointer
void InterpolateSurfaceLocationOff()
virtual ValueType CalculateUpdateValue(const OutputIndexType &, const TimeStepType &dt, const ValueType &value, const ValueType &change)
ZeroCrossingImageFilter< InputImageType, InputImageType > ZeroCrossingFilterType
Superclass::IdCellType IdCellType
Superclass::OutputSizeType OutputSizeType
Superclass::InputPixelType InputPixelType
This class implements a finite difference partial differential equation solver for evolving surfaces ...
Superclass::FeatureRegionType FeatureRegionType
static const StatusType m_StatusNull
static const StatusType m_StatusChanging
StatusImageType::Pointer StatusImagePointer
ZeroCrossingFilterType::Pointer ZeroCrossingFilterPointer
This filter finds the closest pixel to the zero-crossings (sign changes) in a signed itk::Image...
Superclass::InputImagePointer InputImagePointer
Control indentation during Print() invocation.
Superclass::InputRegionType InputRegionType
LayerType::Pointer LayerPointerType
MultiphaseFiniteDifferenceImageFilter< TInputImage, TFeatureImage, TOutputImage, TFunction, TIdCell > Superclass
~MultiphaseSparseFiniteDifferenceImageFilter()
Superclass::TimeStepType TimeStepType
Superclass::InputIndexType InputIndexType
SparseFieldCityBlockNeighborList< NeighborhoodIterator< OutputImageType > > NeighborListType
SparseDataStruct(const IdCellType &index)
A very simple linked list that is used to manage nodes in a layer of a sparse field level-set solver...
LayerType::Iterator LayerIterator
LayerNodeStorageType::Pointer LayerNodeStoragePointer
#define itkConceptMacro(name, concept)
UpdateBufferType m_UpdateBuffer
A specialized memory management object for allocating and destroying contiguous blocks of objects...
LayerListType::iterator LayerListIterator
std::vector< LayerPointerType > LayerListType
InputImageType::ValueType ValueType
std::vector< ValueType > m_PixelDistance
ObjectStore< LayerNodeType > LayerNodeStorageType
SparseFieldLayer< LayerNodeType > LayerType
static const StatusType m_StatusActiveChangingUp
Defines iteration of a local N-dimensional neighborhood of pixels across an itk::Image.
Templated n-dimensional image class.
Superclass::FeatureSpacingType FeatureSpacingType
StatusImagePointer m_StatusImage
bool m_BoundsCheckingActive
SmartPointer< Self > Pointer