18#ifndef itkNarrowBandLevelSetImageFilter_h
19#define itkNarrowBandLevelSetImageFilter_h
143template <
typename TInputImage,
144 typename TFeatureImage,
145 typename TOutputPixelType = float,
146 typename TOutputImage = Image<TOutputPixelType, TInputImage::ImageDimension>>
159 using typename Superclass::ValueType;
161 using typename Superclass::TimeStepType;
162 using typename Superclass::InputImageType;
183 m_SegmentationFunction->SetFeatureImage(f);
187 virtual FeatureImageType *
201 virtual const typename SegmentationFunctionType::ImageType *
204 return m_SegmentationFunction->GetSpeedImage();
207 virtual const typename SegmentationFunctionType::VectorImageType *
210 return m_SegmentationFunction->GetAdvectionImage();
220 <<
"SetUseNegativeFeaturesOn has been deprecated. Please use ReverseExpansionDirectionOn() instead");
221 this->ReverseExpansionDirectionOn();
229 <<
"SetUseNegativeFeaturesOff has been deprecated. Please use ReverseExpansionDirectionOff() instead");
230 this->ReverseExpansionDirectionOff();
238 itkWarningMacro(
"SetUseNegativeFeatures has been deprecated. Please use SetReverseExpansionDirection instead");
241 this->SetReverseExpansionDirection(
false);
245 this->SetReverseExpansionDirection(
true);
254 <<
"GetUseNegativeFeatures has been deprecated. Please use GetReverseExpansionDirection() instead");
255 if (this->GetReverseExpansionDirection() ==
false)
273 itkSetMacro(ReverseExpansionDirection,
bool);
274 itkGetConstMacro(ReverseExpansionDirection,
bool);
275 itkBooleanMacro(ReverseExpansionDirection);
285 if (v != m_SegmentationFunction->GetPropagationWeight())
287 this->SetPropagationScaling(v);
289 if (v != m_SegmentationFunction->GetAdvectionWeight())
291 this->SetAdvectionScaling(v);
303 m_SegmentationFunction->SetPropagationWeight(v);
311 return m_SegmentationFunction->GetPropagationWeight();
321 m_SegmentationFunction->SetAdvectionWeight(v);
329 return m_SegmentationFunction->GetAdvectionWeight();
341 m_SegmentationFunction->SetCurvatureWeight(v);
349 return m_SegmentationFunction->GetCurvatureWeight();
360 return m_SegmentationFunction;
368 itkWarningMacro(
"SetMaximumIterations is deprecated. Please use SetNumberOfIterations instead.");
369 this->SetNumberOfIterations(i);
376 itkWarningMacro(
"GetMaximumIterations is deprecated. Please use GetNumberOfIterations instead.");
377 return this->GetNumberOfIterations();
383 itkWarningMacro(
"The current implementation of this solver does not compute maximum RMS change. The maximum RMS "
384 "error value will not be set or used.");
387#ifdef ITK_USE_CONCEPT_CHECKING
405 Superclass::InitializeIteration();
407 this->UpdateProgress(
static_cast<float>(this->GetElapsedIterations()) /
408 static_cast<float>(this->GetNumberOfIterations()));
425 bool m_ReverseExpansionDirection{};
442#ifndef ITK_MANUAL_INSTANTIATION
443# include "itkNarrowBandLevelSetImageFilter.hxx"
This class compute the signed (positive and negative) chamfer distance in a narrow band.
TInputImage InputImageType
Templated n-dimensional image class.
Control indentation during Print() invocation.
Compute an approximate distance from an interpolated isocontour to the close grid points.
Light weight base class for most itk classes.
This class implements a multi-threaded finite difference image to image solver that can be applied to...
typename OutputImageType::ValueType ValueType
A base class which defines the API for implementing a special class of image segmentation filters usi...
TFeatureImage FeatureImageType
void CreateNarrowBand() override
virtual void SetFeatureImage(const FeatureImageType *f)
virtual const SegmentationFunctionType::ImageType * GetSpeedImage() const
virtual void SetInitialImage(InputImageType *f)
virtual void SetSegmentationFunction(SegmentationFunctionType *s)
void PrintSelf(std::ostream &os, Indent indent) const override
NarrowBandLevelSetImageFilter()
ValueType GetAdvectionScaling() const
void SetMaximumRMSError(const double) override
ValueType GetCurvatureScaling() const
void SetPropagationScaling(ValueType v)
void SetUseNegativeFeaturesOff()
bool GetUseNegativeFeatures() const
virtual const SegmentationFunctionType::VectorImageType * GetAdvectionImage() const
virtual SegmentationFunctionType * GetSegmentationFunction()
ValueType GetPropagationScaling() const
typename SegmentationFunctionType::VectorImageType VectorImageType
void SetAdvectionScaling(ValueType v)
void SetMaximumIterations(unsigned int i)
virtual FeatureImageType * GetFeatureImage()
void SetUseNegativeFeaturesOn()
TOutputImage OutputImageType
void SetCurvatureScaling(ValueType v)
void SetUseNegativeFeatures(bool u)
void GenerateData() override
void InitializeIteration() override
void SetFeatureScaling(ValueType v)
unsigned int GetMaximumIterations()
~NarrowBandLevelSetImageFilter() override=default
virtual void SetNthInput(DataObjectPointerArraySizeType idx, DataObject *input)
DataObject * GetInput(const DataObjectIdentifierType &key)
Return an input.
#define itkConceptMacro(name, concept)
ImageBaseType::IndexType IndexType
bool NotExactlyEquals(const TInput1 &x1, const TInput2 &x2)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....