18 #ifndef itkNarrowBandLevelSetImageFilter_h
19 #define itkNarrowBandLevelSetImageFilter_h
143 template<
typename TInputImage,
144 typename TFeatureImage,
145 typename TOutputPixelType = float,
146 typename TOutputImage = Image< TOutputPixelType,
147 TInputImage::ImageDimension > >
184 m_SegmentationFunction->SetFeatureImage(f);
201 {
return m_SegmentationFunction->GetSpeedImage(); }
204 {
return m_SegmentationFunction->GetAdvectionImage(); }
212 <<
"SetUseNegativeFeaturesOn has been deprecated. Please use ReverseExpansionDirectionOn() instead");
213 this->ReverseExpansionDirectionOn();
220 <<
"SetUseNegativeFeaturesOff has been deprecated. Please use ReverseExpansionDirectionOff() instead");
221 this->ReverseExpansionDirectionOff();
228 itkWarningMacro(<<
"SetUseNegativeFeatures has been deprecated. Please use SetReverseExpansionDirection instead");
231 this->SetReverseExpansionDirection(
false);
235 this->SetReverseExpansionDirection(
true);
242 itkWarningMacro(<<
"GetUseNegativeFeatures has been deprecated. Please use GetReverseExpansionDirection() instead");
243 if ( this->GetReverseExpansionDirection() ==
false )
261 itkSetMacro(ReverseExpansionDirection,
bool);
262 itkGetConstMacro(ReverseExpansionDirection,
bool);
263 itkBooleanMacro(ReverseExpansionDirection);
272 if ( v != m_SegmentationFunction->GetPropagationWeight() )
274 this->SetPropagationScaling(v);
276 if ( v != m_SegmentationFunction->GetAdvectionWeight() )
278 this->SetAdvectionScaling(v);
289 m_SegmentationFunction->SetPropagationWeight(v);
296 return m_SegmentationFunction->GetPropagationWeight();
305 m_SegmentationFunction->SetAdvectionWeight(v);
312 return m_SegmentationFunction->GetAdvectionWeight();
323 m_SegmentationFunction->SetCurvatureWeight(v);
330 return m_SegmentationFunction->GetCurvatureWeight();
335 virtual void SetSegmentationFunction(SegmentationFunctionType *s);
338 {
return m_SegmentationFunction; }
344 itkWarningMacro(
"SetMaximumIterations is deprecated. Please use SetNumberOfIterations instead.");
345 this->SetNumberOfIterations(i);
351 itkWarningMacro(
"GetMaximumIterations is deprecated. Please use GetNumberOfIterations instead.");
352 return this->GetNumberOfIterations();
358 "The current implmentation of this solver does not compute maximum RMS change. The maximum RMS error value will not be set or used.");
361 #ifdef ITK_USE_CONCEPT_CHECKING
372 virtual void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
378 Superclass::InitializeIteration();
380 this->UpdateProgress( (
float)( (
float)this->GetElapsedIterations()
381 / (
float)this->GetNumberOfIterations() ) );
388 virtual void CreateNarrowBand() ITK_OVERRIDE;
392 void GenerateData() ITK_OVERRIDE;
396 bool m_ReverseExpansionDirection;
417 #ifndef ITK_MANUAL_INSTANTIATION
418 #include "itkNarrowBandLevelSetImageFilter.hxx"
virtual void SetMaximumRMSError(const double) override
virtual FeatureImageType * GetFeatureImage()
Superclass::InputImageType InputImageType
SmartPointer< const Self > ConstPointer
virtual const SegmentationFunctionType::VectorImageType * GetAdvectionImage() const
void SetCurvatureScaling(ValueType v)
virtual void SetInitialImage(InputImageType *f)
Superclass::ImageType ImageType
ValueType GetCurvatureScaling() const
Superclass::TimeStepType TimeStepType
Compute an approximate distance from an interpolated isocontour to the close grid points...
SegmentationFunctionType::VectorImageType VectorImageType
SegmentationLevelSetFunction< OutputImageType, FeatureImageType > SegmentationFunctionType
virtual const SegmentationFunctionType::ImageType * GetSpeedImage() const
void SetAdvectionScaling(ValueType v)
This class compute the signed (positive and negative) chamfer distance in a narrow band...
void SetUseNegativeFeaturesOn()
void SetPropagationScaling(ValueType v)
virtual void InitializeIteration() override
ValueType GetPropagationScaling() const
NarrowBandImageFilterBase< TInputImage, TOutputImage > Superclass
TInputImage InputImageType
TOutputImage OutputImageType
unsigned int GetMaximumIterations()
NarrowBandLevelSetImageFilter Self
void SetFeatureScaling(ValueType v)
Superclass::IndexType IndexType
Superclass::ValueType ValueType
bool NotExactlyEquals(const TInput1 &x1, const TInput2 &x2)
DataObject * GetInput(const DataObjectIdentifierType &key)
Return an input.
virtual void SetFeatureImage(const FeatureImageType *f)
This class implements a multi-threaded finite difference image to image solver that can be applied to...
void SetUseNegativeFeatures(bool u)
bool GetUseNegativeFeatures() const
ValueType GetAdvectionScaling() const
A base class which defines the API for implementing a special class of image segmentation filters usi...
Control indentation during Print() invocation.
virtual ~NarrowBandLevelSetImageFilter() override
void SetUseNegativeFeaturesOff()
virtual void SetNthInput(DataObjectPointerArraySizeType num, DataObject *input)
OutputImageType::ValueType ValueType
#define itkConceptMacro(name, concept)
SmartPointer< Self > Pointer
TFeatureImage FeatureImageType
Templated n-dimensional image class.
void SetMaximumIterations(unsigned int i)
ImageBaseType::IndexType IndexType
virtual SegmentationFunctionType * GetSegmentationFunction()