18 #ifndef itkSegmentationLevelSetImageFilter_h
19 #define itkSegmentationLevelSetImageFilter_h
143 template<
typename TInputImage,
144 typename TFeatureImage,
145 typename TOutputPixelType =
float >
148 TInputImage::ImageDimension > >
189 itkWarningMacro(
"SetMaximumIterations is deprecated. Please use SetNumberOfIterations instead.");
190 this->SetNumberOfIterations(i);
196 itkWarningMacro(
"GetMaximumIterations is deprecated. Please use GetNumberOfIterations instead.");
197 return this->GetNumberOfIterations();
205 m_SegmentationFunction->SetFeatureImage(f);
222 this->SetFeatureImage(input);
229 { m_SegmentationFunction->SetSpeedImage(s); }
235 { m_SegmentationFunction->SetAdvectionImage(v); }
240 {
return m_SegmentationFunction->GetSpeedImage(); }
245 {
return m_SegmentationFunction->GetAdvectionImage(); }
253 <<
"SetUseNegativeFeaturesOn has been deprecated. Please use ReverseExpansionDirectionOn() instead");
254 this->ReverseExpansionDirectionOn();
261 <<
"SetUseNegativeFeaturesOff has been deprecated. Please use ReverseExpansionDirectionOff() instead");
262 this->ReverseExpansionDirectionOff();
269 itkWarningMacro(<<
"SetUseNegativeFeatures has been deprecated. Please use SetReverseExpansionDirection instead");
272 this->SetReverseExpansionDirection(
false);
276 this->SetReverseExpansionDirection(
true);
283 itkWarningMacro(<<
"GetUseNegativeFeatures has been deprecated. Please use GetReverseExpansionDirection() instead");
284 if ( m_ReverseExpansionDirection ==
false )
302 itkSetMacro(ReverseExpansionDirection,
bool);
303 itkGetConstMacro(ReverseExpansionDirection,
bool);
304 itkBooleanMacro(ReverseExpansionDirection);
312 itkSetMacro(AutoGenerateSpeedAdvection,
bool);
313 itkGetConstMacro(AutoGenerateSpeedAdvection,
bool);
314 itkBooleanMacro(AutoGenerateSpeedAdvection);
325 this->SetPropagationScaling(v);
329 this->SetAdvectionScaling(v);
340 m_SegmentationFunction->SetPropagationWeight(v);
348 return m_SegmentationFunction->GetPropagationWeight();
357 m_SegmentationFunction->SetAdvectionWeight(v);
365 return m_SegmentationFunction->GetAdvectionWeight();
376 m_SegmentationFunction->SetCurvatureWeight(v);
384 return m_SegmentationFunction->GetCurvatureWeight();
390 if ( m_SegmentationFunction->GetUseMinimalCurvature() != b )
392 m_SegmentationFunction->SetUseMinimalCurvature(b);
400 return m_SegmentationFunction->GetUseMinimalCurvature();
405 this->SetUseMinimalCurvature(
true);
410 this->SetUseMinimalCurvature(
false);
420 m_SegmentationFunction = s;
426 this->SetDifferenceFunction(m_SegmentationFunction);
431 {
return m_SegmentationFunction; }
439 if ( n != m_SegmentationFunction->GetMaximumCurvatureTimeStep() )
441 m_SegmentationFunction->SetMaximumCurvatureTimeStep(n);
449 return m_SegmentationFunction->GetMaximumCurvatureTimeStep();
458 if ( n != m_SegmentationFunction->GetMaximumPropagationTimeStep() )
460 m_SegmentationFunction->SetMaximumPropagationTimeStep(n);
468 return m_SegmentationFunction->GetMaximumPropagationTimeStep();
474 void GenerateSpeedImage();
479 void GenerateAdvectionImage();
481 #ifdef ITK_USE_CONCEPT_CHECKING
492 virtual void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
497 Superclass::InitializeIteration();
499 this->UpdateProgress( (
float)( (
float)this->GetElapsedIterations()
500 / (
float)this->GetNumberOfIterations() ) );
506 void GenerateData() ITK_OVERRIDE;
510 bool m_ReverseExpansionDirection;
516 bool m_AutoGenerateSpeedAdvection;
525 #ifndef ITK_MANUAL_INSTANTIATION
526 #include "itkSegmentationLevelSetImageFilter.hxx"
virtual void PrintSelf(std::ostream &os, Indent indent) const override
SmartPointer< const Self > ConstPointer
void SetMaximumPropagationTimeStep(double n)
void SetUseNegativeFeaturesOn()
double GetMaximumCurvatureTimeStep() const
SegmentationFunctionType::VectorImageType VectorImageType
virtual FeatureImageType * GetFeatureImage()
virtual void SetFeatureImage(const FeatureImageType *f)
ValueType GetAdvectionScaling() const
void UseMinimalCurvatureOff()
SegmentationLevelSetImageFilter Self
Superclass::ImageType ImageType
Superclass::IndexType IndexType
bool GetUseMinimalCurvature() const
double GetMaximumPropagationTimeStep() const
void SetAdvectionImage(VectorImageType *v)
Superclass::RadiusType RadiusType
SegmentationLevelSetFunction< OutputImageType, FeatureImageType > SegmentationFunctionType
void SetUseNegativeFeatures(bool u)
This class implements a finite difference partial differential equation solver for evolving surfaces ...
SparseFieldLevelSetImageFilter< TInputImage, OutputImageType > Superclass
Superclass::InputImageType InputImageType
SmartPointer< Self > Pointer
void SetUseMinimalCurvature(bool b)
void SetMaximumIterations(unsigned int i)
void SetMaximumCurvatureTimeStep(double n)
void SetPropagationScaling(ValueType v)
void SetFeatureScaling(ValueType v)
ValueType GetPropagationScaling() const
virtual ~SegmentationLevelSetImageFilter()
TFeatureImage FeatureImageType
Superclass::TimeStepType TimeStepType
virtual void SetSegmentationFunction(SegmentationFunctionType *s)
Image< TOutputPixelType, itkGetStaticConstMacro(InputImageDimension) > OutputImageType
virtual const SpeedImageType * GetSpeedImage() const
SegmentationFunctionType::ImageType SpeedImageType
bool NotExactlyEquals(const TInput1 &x1, const TInput2 &x2)
virtual SegmentationFunctionType * GetSegmentationFunction()
void SetSpeedImage(SpeedImageType *s)
DataObject * GetInput(const DataObjectIdentifierType &key)
Return an input.
virtual void InitializeIteration() override
void SetAdvectionScaling(ValueType v)
Superclass::ValueType ValueType
virtual void SetInitialImage(InputImageType *f)
Control indentation during Print() invocation.
bool GetUseNegativeFeatures() const
ValueType GetCurvatureScaling() const
unsigned int GetMaximumIterations()
virtual void Initialize(const RadiusType &r) override
void SetUseNegativeFeaturesOff()
virtual void SetNthInput(DataObjectPointerArraySizeType num, DataObject *input)
#define itkConceptMacro(name, concept)
virtual const VectorImageType * GetAdvectionImage() const
void SetInput2(const FeatureImageType *input)
A base class which defines the API for implementing a special class of image segmentation filters usi...
Templated n-dimensional image class.
void SetCurvatureScaling(ValueType v)
void UseMinimalCurvatureOn()