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

Filter that interpolates a subdivision curve between control points of a contour. More...

#include <mitkContourModelSubDivisionFilter.h>

Inheritance diagram for mitk::ContourModelSubDivisionFilter:
Collaboration diagram for mitk::ContourModelSubDivisionFilter:

Public Types

typedef ContourModel OutputType
 The output data type. More...
 
typedef OutputType::Pointer OutputTypePointer
 Smart pointer type for the output. More...
 
typedef mitk::ContourModel InputType
 The input data type. More...
 
- Public Types inherited from mitk::ContourModelSource
typedef ContourModel OutputType
 The output data type produced by this source. More...
 
typedef OutputType::Pointer OutputTypePointer
 Smart pointer type for the output. More...
 
- 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 (ContourModelSubDivisionFilter, ContourModelSource)
 
Pointer Clone () const
 
void SetNumberOfIterations (int iterations)
 Set the number of subdivision iterations. More...
 
virtual void SetInput (const InputType *input)
 Set the input contour model. More...
 
virtual void SetInput (unsigned int idx, const InputType *input)
 Set the input contour model at the given index. More...
 
const InputType * GetInput (void)
 Get the first input contour model. More...
 
const InputType * GetInput (unsigned int idx)
 Get the input contour model at the given index. More...
 
- Public Member Functions inherited from mitk::ContourModelSource
 mitkClassMacro (ContourModelSource, BaseDataSource)
 
Pointer Clone () const
 
mitkBaseDataSourceGetOutputDeclarations itk::DataObject::Pointer MakeOutput (DataObjectPointerArraySizeType idx) override
 Allocate a new output object at the given index. 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::ContourModelSource
static Pointer New ()
 

Protected Member Functions

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

Protected Attributes

int m_InterpolationIterations
 

Additional Inherited Members

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

Detailed Description

Filter that interpolates a subdivision curve between control points of a contour.

Uses the Dyn-Levin-Gregory (DLG) four-point interpolation scheme to insert new vertices between existing control points:

F(2i) = C(i)
F(2i+1) = -1/16 * C(i-1) + 9/16 * C(i) + 9/16 * C(i+1) - 1/16 * C(i+2)

The number of subdivision iterations defaults to 4 and can be adjusted via SetNumberOfIterations(). At least 4 input vertices are required for the filter to produce output; otherwise the input is passed through unchanged.

See also
ContourModel, ContourModelSource, ContourModelMapper2D

Definition at line 39 of file mitkContourModelSubDivisionFilter.h.

Member Typedef Documentation

◆ InputType

◆ OutputType

◆ OutputTypePointer

Smart pointer type for the output.

Definition at line 49 of file mitkContourModelSubDivisionFilter.h.

Constructor & Destructor Documentation

◆ ContourModelSubDivisionFilter()

mitk::ContourModelSubDivisionFilter::ContourModelSubDivisionFilter ( )
protected

◆ ~ContourModelSubDivisionFilter()

mitk::ContourModelSubDivisionFilter::~ContourModelSubDivisionFilter ( )
overrideprotected

Member Function Documentation

◆ Clone()

Pointer mitk::ContourModelSubDivisionFilter::Clone ( ) const

◆ GenerateData()

void mitk::ContourModelSubDivisionFilter::GenerateData ( )
overrideprotected

◆ GenerateOutputInformation()

void mitk::ContourModelSubDivisionFilter::GenerateOutputInformation ( )
inlineoverrideprotected

Definition at line 90 of file mitkContourModelSubDivisionFilter.h.

◆ GetInput() [1/2]

const InputType* mitk::ContourModelSubDivisionFilter::GetInput ( unsigned int  idx)

Get the input contour model at the given index.

Parameters
[in]idxInput port index.
Returns
Const pointer to the input ContourModel, or nullptr if none is set.

◆ GetInput() [2/2]

const InputType* mitk::ContourModelSubDivisionFilter::GetInput ( void  )

Get the first input contour model.

Returns
Const pointer to the input ContourModel, or nullptr if none is set.

◆ mitkClassMacro()

mitk::ContourModelSubDivisionFilter::mitkClassMacro ( ContourModelSubDivisionFilter  ,
ContourModelSource   
)

◆ New()

static Pointer mitk::ContourModelSubDivisionFilter::New ( )
static

◆ SetInput() [1/2]

virtual void mitk::ContourModelSubDivisionFilter::SetInput ( const InputType *  input)
virtual

Set the input contour model.

Parameters
[in]inputThe contour model to subdivide.

◆ SetInput() [2/2]

virtual void mitk::ContourModelSubDivisionFilter::SetInput ( unsigned int  idx,
const InputType *  input 
)
virtual

Set the input contour model at the given index.

Parameters
[in]idxInput port index.
[in]inputThe contour model to subdivide.

◆ SetNumberOfIterations()

void mitk::ContourModelSubDivisionFilter::SetNumberOfIterations ( int  iterations)
inline

Set the number of subdivision iterations.

Each iteration doubles the number of vertices between control points. Default is 4.

Parameters
[in]iterationsNumber of subdivision iterations to perform.

Definition at line 60 of file mitkContourModelSubDivisionFilter.h.

Member Data Documentation

◆ m_InterpolationIterations

int mitk::ContourModelSubDivisionFilter::m_InterpolationIterations
protected

Definition at line 94 of file mitkContourModelSubDivisionFilter.h.


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