18#ifndef itkSparseFieldLevelSetImageFilter_h
19#define itkSparseFieldLevelSetImageFilter_h
35template <
typename TValue>
72template <
typename TNeighborhoodType>
77 using OffsetType =
typename NeighborhoodType::OffsetType;
78 using RadiusType =
typename NeighborhoodType::RadiusType;
90 return m_ArrayIndex[i];
96 return m_NeighborhoodOffset[i];
108 return m_StrideTable[i];
243template <
typename TInputImage,
typename TOutputImage>
256 using typename Superclass::TimeStepType;
257 using typename Superclass::RadiusType;
258 using typename Superclass::NeighborhoodScalesType;
270 static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
303 itkSetMacro(NumberOfLayers,
unsigned int);
304 itkGetConstMacro(NumberOfLayers,
unsigned int);
322 itkSetMacro(InterpolateSurfaceLocation,
bool);
323 itkGetConstMacro(InterpolateSurfaceLocation,
bool);
330 this->SetInterpolateSurfaceLocation(
true);
335 this->SetInterpolateSurfaceLocation(
false);
339#ifdef ITK_USE_CONCEPT_CHECKING
363 return (value + dt * change);
463 double m_ConstantGradientValue{ 1.0 };
506 unsigned int m_NumberOfLayers{ 2 };
530 bool m_InterpolateSurfaceLocation{
true };
538 bool m_BoundsCheckingActive{
false };
542#ifndef ITK_MANUAL_INSTANTIATION
543# include "itkSparseFieldLevelSetImageFilter.hxx"
typename FiniteDifferenceFunctionType::TimeStepType TimeStepType
Base class for all process objects that output image data.
Templated n-dimensional image class.
Control indentation during Print() invocation.
A specialized memory management object for allocating and destroying contiguous blocks of objects.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
A convenience class for storing indices which reference neighbor pixels within a neighborhood.
const RadiusType & GetRadius() const
typename NeighborhoodType::RadiusType RadiusType
TNeighborhoodType NeighborhoodType
SparseFieldCityBlockNeighborList()
const OffsetType & GetNeighborhoodOffset(unsigned int i) const
std::vector< OffsetType > m_NeighborhoodOffset
std::vector< unsigned int > m_ArrayIndex
typename NeighborhoodType::OffsetType OffsetType
~SparseFieldCityBlockNeighborList()=default
int GetStride(unsigned int i)
const unsigned int & GetSize() const
void Print(std::ostream &os, Indent indent) const
const unsigned int & GetArrayIndex(unsigned int i) const
A very simple linked list that is used to manage nodes in a layer of a sparse field level-set solver.
This class implements a finite difference partial differential equation solver for evolving surfaces ...
void CopyInputToOutput() override
virtual void InitializeBackgroundPixels()
static StatusType m_StatusActiveChangingUp
SparseFieldLevelSetImageFilter()
void PrintSelf(std::ostream &os, Indent indent) const override
void PostProcessOutput() override
void ApplyUpdate(const TimeStepType &dt) override
typename OutputImageType::IndexType IndexType
TOutputImage OutputImageType
virtual ValueType CalculateUpdateValue(const IndexType &, const TimeStepType &dt, const ValueType &value, const ValueType &change)
std::vector< ValueType > UpdateBufferType
void AllocateUpdateBuffer() override
~SparseFieldLevelSetImageFilter() override=default
void ConstructActiveLayer()
std::vector< LayerPointerType > LayerListType
void ConstructLayer(StatusType from, StatusType to)
static StatusType m_StatusChanging
void PropagateAllLayerValues()
static StatusType m_StatusBoundaryPixel
void ProcessStatusList(LayerType *InputList, LayerType *OutputList, StatusType ChangeToStatus, StatusType SearchForStatus)
static ValueType m_ValueOne
static StatusType m_StatusActiveChangingDown
void PropagateLayerValues(StatusType from, StatusType to, StatusType promote, int InOrOut)
static StatusType m_StatusNull
typename LayerType::Pointer LayerPointerType
void InitializeActiveLayerValues()
TimeStepType CalculateChange() override
void UpdateActiveLayerValues(TimeStepType dt, LayerType *UpList, LayerType *DownList)
TInputImage InputImageType
static ValueType m_ValueZero
void Initialize() override
void ProcessOutsideList(LayerType *OutsideList, StatusType ChangeToStatus)
void InterpolateSurfaceLocationOff()
void InterpolateSurfaceLocationOn()
typename OutputImageType::ValueType ValueType
SparseFieldLevelSetNode * Next
SparseFieldLevelSetNode * Previous
SmartPointer< Self > Pointer
#define itkConceptMacro(name, concept)
ImageBaseType::IndexType IndexType
constexpr unsigned int Dimension
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....