18 #ifndef itkSparseFieldFourthOrderLevelSetImageFilter_h
19 #define itkSparseFieldFourthOrderLevelSetImageFilter_h
37 template<
typename TImageType >
53 TImageType ::ImageDimension >
68 m_ManifoldNormal[TImageType::ImageDimension];
156 template<
typename TInputImage,
typename TOutputImage >
173 itkStaticConstMacro(ImageDimension,
unsigned int, Superclass::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 + itkGetStaticConstMacro(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 virtual void PrintSelf(std::ostream & os,
Indent indent)
const ITK_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;
371 #ifndef ITK_MANUAL_INSTANTIATION
372 #include "itkSparseFieldFourthOrderLevelSetImageFilter.hxx"
Vector< NodeValueType, TImageType::ImageDimension > NodeDataType
ImplicitManifoldNormalVectorFilter< OutputImageType, SparseImageType > NormalVectorFilterType
Superclass::IndexType IndexType
Superclass::LayerType LayerType
SparseFieldLevelSetImageFilter< TInputImage, TOutputImage > Superclass
NeighborhoodIterator< SparseImageType > SparseImageIteratorType
~SparseFieldFourthOrderLevelSetImageFilter() override
NodeType::NodeDataType NormalVectorType
NormalBandNode< OutputImageType > NodeType
SmartPointer< Self > Pointer
LevelSetFunctionType * m_LevelSetFunction
Superclass::OutputImageType OutputImageType
unsigned int m_MaxNormalIteration
ValueType m_CurvatureBandWidth
This class implements the filter for computing the normal vectors from a scalar implicit function (i...
Superclass::RadiusType RadiusType
TImageType LevelSetImageType
SparseImage< NodeType, itkGetStaticConstMacro(ImageDimension) > SparseImageType
OutputImageType::ValueType ValueType
ValueType m_NormalProcessConductance
unsigned long SizeValueType
This class implements a finite difference partial differential equation solver for evolving surfaces ...
LevelSetImageType::IndexType IndexType
A storage type for sparse image data.
Superclass::NeighborhoodScalesType NeighborhoodScalesType
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.
NormalVectorDiffusionFunction< SparseImageType > NormalVectorFunctionType
This class defines all the necessary functionality for performing isotropic and anisotropic diffusion...
A templated class holding a n-Dimensional vector.
Superclass::ValueType ValueType
bool m_NormalProcessUnsharpFlag
LevelSetImageType::PixelType NodeValueType
SmartPointer< const Self > ConstPointer
LevelSetFunctionWithRefitTerm< OutputImageType, SparseImageType > LevelSetFunctionType
static const ValueType m_DimConst
unsigned int m_RefitIteration
virtual void SetNumberOfLayers(const unsigned int n) override
This class extends the LevelSetFunction class by adding a grow term based on a target curvature store...
Control indentation during Print() invocation.
unsigned int m_MaxRefitIteration
unsigned int GetMinimumNumberOfLayers() const
static const SizeValueType m_NumVertex
ValueType m_NormalProcessUnsharpWeight
SparseFieldFourthOrderLevelSetImageFilter Self
TOutputImage OutputImageType
virtual void InitializeIteration() override
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
ImageBaseType::IndexType IndexType