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

A time-resolved contour representation consisting of linked vertices in 3D space. More...

#include <mitkContourModel.h>

Inheritance diagram for mitk::ContourModel:
Collaboration diagram for mitk::ContourModel:

Public Types

enum  LineSegmentInterpolation { LINEAR , B_SPLINE }
 Interpolation mode for line segments between control points. More...
 
typedef ContourElement::VertexType VertexType
 
typedef ContourElement::VertexListType VertexListType
 
typedef ContourElement::VertexIterator VertexIterator
 
typedef ContourElement::ConstVertexIterator ConstVertexIterator
 
typedef std::vector< ContourElement::Pointer > ContourModelSeries
 
- Public Types inherited from mitk::Identifiable
using UIDType = std::string
 Type alias for unique identifiers. More...
 

Public Member Functions

 mitkClassMacro (ContourModel, BaseData)
 
Pointer Clone () const
 
VertexType * GetSelectedVertex ()
 Get the currently selected vertex. More...
 
void Deselect ()
 Clear the current vertex selection. More...
 
void SetSelectedVertexAsControlPoint (bool isControlPoint=true)
 Set or clear the control point flag on the currently selected vertex. More...
 
void SetLineSegmentInterpolation (LineSegmentInterpolation interpolation)
 Set the interpolation mode for line segments between control points. More...
 
LineSegmentInterpolation GetLineSegmentInterpolation ()
 Get the current interpolation mode for line segments between control points. More...
 
void AddVertex (const Point3D &vertex, TimeStepType timestep=0)
 Add a vertex to the contour at given timestep. The vertex is added at the end of contour. More...
 
void AddVertex (const VertexType &vertex, TimeStepType timestep=0)
 Add a vertex to the contour at given timestep. A copy of the passed vertex is added at the end of contour. More...
 
void AddVertex (const Point3D &vertex, bool isControlPoint, TimeStepType timestep=0)
 Add a vertex to the contour. More...
 
void UpdateContour (const ContourModel *sourceModel, TimeStepType destinationTimeStep, TimeStepType sourceTimeStep)
 
void AddVertexAtFront (const Point3D &vertex, TimeStepType timestep=0)
 Add a vertex to the contour at given timestep AT THE FRONT of the contour. The vertex is added at the FRONT of contour. More...
 
void AddVertexAtFront (const VertexType &vertex, TimeStepType timestep=0)
 Add a vertex to the contour at given timestep AT THE FRONT of the contour. The vertex is added at the FRONT of contour. More...
 
void AddVertexAtFront (const Point3D &vertex, bool isControlPoint, TimeStepType timestep=0)
 Add a vertex to the contour at given timestep AT THE FRONT of the contour. More...
 
void InsertVertexAtIndex (const Point3D &vertex, int index, bool isControlPoint=false, TimeStepType timestep=0)
 Insert a vertex at given index. More...
 
bool SetVertexAt (int pointId, const Point3D &point, TimeStepType timestep=0)
 Set a coordinates for point at given index. More...
 
bool SetVertexAt (int pointId, const VertexType *vertex, TimeStepType timestep=0)
 Set a coordinates and control state for point at given index. More...
 
bool IsClosed (int timestep=0) const
 Return if the contour is closed or not. More...
 
void Concatenate (ContourModel *other, TimeStepType timestep=0, bool check=false)
 Concatenate two contours. The starting control point of the other will be added at the end of the contour. More...
 
VertexIterator Begin (TimeStepType timestep=0) const
 Returns a const VertexIterator at the start element of the contour. More...
 
VertexIterator IteratorBegin (TimeStepType timestep=0) const
 Returns a const VertexIterator at the start element of the contour. More...
 
VertexIterator End (TimeStepType timestep=0) const
 Returns a const VertexIterator at the end element of the contour. More...
 
VertexIterator IteratorEnd (TimeStepType timestep=0) const
 Returns a const VertexIterator at the end element of the contour. More...
 
virtual void Close (TimeStepType timestep=0)
 Close the contour. The last control point will be linked with the first point. More...
 
virtual void Open (TimeStepType timestep=0)
 Set isClosed to false contour. The link between the last control point the first point will be removed. More...
 
virtual void SetClosed (bool isClosed, TimeStepType timestep=0)
 Set closed property to given boolean. More...
 
int GetNumberOfVertices (TimeStepType timestep=0) const
 Returns the number of vertices at a given timestep. More...
 
virtual bool IsEmpty (TimeStepType timestep) const
 Returns whether the contour model is empty at a given timestep. More...
 
bool IsEmpty () const override
 Returns whether the contour model is empty. More...
 
virtual const VertexType * GetVertexAt (int index, TimeStepType timestep=0) const
 Returns the vertex at the index position within the container. If the index or timestep is invalid a nullptr will be returned. More...
 
const VertexType * GetVertexAt (mitk::Point3D &point, float eps, TimeStepType timestep) const
 Find the nearest vertex to a given 3D position at a specific time step. More...
 
virtual const VertexType * GetNextControlVertexAt (mitk::Point3D &point, float eps, TimeStepType timestep) const
 Return the next control vertex after the nearest vertex to a given 3D position. More...
 
virtual const VertexType * GetPreviousControlVertexAt (mitk::Point3D &point, float eps, TimeStepType timestep) const
 Return the previous control vertex before the nearest vertex to a given 3D position. More...
 
int GetIndex (const VertexType *vertex, TimeStepType timestep=0)
 Return the index of a given vertex within the contour at the specified time step. More...
 
bool IsEmptyTimeStep (unsigned int t) const override
 Check whether the given time step has no associated contour data. More...
 
bool IsNearContour (Point3D &point, float eps, TimeStepType timestep) const
 Check whether a given point lies near the contour at the specified time step. More...
 
bool GetLineSegmentForPoint (Point3D &point, float eps, TimeStepType timestep, mitk::ContourElement::VertexType *previousVertex=nullptr, mitk::ContourElement::VertexType *nextVertex=nullptr)
 
bool GetLineSegmentForPoint (const mitk::Point3D &point, float eps, TimeStepType timestep, ContourElement::VertexSizeType &segmentStartIndex, ContourElement::VertexSizeType &segmentEndIndex, mitk::Point3D &closestContourPoint, bool findClosest=true) const
 
bool SelectVertexAt (int index, TimeStepType timestep=0)
 Mark a vertex at an index in the container as selected. More...
 
bool SetControlVertexAt (int index, TimeStepType timestep=0)
 Mark a vertex at an index in the container as control point. More...
 
bool SelectControlVertexAt (const Point3D &point, float eps, TimeStepType timestep=0)
 Mark a control vertex at a given position in 3D space. More...
 
bool SelectVertexAt (const Point3D &point, float eps, TimeStepType timestep=0)
 Mark a vertex at a given position in 3D space. More...
 
bool SetControlVertexAt (Point3D &point, float eps, TimeStepType timestep=0)
 
bool RemoveVertexAt (int index, TimeStepType timestep=0)
 Remove a vertex at given index within the container. More...
 
bool RemoveVertex (const VertexType *vertex, TimeStepType timestep=0)
 Remove a vertex at given timestep within the container. More...
 
bool RemoveVertexAt (Point3D &point, float eps, TimeStepType timestep=0)
 Remove a vertex at a query position in 3D space. More...
 
void ShiftSelectedVertex (Vector3D &translate)
 Shift the currently selected vertex by a translation vector. More...
 
void ShiftContour (Vector3D &translate, TimeStepType timestep=0)
 Shift the whole contour by a translation vector at given timestep. More...
 
virtual void Clear (TimeStepType timestep)
 Clear the storage container at given timestep. More...
 
void Initialize () override
 Initialize all data objects. More...
 
void Initialize (const ContourModel &other)
 Initialize object with specs of other contour. Note: No data will be copied. More...
 
VertexListType GetControlVertices (TimeStepType timestep)
 Returns a list pointing to all vertices that are indicated to be control points. More...
 
VertexListType GetVertexList (TimeStepType timestep)
 Returns the container of the vertices. More...
 
void SetRequestedRegionToLargestPossibleRegion () override
 Inherit from base data - no region support available for contourModel objects. More...
 
bool RequestedRegionIsOutsideOfTheBufferedRegion () override
 Inherit from base data - no region support available for contourModel objects. More...
 
bool VerifyRequestedRegion () override
 Inherit from base data - no region support available for contourModel objects. More...
 
void SetRequestedRegion (const itk::DataObject *data) override
 Inherit from base data - no region support available for contourModel objects. More...
 
void Expand (unsigned int timeSteps) override
 Expand the contour model and its TimeGeometry to given number of timesteps. More...
 
void UpdateOutputInformation () override
 Update the OutputInformation of a ContourModel object. More...
 
void Clear () override
 Clear the storage container. More...
 
void ExecuteOperation (Operation *operation) override
 overwrite if the Data can be called by an Interactor (StateMachine). More...
 
virtual void RedistributeControlVertices (int period, TimeStepType timestep)
 Redistributes control vertices with a given period (as number of vertices) More...
 
- Public Member Functions inherited from mitk::BaseData
 mitkClassMacroItkParent (BaseData, itk::DataObject)
 
BaseProperty::ConstPointer GetConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const override
 Get a const property by its key. More...
 
std::vector< std::string > GetPropertyKeys (const std::string &contextName="", bool includeDefaultContext=false) const override
 Get all property keys stored in the property list. More...
 
std::vector< std::string > GetPropertyContextNames () const override
 Get the names of all property contexts. More...
 
BaseProperty * GetNonConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) override
 Get a non-const property by its key. More...
 
void SetProperty (const std::string &propertyKey, BaseProperty *property, const std::string &contextName="", bool fallBackOnDefaultContext=false) override
 Set a property in the property list. More...
 
void RemoveProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=false) override
 Remove a property from the property list. More...
 
const mitk::TimeGeometry * GetTimeGeometry () const
 Return the TimeGeometry of the data as const pointer. More...
 
mitk::TimeGeometry * GetTimeGeometry ()
 Return the TimeGeometry of the data as non-const pointer. More...
 
const mitk::TimeGeometry * GetUpdatedTimeGeometry ()
 Return the TimeGeometry of the data after ensuring it is up-to-date. More...
 
const mitk::BaseGeometry * GetUpdatedGeometry (int t=0)
 Return the BaseGeometry of the data at time step t after ensuring it is up-to-date. More...
 
mitk::BaseGeometry * GetGeometry (int t=0) const
 Return the BaseGeometry of the data at time step t as a non-const pointer. More...
 
void UpdateOutputInformation () override
 Update the information for this BaseData so that it can be used as an output of a BaseProcess. More...
 
void CopyInformation (const itk::DataObject *data) override
 Copy information from the specified data set. More...
 
virtual bool IsInitialized () const
 Check whether the data has been initialized. More...
 
void ExecuteOperation (Operation *operation) override
 Execute an operation on this data object. More...
 
virtual void SetGeometry (BaseGeometry *aGeometry3D)
 Set the BaseGeometry of the data, which will be referenced (not copied!). More...
 
virtual void SetTimeGeometry (TimeGeometry *geometry)
 Set the TimeGeometry of the data, which will be referenced (not copied!). More...
 
virtual void SetClonedGeometry (const BaseGeometry *aGeometry3D)
 Set a clone of the provided geometry as the BaseGeometry of the data. More...
 
virtual void SetClonedTimeGeometry (const TimeGeometry *geometry)
 Set a clone of the provided TimeGeometry as the TimeGeometry of the data. More...
 
virtual void SetClonedGeometry (const BaseGeometry *aGeometry3D, unsigned int time)
 Set a clone of the provided geometry as the BaseGeometry of a given time step. More...
 
mitk::PropertyList::Pointer GetPropertyList () const
 Get the data's property list. More...
 
void SetPropertyList (PropertyList *propertyList)
 Set the data's property list, replacing the existing one. More...
 
mitk::BaseProperty::Pointer GetProperty (const char *propertyKey) const
 Get a property by its key from the PropertyList. More...
 
void SetProperty (const char *propertyKey, BaseProperty *property)
 Set a property in the PropertyList. More...
 
virtual void SetOrigin (const Point3D &origin)
 Convenience method for setting the origin of the BaseGeometry instances of all time steps. More...
 
itk::SmartPointer< mitk::BaseDataSource > GetSource () const
 Get the process object that generated this data object. More...
 
unsigned int GetTimeSteps () const
 Get the number of time steps from the TimeGeometry. More...
 
itk::ModifiedTimeType GetMTime () const override
 Get the modification time of this data object or its geometry, whichever was modified most recently. More...
 
void Graft (const DataObject *) override
 Graft data and information from another data object. More...
 
- Public Member Functions inherited from mitk::OperationActor
 itkTypeMacroNoParent (OperationActor) virtual ~OperationActor()
 
- Public Member Functions inherited from mitk::Identifiable
 Identifiable ()
 Default constructor. Generates a new random UID. More...
 
 Identifiable (const UIDType &uid)
 Construct with a pre-existing UID. More...
 
 Identifiable (const Identifiable &)=delete
 Copy construction is deleted to prevent UID duplication. More...
 
 Identifiable (Identifiable &&) noexcept
 Move constructor. Transfers ownership of the UID. More...
 
virtual ~Identifiable ()
 Virtual destructor. More...
 
Identifiable & operator= (const Identifiable &)=delete
 Copy assignment is deleted to prevent UID duplication. More...
 
Identifiable & operator= (Identifiable &&other) noexcept
 Move assignment operator. Transfers ownership of the UID. More...
 
virtual UIDType GetUID () const
 Get the unique identifier of this object. More...
 
UIDType GetRuntimeUID () const noexcept
 Get a runtime-unique ID for this object instance. More...
 
- Public Member Functions inherited from mitk::IPropertyOwner
 ~IPropertyOwner () override
 
virtual bool PropertyIsOwned (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const
 Checks if a certain property exists. More...
 
- Public Member Functions inherited from mitk::IPropertyProvider
virtual ~IPropertyProvider ()
 Virtual destructor. More...
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 mitkCloneMacro (Self)
 
 ContourModel ()
 
 ContourModel (const ContourModel &other)
 
 ~ContourModel () override
 
void ClearData () override
 reset to non-initialized state, release memory More...
 
void InitializeEmpty () override
 Pure virtual; Must be used in subclasses to get a data object to a valid state. Should at least create one empty object and call Superclass::InitializeTimeGeometry() to ensure an existing valid geometry. More...
 
- Protected Member Functions inherited from mitk::BaseData
 BaseData ()
 
 BaseData (const BaseData &other)
 
 ~BaseData () override
 
virtual void InitializeTimeGeometry (unsigned int timeSteps=1)
 Initialize the TimeGeometry for a number of time steps. The TimeGeometry is initialized empty and evenly timed. In many cases it will be necessary to overwrite this in sub-classes. More...
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
- Protected Member Functions inherited from mitk::Identifiable
virtual void SetUID (const UIDType &uid)
 

Static Protected Member Functions

static void ShiftVertex (VertexType *vertex, Vector3D &vector)
 

Protected Attributes

ContourModelSeries m_ContourSeries
 
VertexType * m_SelectedVertex
 
LineSegmentInterpolation m_lineInterpolation
 
bool m_UpdateBoundingBox
 
- Protected Attributes inherited from mitk::BaseData
bool m_LastRequestedRegionWasOutsideOfTheBufferedRegion
 
unsigned int m_SourceOutputIndexDuplicate
 
bool m_Initialized
 

Detailed Description

A time-resolved contour representation consisting of linked vertices in 3D space.

ContourModel stores a sequence of vertices (mitk::ContourElement) for each time step. Line segments between vertices are implicitly defined. By default, consecutive control points are connected by straight lines, but B-spline interpolation is also available.

Vertices can be added at the front or end and accessed by index, 3D position, or iterator. The contour may be open (a polyline) or closed (forming a Jordan curve). Interaction operations such as shifting individual vertices or the entire contour are provided directly in the API without requiring a separate interactor class.

ContourModel inherits from mitk::BaseData and therefore integrates with the MITK data management framework (DataStorage, DataNode, TimeGeometry).

Display Options

The default mappers are mitk::ContourModelMapper2D and mitk::ContourModelMapper3D. See those classes for display properties that can be configured via DataNode properties.

See also
ContourElement, ContourModelSet, ContourModelMapper2D, ContourModelMapper3D

Definition at line 46 of file mitkContourModel.h.

Member Typedef Documentation

◆ ConstVertexIterator

◆ ContourModelSeries

typedef std::vector<ContourElement::Pointer> mitk::ContourModel::ContourModelSeries

Definition at line 60 of file mitkContourModel.h.

◆ VertexIterator

◆ VertexListType

◆ VertexType

Member Enumeration Documentation

◆ LineSegmentInterpolation

Interpolation mode for line segments between control points.

Determines how consecutive control points are connected visually.

Enumerator
LINEAR 

Straight line segments between control points.

B_SPLINE 

B-spline interpolated curve through control points.

Definition at line 67 of file mitkContourModel.h.

Constructor & Destructor Documentation

◆ ContourModel() [1/2]

mitk::ContourModel::ContourModel ( )
protected

◆ ContourModel() [2/2]

mitk::ContourModel::ContourModel ( const ContourModel &  other)
protected

◆ ~ContourModel()

mitk::ContourModel::~ContourModel ( )
overrideprotected

Member Function Documentation

◆ AddVertex() [1/3]

void mitk::ContourModel::AddVertex ( const Point3D &  vertex,
bool  isControlPoint,
TimeStepType  timestep = 0 
)

Add a vertex to the contour.

Parameters
vertex- coordinate representation of a control point
timestep- the timestep at which the vertex will be add ( default 0)
isControlPoint- specifies the vertex to be handled in a special way (e.g. control points will be rendered).
Note
Adding a vertex to a timestep which exceeds the timebounds of the contour will not be added, the TimeGeometry will not be expanded.

◆ AddVertex() [2/3]

void mitk::ContourModel::AddVertex ( const Point3D &  vertex,
TimeStepType  timestep = 0 
)

Add a vertex to the contour at given timestep. The vertex is added at the end of contour.

Parameters
vertex- coordinate representation of a control point
timestep- the timestep at which the vertex will be add ( default 0)
Note
Adding a vertex to a timestep which exceeds the timebounds of the contour will not be added, the TimeGeometry will not be expanded.

◆ AddVertex() [3/3]

void mitk::ContourModel::AddVertex ( const VertexType &  vertex,
TimeStepType  timestep = 0 
)

Add a vertex to the contour at given timestep. A copy of the passed vertex is added at the end of contour.

Parameters
vertex- coordinate representation of a control point
timestep- the timestep at which the vertex will be add ( default 0)
Note
Adding a vertex to a timestep which exceeds the timebounds of the contour will not be added, the TimeGeometry will not be expanded.

◆ AddVertexAtFront() [1/3]

void mitk::ContourModel::AddVertexAtFront ( const Point3D &  vertex,
bool  isControlPoint,
TimeStepType  timestep = 0 
)

Add a vertex to the contour at given timestep AT THE FRONT of the contour.

Parameters
vertex- coordinate representation of a control point
timestep- the timestep at which the vertex will be add ( default 0)
isControlPoint- specifies the vertex to be handled in a special way (e.g. control points will be rendered).
Note
Adding a vertex to a timestep which exceeds the timebounds of the contour will not be added, the TimeGeometry will not be expanded.

◆ AddVertexAtFront() [2/3]

void mitk::ContourModel::AddVertexAtFront ( const Point3D &  vertex,
TimeStepType  timestep = 0 
)

Add a vertex to the contour at given timestep AT THE FRONT of the contour. The vertex is added at the FRONT of contour.

Parameters
vertex- coordinate representation of a control point
timestep- the timestep at which the vertex will be add ( default 0)
Note
Adding a vertex to a timestep which exceeds the timebounds of the contour will not be added, the TimeGeometry will not be expanded.

◆ AddVertexAtFront() [3/3]

void mitk::ContourModel::AddVertexAtFront ( const VertexType &  vertex,
TimeStepType  timestep = 0 
)

Add a vertex to the contour at given timestep AT THE FRONT of the contour. The vertex is added at the FRONT of contour.

Parameters
vertex- coordinate representation of a control point
timestep- the timestep at which the vertex will be add ( default 0)
Note
Adding a vertex to a timestep which exceeds the timebounds of the contour will not be added, the TimeGeometry will not be expanded.

◆ Begin()

VertexIterator mitk::ContourModel::Begin ( TimeStepType  timestep = 0) const

Returns a const VertexIterator at the start element of the contour.

Exceptions
mitk::Exceptionif the timestep is invalid.

◆ Clear() [1/2]

void mitk::ContourModel::Clear ( )
overridevirtual

Clear the storage container.

The object is set to initial state. All control points are removed and the number of timesteps are set to 1.

Reimplemented from mitk::BaseData.

◆ Clear() [2/2]

virtual void mitk::ContourModel::Clear ( TimeStepType  timestep)
virtual

Clear the storage container at given timestep.

All control points are removed at timestep.

◆ ClearData()

void mitk::ContourModel::ClearData ( )
overrideprotectedvirtual

reset to non-initialized state, release memory

Reimplemented from mitk::BaseData.

◆ Clone()

Pointer mitk::ContourModel::Clone ( ) const

◆ Close()

virtual void mitk::ContourModel::Close ( TimeStepType  timestep = 0)
virtual

Close the contour. The last control point will be linked with the first point.

◆ Concatenate()

void mitk::ContourModel::Concatenate ( ContourModel *  other,
TimeStepType  timestep = 0,
bool  check = false 
)

Concatenate two contours. The starting control point of the other will be added at the end of the contour.

Parameters
other
timestep- the timestep at which the vertex will be add ( default 0)
check- check for intersections ( default false)

◆ Deselect()

void mitk::ContourModel::Deselect ( )
inline

Clear the current vertex selection.

Postcondition
GetSelectedVertex() returns nullptr.

Definition at line 83 of file mitkContourModel.h.

◆ End()

VertexIterator mitk::ContourModel::End ( TimeStepType  timestep = 0) const

Returns a const VertexIterator at the end element of the contour.

Exceptions
mitk::Exceptionif the timestep is invalid.

◆ ExecuteOperation()

void mitk::ContourModel::ExecuteOperation ( Operation *  operation)
overridevirtual

overwrite if the Data can be called by an Interactor (StateMachine).

Implements mitk::OperationActor.

◆ Expand()

void mitk::ContourModel::Expand ( unsigned int  timeSteps)
overridevirtual

Expand the contour model and its TimeGeometry to given number of timesteps.

Reimplemented from mitk::BaseData.

◆ GetControlVertices()

VertexListType mitk::ContourModel::GetControlVertices ( TimeStepType  timestep)

Returns a list pointing to all vertices that are indicated to be control points.

◆ GetIndex()

int mitk::ContourModel::GetIndex ( const VertexType *  vertex,
TimeStepType  timestep = 0 
)

Return the index of a given vertex within the contour at the specified time step.

Parameters
[in]vertexPointer to the vertex to find.
[in]timestepTime step to query. Default is 0.
Returns
Index of the vertex, or -1 if not found or the timestep is invalid.

◆ GetLineSegmentForPoint() [1/2]

bool mitk::ContourModel::GetLineSegmentForPoint ( const mitk::Point3D &  point,
float  eps,
TimeStepType  timestep,
ContourElement::VertexSizeType &  segmentStartIndex,
ContourElement::VertexSizeType &  segmentEndIndex,
mitk::Point3D &  closestContourPoint,
bool  findClosest = true 
) const

Overloaded version that returns additional information (start and end vertex of the line closest to the passed point and the closest point on the contour).

Remarks
segmentStart, segmentStop and closestContourPoint are only valid if the function returns true.

◆ GetLineSegmentForPoint() [2/2]

bool mitk::ContourModel::GetLineSegmentForPoint ( Point3D &  point,
float  eps,
TimeStepType  timestep,
mitk::ContourElement::VertexType *  previousVertex = nullptr,
mitk::ContourElement::VertexType *  nextVertex = nullptr 
)

Function that searches for the line segment of the contour that is closest to the passed point and close enough (distance between point and line segment <= eps). If such an line segment exist, the starting vertex and closing vertex of the found segment are passed back.

Returns
True indicates that a line segment was found. False indicates that no segment of the contour is close enough to the passed point.
Remarks
previousVertex and nextVertex are only valid if return is true.

◆ GetLineSegmentInterpolation()

LineSegmentInterpolation mitk::ContourModel::GetLineSegmentInterpolation ( )
inline

Get the current interpolation mode for line segments between control points.

Returns
The current LineSegmentInterpolation mode.
See also
SetLineSegmentInterpolation

Definition at line 113 of file mitkContourModel.h.

◆ GetNextControlVertexAt()

virtual const VertexType* mitk::ContourModel::GetNextControlVertexAt ( mitk::Point3D &  point,
float  eps,
TimeStepType  timestep 
) const
virtual

Return the next control vertex after the nearest vertex to a given 3D position.

Parameters
[in]pointQuery position in 3D space.
[in]epsMaximum Euclidean distance for the search.
[in]timestepTime step to query.
Returns
Const pointer to the next control vertex, or nullptr if the timestep is invalid or no vertex is found.

◆ GetNumberOfVertices()

int mitk::ContourModel::GetNumberOfVertices ( TimeStepType  timestep = 0) const

Returns the number of vertices at a given timestep.

Parameters
timestep- default = 0

◆ GetPreviousControlVertexAt()

virtual const VertexType* mitk::ContourModel::GetPreviousControlVertexAt ( mitk::Point3D &  point,
float  eps,
TimeStepType  timestep 
) const
virtual

Return the previous control vertex before the nearest vertex to a given 3D position.

Parameters
[in]pointQuery position in 3D space.
[in]epsMaximum Euclidean distance for the search.
[in]timestepTime step to query.
Returns
Const pointer to the previous control vertex, or nullptr if the timestep is invalid or no vertex is found.

◆ GetSelectedVertex()

VertexType* mitk::ContourModel::GetSelectedVertex ( )
inline

Get the currently selected vertex.

Returns
Pointer to the selected vertex, or nullptr if no vertex is selected.

Definition at line 78 of file mitkContourModel.h.

◆ GetVertexAt() [1/2]

virtual const VertexType* mitk::ContourModel::GetVertexAt ( int  index,
TimeStepType  timestep = 0 
) const
virtual

Returns the vertex at the index position within the container. If the index or timestep is invalid a nullptr will be returned.

◆ GetVertexAt() [2/2]

const VertexType* mitk::ContourModel::GetVertexAt ( mitk::Point3D &  point,
float  eps,
TimeStepType  timestep 
) const

Find the nearest vertex to a given 3D position at a specific time step.

Parameters
[in]pointQuery position in 3D space.
[in]epsMaximum Euclidean distance for the search.
[in]timestepTime step to query.
Returns
Const pointer to the nearest vertex, or nullptr if the timestep is invalid or no vertex is within eps.

◆ GetVertexList()

VertexListType mitk::ContourModel::GetVertexList ( TimeStepType  timestep)

Returns the container of the vertices.

◆ Initialize() [1/2]

void mitk::ContourModel::Initialize ( )
override

Initialize all data objects.

◆ Initialize() [2/2]

void mitk::ContourModel::Initialize ( const ContourModel &  other)

Initialize object with specs of other contour. Note: No data will be copied.

◆ InitializeEmpty()

void mitk::ContourModel::InitializeEmpty ( )
overrideprotectedvirtual

Pure virtual; Must be used in subclasses to get a data object to a valid state. Should at least create one empty object and call Superclass::InitializeTimeGeometry() to ensure an existing valid geometry.

Reimplemented from mitk::BaseData.

◆ InsertVertexAtIndex()

void mitk::ContourModel::InsertVertexAtIndex ( const Point3D &  vertex,
int  index,
bool  isControlPoint = false,
TimeStepType  timestep = 0 
)

Insert a vertex at given index.

◆ IsClosed()

bool mitk::ContourModel::IsClosed ( int  timestep = 0) const

Return if the contour is closed or not.

◆ IsEmpty() [1/2]

bool mitk::ContourModel::IsEmpty ( ) const
overridevirtual

Returns whether the contour model is empty.

Reimplemented from mitk::BaseData.

◆ IsEmpty() [2/2]

virtual bool mitk::ContourModel::IsEmpty ( TimeStepType  timestep) const
virtual

Returns whether the contour model is empty at a given timestep.

Parameters
timestep- default = 0

◆ IsEmptyTimeStep()

bool mitk::ContourModel::IsEmptyTimeStep ( unsigned int  t) const
overridevirtual

Check whether the given time step has no associated contour data.

Parameters
[in]tTime step index.
Returns
True if t exceeds the number of available time steps.

Reimplemented from mitk::BaseData.

◆ IsNearContour()

bool mitk::ContourModel::IsNearContour ( Point3D &  point,
float  eps,
TimeStepType  timestep 
) const

Check whether a given point lies near the contour at the specified time step.

Parameters
[in]pointQuery position in 3D space.
[in]epsMaximum squared distance for the proximity test.
[in]timestepTime step to query.
Returns
True if the point is near the contour, false otherwise.

◆ IteratorBegin()

VertexIterator mitk::ContourModel::IteratorBegin ( TimeStepType  timestep = 0) const

Returns a const VertexIterator at the start element of the contour.

Exceptions
mitk::Exceptionif the timestep is invalid.

◆ IteratorEnd()

VertexIterator mitk::ContourModel::IteratorEnd ( TimeStepType  timestep = 0) const

Returns a const VertexIterator at the end element of the contour.

Exceptions
mitk::Exceptionif the timestep is invalid.

◆ mitkClassMacro()

mitk::ContourModel::mitkClassMacro ( ContourModel  ,
BaseData   
)

◆ mitkCloneMacro()

mitk::ContourModel::mitkCloneMacro ( Self  )
protected

◆ New()

static Pointer mitk::ContourModel::New ( )
static

◆ Open()

virtual void mitk::ContourModel::Open ( TimeStepType  timestep = 0)
virtual

Set isClosed to false contour. The link between the last control point the first point will be removed.

◆ RedistributeControlVertices()

virtual void mitk::ContourModel::RedistributeControlVertices ( int  period,
TimeStepType  timestep 
)
virtual

Redistributes control vertices with a given period (as number of vertices)

Parameters
period- the number of vertices between control points.
timestep- at this timestep all lines will be rebuilt.

◆ RemoveVertex()

bool mitk::ContourModel::RemoveVertex ( const VertexType *  vertex,
TimeStepType  timestep = 0 
)

Remove a vertex at given timestep within the container.

Returns
true = the vertex was successfully removed.

◆ RemoveVertexAt() [1/2]

bool mitk::ContourModel::RemoveVertexAt ( int  index,
TimeStepType  timestep = 0 
)

Remove a vertex at given index within the container.

Returns
true = the vertex was successfully removed; false = wrong index.

◆ RemoveVertexAt() [2/2]

bool mitk::ContourModel::RemoveVertexAt ( Point3D &  point,
float  eps,
TimeStepType  timestep = 0 
)

Remove a vertex at a query position in 3D space.

The vertex to be removed will be search by nearest neighbour search. Note that possibly no vertex at this position and eps is stored inside the contour.

Returns
true = the vertex was successfully removed; false = no vertex found.

◆ RequestedRegionIsOutsideOfTheBufferedRegion()

bool mitk::ContourModel::RequestedRegionIsOutsideOfTheBufferedRegion ( )
overridevirtual

Inherit from base data - no region support available for contourModel objects.

Implements mitk::BaseData.

◆ SelectControlVertexAt()

bool mitk::ContourModel::SelectControlVertexAt ( const Point3D &  point,
float  eps,
TimeStepType  timestep = 0 
)

Mark a control vertex at a given position in 3D space.

Parameters
point- query point in 3D space
eps- radius for nearest neighbour search (error bound).
timestep- search at this timestep
Returns
true = vertex found; false = no vertex found

◆ SelectVertexAt() [1/2]

bool mitk::ContourModel::SelectVertexAt ( const Point3D &  point,
float  eps,
TimeStepType  timestep = 0 
)

Mark a vertex at a given position in 3D space.

Parameters
point- query point in 3D space
eps- radius for nearest neighbour search (error bound).
timestep- search at this timestep
Returns
true = vertex found; false = no vertex found

◆ SelectVertexAt() [2/2]

bool mitk::ContourModel::SelectVertexAt ( int  index,
TimeStepType  timestep = 0 
)

Mark a vertex at an index in the container as selected.

◆ SetClosed()

virtual void mitk::ContourModel::SetClosed ( bool  isClosed,
TimeStepType  timestep = 0 
)
virtual

Set closed property to given boolean.

false - The link between the last control point the first point will be removed. true - The last control point will be linked with the first point.

◆ SetControlVertexAt() [1/2]

bool mitk::ContourModel::SetControlVertexAt ( int  index,
TimeStepType  timestep = 0 
)

Mark a vertex at an index in the container as control point.

◆ SetControlVertexAt() [2/2]

bool mitk::ContourModel::SetControlVertexAt ( Point3D &  point,
float  eps,
TimeStepType  timestep = 0 
)

◆ SetLineSegmentInterpolation()

void mitk::ContourModel::SetLineSegmentInterpolation ( LineSegmentInterpolation  interpolation)
inline

Set the interpolation mode for line segments between control points.

Parameters
[in]interpolationThe desired interpolation mode.
See also
GetLineSegmentInterpolation

Definition at line 103 of file mitkContourModel.h.

◆ SetRequestedRegion()

void mitk::ContourModel::SetRequestedRegion ( const itk::DataObject *  data)
overridevirtual

Inherit from base data - no region support available for contourModel objects.

Implements mitk::BaseData.

◆ SetRequestedRegionToLargestPossibleRegion()

void mitk::ContourModel::SetRequestedRegionToLargestPossibleRegion ( )
overridevirtual

Inherit from base data - no region support available for contourModel objects.

Implements mitk::BaseData.

◆ SetSelectedVertexAsControlPoint()

void mitk::ContourModel::SetSelectedVertexAsControlPoint ( bool  isControlPoint = true)
inline

Set or clear the control point flag on the currently selected vertex.

Parameters
[in]isControlPointIf true, marks the selected vertex as a control point; if false, removes the control point designation. Default is true.
Note
Does nothing if no vertex is currently selected.

Definition at line 90 of file mitkContourModel.h.

◆ SetVertexAt() [1/2]

bool mitk::ContourModel::SetVertexAt ( int  pointId,
const Point3D &  point,
TimeStepType  timestep = 0 
)

Set a coordinates for point at given index.

◆ SetVertexAt() [2/2]

bool mitk::ContourModel::SetVertexAt ( int  pointId,
const VertexType *  vertex,
TimeStepType  timestep = 0 
)

Set a coordinates and control state for point at given index.

◆ ShiftContour()

void mitk::ContourModel::ShiftContour ( Vector3D &  translate,
TimeStepType  timestep = 0 
)

Shift the whole contour by a translation vector at given timestep.

Parameters
translate- the translation vector.
timestep- at this timestep the contour will be shifted.

◆ ShiftSelectedVertex()

void mitk::ContourModel::ShiftSelectedVertex ( Vector3D &  translate)

Shift the currently selected vertex by a translation vector.

Parameters
translate- the translation vector.

◆ ShiftVertex()

static void mitk::ContourModel::ShiftVertex ( VertexType *  vertex,
Vector3D &  vector 
)
staticprotected

◆ UpdateContour()

void mitk::ContourModel::UpdateContour ( const ContourModel *  sourceModel,
TimeStepType  destinationTimeStep,
TimeStepType  sourceTimeStep 
)

Clears the contour of destinationTimeStep and copies the contour of the passed source model at the sourceTimeStep.

Precondition
sourceModel must point to a valid instance
sourceTimePoint must be valid
Note
Updating a vertex to a timestep which exceeds the timebounds of the contour will not be added, the TimeGeometry will not be expanded.

◆ UpdateOutputInformation()

void mitk::ContourModel::UpdateOutputInformation ( )
override

Update the OutputInformation of a ContourModel object.

The BoundingBox of the contour will be updated, if necessary.

◆ VerifyRequestedRegion()

bool mitk::ContourModel::VerifyRequestedRegion ( )
overridevirtual

Inherit from base data - no region support available for contourModel objects.

Implements mitk::BaseData.

Member Data Documentation

◆ m_ContourSeries

ContourModelSeries mitk::ContourModel::m_ContourSeries
protected

Definition at line 501 of file mitkContourModel.h.

◆ m_lineInterpolation

LineSegmentInterpolation mitk::ContourModel::m_lineInterpolation
protected

Definition at line 507 of file mitkContourModel.h.

◆ m_SelectedVertex

VertexType* mitk::ContourModel::m_SelectedVertex
protected

Definition at line 504 of file mitkContourModel.h.

◆ m_UpdateBoundingBox

bool mitk::ContourModel::m_UpdateBoundingBox
protected

Definition at line 510 of file mitkContourModel.h.


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