Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::ReduceContourSetFilter Class Reference

A filter that reduces the number of points of contours represented by a mitk::Surface. More...

#include <mitkReduceContourSetFilter.h>

Inheritance diagram for mitk::ReduceContourSetFilter:
Collaboration diagram for mitk::ReduceContourSetFilter:

Classes

struct  LineSegment
 

Public Types

enum  Reduction_Type { NTH_POINT , DOUGLAS_PEUCKER }
 
- Public Types inherited from mitk::SurfaceToSurfaceFilter
typedef itk::DataObject::Pointer DataObjectPointer
 
- Public Types inherited from mitk::SurfaceSource
typedef Surface OutputType
 
- Public Types inherited from mitk::BaseDataSource
typedef BaseData OutputType
 Output data type. More...
 
typedef itk::DataObject::DataObjectIdentifierType DataObjectIdentifierType
 Identifier type for named data objects. More...
 

Public Member Functions

 mitkClassMacro (ReduceContourSetFilter, SurfaceToSurfaceFilter)
 
Pointer Clone () const
 
virtual void SetMinSpacing (double _arg)
 
virtual void SetMaxSpacing (double _arg)
 
virtual void SetReductionType (Reduction_Type _arg)
 
virtual void SetStepSize (unsigned int _arg)
 
virtual void SetTolerance (double _arg)
 
virtual unsigned int GetNumberOfPointsAfterReduction ()
 
void Reset ()
 
void SetUseProgressBar (bool)
 Set whether the mitkProgressBar should be used. More...
 
void SetInput (const mitk::Surface *surface) override
 Set the input surface at index 0. More...
 
void SetInput (unsigned int idx, const mitk::Surface *surface) override
 Set the input surface at the given index. More...
 
void SetProgressStepSize (unsigned int stepSize)
 Set the stepsize which the progress bar should proceed. More...
 
- Public Member Functions inherited from mitk::SurfaceToSurfaceFilter
 mitkClassMacro (SurfaceToSurfaceFilter, mitk::SurfaceSource)
 
Pointer Clone () const
 
virtual const mitk::Surface * GetInput ()
 Get the input surface at index 0. More...
 
virtual const mitk::Surface * GetInput (unsigned int idx)
 Get the input surface at the given index. More...
 
virtual void CreateOutputForInput (unsigned int idx)
 Create a new output for the input at the given index. More...
 
virtual void CreateOutputsForAllInputs ()
 Create outputs for all existing inputs. More...
 
virtual void RemoveInputs (mitk::Surface *surface)
 Remove all inputs matching the given surface. More...
 
- Public Member Functions inherited from mitk::SurfaceSource
 mitkClassMacro (SurfaceSource, BaseDataSource)
 
Pointer Clone () const
 
mitkBaseDataSourceGetOutputDeclarations itk::DataObject::Pointer MakeOutput (DataObjectPointerArraySizeType idx) override
 Allocate a new output object and return it. More...
 
itk::DataObject::Pointer MakeOutput (const DataObjectIdentifierType &name) override
 Allocate a new output object by name. More...
 
- Public Member Functions inherited from mitk::BaseDataSource
 mitkClassMacroItkParent (BaseDataSource, itk::ProcessObject)
 
OutputType * GetOutput ()
 
const OutputType * GetOutput () const
 
OutputType * GetOutput (DataObjectPointerArraySizeType idx)
 
const OutputType * GetOutput (DataObjectPointerArraySizeType idx) const
 
virtual void GraftOutput (OutputType *output)
 Graft the specified BaseData onto this BaseDataSource's output. More...
 
virtual void GraftOutput (const DataObjectIdentifierType &key, OutputType *output)
 Graft the specified base data object onto a named output. More...
 
virtual void GraftNthOutput (unsigned int idx, OutputType *output)
 Graft the specified base data object onto this BaseDataSource's idx'th output. More...
 
bool Updating () const
 Check whether the pipeline is currently executing. More...
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from mitk::SurfaceToSurfaceFilter
static Pointer New ()
 
- Static Public Member Functions inherited from mitk::SurfaceSource
static Pointer New ()
 

Protected Member Functions

 ReduceContourSetFilter ()
 
 ~ReduceContourSetFilter () override
 
void GenerateData () override
 
void GenerateOutputInformation () override
 
- Protected Member Functions inherited from mitk::SurfaceToSurfaceFilter
 SurfaceToSurfaceFilter ()
 
 ~SurfaceToSurfaceFilter () override
 
- Protected Member Functions inherited from mitk::SurfaceSource
 SurfaceSource ()
 
 ~SurfaceSource () override
 
- Protected Member Functions inherited from mitk::BaseDataSource
 BaseDataSource ()
 Constructor. More...
 
 ~BaseDataSource () override
 Destructor. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from mitk::BaseDataSource
static Pointer New ()
 

Detailed Description

A filter that reduces the number of points of contours represented by a mitk::Surface.

The type of the reduction can be set via SetReductionType. The two ways provided by this filter is the

  • NTH_POINT Algorithm which reduces the contours according to a certain stepsize
  • DOUGLAS_PEUCKER Algorithm which incorpates an error tolerance into the reduction.

Stepsize and error tolerance can be set via SetStepSize and SetTolerance.

Additional if more than one input contour is provided this filter tries detect contours which occur just because of an intersection. These intersection contours are eliminated. In oder to ensure a correct elimination the min and max spacing of the original image must be provided.

The output is a mitk::Surface.

Author
fetzer

Definition at line 52 of file mitkReduceContourSetFilter.h.

Member Enumeration Documentation

◆ Reduction_Type

Enumerator
NTH_POINT 
DOUGLAS_PEUCKER 

Definition at line 55 of file mitkReduceContourSetFilter.h.

Constructor & Destructor Documentation

◆ ReduceContourSetFilter()

mitk::ReduceContourSetFilter::ReduceContourSetFilter ( )
protected

◆ ~ReduceContourSetFilter()

mitk::ReduceContourSetFilter::~ReduceContourSetFilter ( )
overrideprotected

Member Function Documentation

◆ Clone()

Pointer mitk::ReduceContourSetFilter::Clone ( ) const

◆ GenerateData()

void mitk::ReduceContourSetFilter::GenerateData ( )
overrideprotected

◆ GenerateOutputInformation()

void mitk::ReduceContourSetFilter::GenerateOutputInformation ( )
overrideprotected

◆ GetNumberOfPointsAfterReduction()

virtual unsigned int mitk::ReduceContourSetFilter::GetNumberOfPointsAfterReduction ( )
virtual

◆ mitkClassMacro()

mitk::ReduceContourSetFilter::mitkClassMacro ( ReduceContourSetFilter  ,
SurfaceToSurfaceFilter   
)

◆ New()

static Pointer mitk::ReduceContourSetFilter::New ( )
static

◆ Reset()

void mitk::ReduceContourSetFilter::Reset ( )

◆ SetInput() [1/2]

void mitk::ReduceContourSetFilter::SetInput ( const mitk::Surface *  surface)
overridevirtual

Set the input surface at index 0.

Parameters
[in]surfacethe input surface.

Reimplemented from mitk::SurfaceToSurfaceFilter.

◆ SetInput() [2/2]

void mitk::ReduceContourSetFilter::SetInput ( unsigned int  idx,
const mitk::Surface *  surface 
)
overridevirtual

Set the input surface at the given index.

Also calls CreateOutputForInput(idx) to create a corresponding output.

Note
The inputs must be added sequentially.
Parameters
[in]idxthe index of the input, which must be incremental.
[in]surfacethe input surface to add.

Reimplemented from mitk::SurfaceToSurfaceFilter.

◆ SetMaxSpacing()

virtual void mitk::ReduceContourSetFilter::SetMaxSpacing ( double  _arg)
virtual

◆ SetMinSpacing()

virtual void mitk::ReduceContourSetFilter::SetMinSpacing ( double  _arg)
virtual

◆ SetProgressStepSize()

void mitk::ReduceContourSetFilter::SetProgressStepSize ( unsigned int  stepSize)

Set the stepsize which the progress bar should proceed.

Parameter The stepsize for progressing

◆ SetReductionType()

virtual void mitk::ReduceContourSetFilter::SetReductionType ( Reduction_Type  _arg)
virtual

◆ SetStepSize()

virtual void mitk::ReduceContourSetFilter::SetStepSize ( unsigned int  _arg)
virtual

◆ SetTolerance()

virtual void mitk::ReduceContourSetFilter::SetTolerance ( double  _arg)
virtual

◆ SetUseProgressBar()

void mitk::ReduceContourSetFilter::SetUseProgressBar ( bool  )

Set whether the mitkProgressBar should be used.

Parameter true for using the progress bar, false otherwise


The documentation for this class was generated from the following file: