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 > >
185 m_SegmentationFunction->SetFeatureImage(f);
202 {
return m_SegmentationFunction->GetSpeedImage(); }
205 {
return m_SegmentationFunction->GetAdvectionImage(); }
213 <<
"SetUseNegativeFeaturesOn has been deprecated. Please use ReverseExpansionDirectionOn() instead");
214 this->ReverseExpansionDirectionOn();
221 <<
"SetUseNegativeFeaturesOff has been deprecated. Please use ReverseExpansionDirectionOff() instead");
222 this->ReverseExpansionDirectionOff();
229 itkWarningMacro(<<
"SetUseNegativeFeatures has been deprecated. Please use SetReverseExpansionDirection instead");
232 this->SetReverseExpansionDirection(
false);
236 this->SetReverseExpansionDirection(
true);
243 itkWarningMacro(<<
"GetUseNegativeFeatures has been deprecated. Please use GetReverseExpansionDirection() instead");
244 if ( this->GetReverseExpansionDirection() ==
false )
262 itkSetMacro(ReverseExpansionDirection,
bool);
263 itkGetConstMacro(ReverseExpansionDirection,
bool);
264 itkBooleanMacro(ReverseExpansionDirection);
273 if ( v != m_SegmentationFunction->GetPropagationWeight() )
275 this->SetPropagationScaling(v);
277 if ( v != m_SegmentationFunction->GetAdvectionWeight() )
279 this->SetAdvectionScaling(v);
290 m_SegmentationFunction->SetPropagationWeight(v);
297 return m_SegmentationFunction->GetPropagationWeight();
306 m_SegmentationFunction->SetAdvectionWeight(v);
313 return m_SegmentationFunction->GetAdvectionWeight();
324 m_SegmentationFunction->SetCurvatureWeight(v);
331 return m_SegmentationFunction->GetCurvatureWeight();
336 virtual void SetSegmentationFunction(SegmentationFunctionType *s);
339 {
return m_SegmentationFunction; }
345 itkWarningMacro(
"SetMaximumIterations is deprecated. Please use SetNumberOfIterations instead.");
346 this->SetNumberOfIterations(i);
352 itkWarningMacro(
"GetMaximumIterations is deprecated. Please use GetNumberOfIterations instead.");
353 return this->GetNumberOfIterations();
359 "The current implmentation of this solver does not compute maximum RMS change. The maximum RMS error value will not be set or used.");
362 #ifdef ITK_USE_CONCEPT_CHECKING
373 void PrintSelf(std::ostream & os,
Indent indent)
const override;
379 Superclass::InitializeIteration();
381 this->UpdateProgress( (
float)( (
float)this->GetElapsedIterations()
382 / (
float)this->GetNumberOfIterations() ) );
389 void CreateNarrowBand()
override;
393 void GenerateData()
override;
416 #ifndef ITK_MANUAL_INSTANTIATION
417 #include "itkNarrowBandLevelSetImageFilter.hxx"
virtual FeatureImageType * GetFeatureImage()
virtual const SegmentationFunctionType::VectorImageType * GetAdvectionImage() const
Light weight base class for most itk classes.
void SetCurvatureScaling(ValueType v)
virtual void SetInitialImage(InputImageType *f)
typename OutputImageType::ValueType ValueType
ValueType GetCurvatureScaling() const
Compute an approximate distance from an interpolated isocontour to the close grid points...
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()
TInputImage InputImageType
ChamferFilterType::Pointer m_ChamferFilter
void SetPropagationScaling(ValueType v)
ValueType GetPropagationScaling() const
typename Superclass::ImageType ImageType
ImageBaseType::IndexType IndexType
void SetMaximumRMSError(const double) override
IsoFilterType::Pointer m_IsoFilter
unsigned int GetMaximumIterations()
void SetFeatureScaling(ValueType v)
bool NotExactlyEquals(const TInput1 &x1, const TInput2 &x2)
TFeatureImage FeatureImageType
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...
typename OutputImageType::IndexType IndexType
bool m_ReverseExpansionDirection
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.
SegmentationFunctionType * m_SegmentationFunction
void InitializeIteration() override
void SetUseNegativeFeaturesOff()
virtual void SetNthInput(DataObjectPointerArraySizeType num, DataObject *input)
typename SegmentationFunctionType::VectorImageType VectorImageType
#define itkConceptMacro(name, concept)
typename FiniteDifferenceFunctionType::TimeStepType TimeStepType
Templated n-dimensional image class.
void SetMaximumIterations(unsigned int i)
virtual SegmentationFunctionType * GetSegmentationFunction()