18 #ifndef itkSparseFieldFourthOrderLevelSetImageFilter_h
19 #define itkSparseFieldFourthOrderLevelSetImageFilter_h
37 template<
typename TImageType >
53 TImageType ::ImageDimension >;
67 m_ManifoldNormal[TImageType::ImageDimension];
155 template<
typename TInputImage,
typename TOutputImage >
174 static constexpr
unsigned int ImageDimension = Superclass::ImageDimension;
190 Self::ImageDimension >;
212 itkGetConstReferenceMacro(MaxRefitIteration,
unsigned int);
213 itkSetMacro(MaxRefitIteration,
unsigned int);
214 itkGetConstReferenceMacro(MaxNormalIteration,
unsigned int);
215 itkSetMacro(MaxNormalIteration,
unsigned int);
216 itkGetConstReferenceMacro(CurvatureBandWidth,
ValueType);
217 itkSetMacro(CurvatureBandWidth,
ValueType);
218 itkGetConstReferenceMacro(RMSChangeNormalProcessTrigger,
ValueType);
219 itkSetMacro(RMSChangeNormalProcessTrigger,
ValueType);
220 itkGetConstReferenceMacro(NormalProcessType,
int);
221 itkSetMacro(NormalProcessType,
int);
222 itkGetConstReferenceMacro(NormalProcessConductance,
ValueType);
223 itkSetMacro(NormalProcessConductance,
ValueType);
224 itkSetMacro(NormalProcessUnsharpFlag,
bool);
225 itkGetConstReferenceMacro(NormalProcessUnsharpFlag,
bool);
226 itkSetMacro(NormalProcessUnsharpWeight,
ValueType);
227 itkGetConstReferenceMacro(NormalProcessUnsharpWeight,
ValueType);
238 return (
int)std::ceil( m_CurvatureBandWidth
239 + Self::ImageDimension );
246 unsigned int nm = std::max (this->GetMinimumNumberOfLayers (), n);
248 if ( nm != this->GetNumberOfLayers() )
250 Superclass::SetNumberOfLayers (nm);
259 Superclass::InitializeIteration();
260 ValueType rmschange = this->GetRMSChange();
263 if ( ( this->GetElapsedIterations() == 0 )
264 || ( m_RefitIteration == m_MaxRefitIteration )
265 || ( rmschange <= m_RMSChangeNormalProcessTrigger )
266 || ( this->ActiveLayerCheckBand() ) )
268 if ( ( this->GetElapsedIterations() != 0 )
269 && ( rmschange <= m_RMSChangeNormalProcessTrigger )
270 && ( m_RefitIteration <= 1 ) )
272 m_ConvergenceFlag =
true;
275 m_RefitIteration = 0;
282 #ifdef ITK_USE_CONCEPT_CHECKING
292 void PrintSelf(std::ostream & os,
Indent indent)
const override;
296 ValueType ComputeCurvatureFromSparseImageNeighborhood
297 (SparseImageIteratorType & neighborhood)
const;
302 void ComputeCurvatureTarget(
const OutputImageType *distanceImage,
303 SparseImageType *sparseImage)
const;
306 void ProcessNormals();
312 bool ActiveLayerCheckBand()
const;
370 #ifndef ITK_MANUAL_INSTANTIATION
371 #include "itkSparseFieldFourthOrderLevelSetImageFilter.hxx"
typename NodeType::NodeDataType NormalVectorType
typename FiniteDifferenceFunctionType::NeighborhoodScalesType NeighborhoodScalesType
unsigned long SizeValueType
LevelSetFunctionType * m_LevelSetFunction
unsigned int m_MaxNormalIteration
ValueType m_CurvatureBandWidth
This class implements the filter for computing the normal vectors from a scalar implicit function (i...
typename OutputImageType::ValueType ValueType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
ValueType m_NormalProcessConductance
This class implements a finite difference partial differential equation solver for evolving surfaces ...
A storage type for sparse image data.
typename Superclass::LayerType LayerType
This is a data storage class that can is used as the node type for the SparseImage class...
This class implements the fourth order level set PDE framework.
This class defines all the necessary functionality for performing isotropic and anisotropic diffusion...
ImageBaseType::IndexType IndexType
TOutputImage OutputImageType
TImageType LevelSetImageType
bool m_NormalProcessUnsharpFlag
typename Superclass::IndexType IndexType
void InitializeIteration() override
typename Superclass::ValueType ValueType
typename LevelSetImageType::PixelType NodeValueType
static const ValueType m_DimConst
unsigned int m_RefitIteration
This class extends the LevelSetFunction class by adding a grow term based on a target curvature store...
typename LevelSetImageType::IndexType IndexType
Control indentation during Print() invocation.
unsigned int m_MaxRefitIteration
unsigned int GetMinimumNumberOfLayers() const
static const SizeValueType m_NumVertex
void SetNumberOfLayers(const unsigned int n) override
ValueType m_NormalProcessUnsharpWeight
typename FiniteDifferenceFunctionType::RadiusType RadiusType
NormalBandNode * Previous
#define itkConceptMacro(name, concept)
Defines iteration of a local N-dimensional neighborhood of pixels across an itk::Image.
NodeValueType m_Curvature
ValueType m_RMSChangeNormalProcessTrigger