18#ifndef itkSparseFieldFourthOrderLevelSetImageFilter_h
19#define itkSparseFieldFourthOrderLevelSetImageFilter_h
37template <
typename TImageType>
153template <
typename TInputImage,
typename TOutputImage>
171 static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
174 using typename Superclass::OutputImageType;
175 using typename Superclass::ValueType;
177 using typename Superclass::LayerType;
178 using typename Superclass::RadiusType;
179 using typename Superclass::NeighborhoodScalesType;
206 itkGetConstReferenceMacro(MaxRefitIteration,
unsigned int);
207 itkSetMacro(MaxRefitIteration,
unsigned int);
208 itkGetConstReferenceMacro(MaxNormalIteration,
unsigned int);
209 itkSetMacro(MaxNormalIteration,
unsigned int);
210 itkGetConstReferenceMacro(CurvatureBandWidth,
ValueType);
212 itkGetConstReferenceMacro(RMSChangeNormalProcessTrigger,
ValueType);
214 itkGetConstReferenceMacro(NormalProcessType,
int);
215 itkSetMacro(NormalProcessType,
int);
216 itkGetConstReferenceMacro(NormalProcessConductance,
ValueType);
218 itkSetMacro(NormalProcessUnsharpFlag,
bool);
219 itkGetConstReferenceMacro(NormalProcessUnsharpFlag,
bool);
220 itkBooleanMacro(NormalProcessUnsharpFlag);
222 itkGetConstReferenceMacro(NormalProcessUnsharpWeight,
ValueType);
235 return static_cast<int>(std::ceil(m_CurvatureBandWidth + Self::ImageDimension));
243 unsigned int nm = std::max(this->GetMinimumNumberOfLayers(), n);
245 if (nm != this->GetNumberOfLayers())
247 Superclass::SetNumberOfLayers(nm);
257 Superclass::InitializeIteration();
258 ValueType rmschange = this->GetRMSChange();
261 if ((this->GetElapsedIterations() == 0) || (m_RefitIteration == m_MaxRefitIteration) ||
262 (rmschange <= m_RMSChangeNormalProcessTrigger) || (this->ActiveLayerCheckBand()))
264 if ((this->GetElapsedIterations() != 0) && (rmschange <= m_RMSChangeNormalProcessTrigger) &&
265 (m_RefitIteration <= 1))
267 m_ConvergenceFlag =
true;
270 m_RefitIteration = 0;
277#ifdef ITK_USE_CONCEPT_CHECKING
314 unsigned int m_RefitIteration{};
319 unsigned int m_MaxRefitIteration{};
323 unsigned int m_MaxNormalIteration{};
332 bool m_ConvergenceFlag{};
346 int m_NormalProcessType{};
354 bool m_NormalProcessUnsharpFlag{};
366#ifndef ITK_MANUAL_INSTANTIATION
367# include "itkSparseFieldFourthOrderLevelSetImageFilter.hxx"
Base class for all process objects that output image data.
TOutputImage OutputImageType
This class implements the filter for computing the normal vectors from a scalar implicit function (i....
Control indentation during Print() invocation.
This class extends the LevelSetFunction class by adding a grow term based on a target curvature store...
Defines iteration of a local N-dimensional neighborhood of pixels across an itk::Image.
This is a data storage class that can is used as the node type for the SparseImage class.
NormalBandNode * Previous
TImageType LevelSetImageType
NodeValueType m_Curvature
typename LevelSetImageType::PixelType NodeValueType
typename LevelSetImageType::IndexType IndexType
This class defines all the necessary functionality for performing isotropic and anisotropic diffusion...
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
This class implements the fourth order level set PDE framework.
void PrintSelf(std::ostream &os, Indent indent) const override
~SparseFieldFourthOrderLevelSetImageFilter() override=default
typename NodeType::NodeDataType NormalVectorType
void SetLevelSetFunction(LevelSetFunctionType *lsf)
ValueType ComputeCurvatureFromSparseImageNeighborhood(SparseImageIteratorType &it) const
bool ActiveLayerCheckBand() const
void InitializeIteration() override
void SetNumberOfLayers(const unsigned int n) override
static const ValueType m_DimConst
static const SizeValueType m_NumVertex
unsigned int GetMinimumNumberOfLayers() const
void ComputeCurvatureTarget(const OutputImageType *distanceImage, SparseImageType *sparseImage) const
SparseFieldFourthOrderLevelSetImageFilter()
This class implements a finite difference partial differential equation solver for evolving surfaces ...
typename OutputImageType::ValueType ValueType
A storage type for sparse image data.
#define itkConceptMacro(name, concept)
ImageBaseType::IndexType IndexType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType