17 #ifndef __itkSparseFieldFourthOrderLevelSetImageFilter_h
18 #define __itkSparseFieldFourthOrderLevelSetImageFilter_h
36 template <
class TImageType>
47 typedef typename LevelSetImageType::IndexType
IndexType;
153 template <
class TInputImage,
class TOutputImage>
169 itkStaticConstMacro(ImageDimension,
unsigned int,Superclass::ImageDimension);
208 itkGetConstReferenceMacro(MaxRefitIteration,
unsigned int);
209 itkSetMacro(MaxRefitIteration,
unsigned int);
210 itkGetConstReferenceMacro(MaxNormalIteration,
unsigned int);
211 itkSetMacro(MaxNormalIteration,
unsigned int);
212 itkGetConstReferenceMacro(CurvatureBandWidth,
ValueType);
213 itkSetMacro(CurvatureBandWidth,
ValueType);
214 itkGetConstReferenceMacro(RMSChangeNormalProcessTrigger,
ValueType);
215 itkSetMacro(RMSChangeNormalProcessTrigger,
ValueType);
216 itkGetConstReferenceMacro(NormalProcessType,
int);
217 itkSetMacro(NormalProcessType,
int);
218 itkGetConstReferenceMacro(NormalProcessConductance,
ValueType);
219 itkSetMacro(NormalProcessConductance,
ValueType);
220 itkSetMacro(NormalProcessUnsharpFlag,
bool);
221 itkGetConstReferenceMacro(NormalProcessUnsharpFlag,
bool);
222 itkSetMacro(NormalProcessUnsharpWeight,
ValueType);
223 itkGetConstReferenceMacro(NormalProcessUnsharpWeight,
ValueType);
232 unsigned int GetMinimumNumberOfLayers()
const
234 return (
int)vcl_ceil(m_CurvatureBandWidth+
235 itkGetStaticConstMacro(ImageDimension));
240 virtual void SetNumberOfLayers(
const unsigned int n )
242 unsigned int nm = vnl_math_max (this->GetMinimumNumberOfLayers (), n );
243 if (nm != this->GetNumberOfLayers())
245 Superclass::SetNumberOfLayers (nm);
252 virtual void InitializeIteration()
254 Superclass::InitializeIteration();
255 ValueType rmschange = this->GetRMSChange();
257 if ( ( this->GetElapsedIterations() == 0 ) ||
258 ( m_RefitIteration == m_MaxRefitIteration ) ||
259 ( rmschange <= m_RMSChangeNormalProcessTrigger ) ||
260 ( this->ActiveLayerCheckBand() ) )
262 if ( ( this->GetElapsedIterations() != 0 ) &&
263 ( rmschange <= m_RMSChangeNormalProcessTrigger ) &&
264 ( m_RefitIteration <= 1) )
266 m_ConvergenceFlag =
true;
269 m_RefitIteration = 0;
276 #ifdef ITK_USE_CONCEPT_CHECKING
286 virtual void PrintSelf(std::ostream& os,
Indent indent)
const;
291 ValueType ComputeCurvatureFromSparseImageNeighborhood
292 ( SparseImageIteratorType &neighborhood )
const;
297 void ComputeCurvatureTarget(
const OutputImageType *distanceImage,
298 SparseImageType *sparseImage )
const;
301 void ProcessNormals();
307 bool ActiveLayerCheckBand()
const;
364 void operator=(
const Self&);
369 #ifndef ITK_MANUAL_INSTANTIATION