Medical Imaging Interaction Toolkit
2024.06.99-fe296c79
Medical Imaging Interaction Toolkit
|
ContourModel is a structure of linked vertices defining a contour in 3D space. The vertices are stored in a mitk::ContourElement for each timestep. The contour line segments are implicitly defined by the given linked vertices. By default two control points are linked by a straight line. It is possible to add vertices at the front and end of the contour and to iterate in both directions. More...
#include <mitkContourModel.h>
Public Types | |
enum | LineSegmentInterpolation { LINEAR, B_SPLINE } |
Possible interpolation of the 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::BaseData | |
typedef BaseData | Self |
typedef itk::DataObject | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
Public Types inherited from mitk::Identifiable | |
using | UIDType = std::string |
Public Member Functions | |
mitkClassMacro (ContourModel, BaseData) | |
Pointer | Clone () const |
VertexType * | GetSelectedVertex () |
Get the current selected vertex. More... | |
void | Deselect () |
Deselect vertex. More... | |
void | SetSelectedVertexAsControlPoint (bool isControlPoint=true) |
Set selected vertex as control point. More... | |
void | SetLineSegmentInterpolation (LineSegmentInterpolation interpolation) |
Set the interpolation of the line segments between control points. More... | |
LineSegmentInterpolation | GetLineSegmentInterpolation () |
Get the interpolation of the 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 |
virtual const VertexType * | GetNextControlVertexAt (mitk::Point3D &point, float eps, TimeStepType timestep) const |
virtual const VertexType * | GetPreviousControlVertexAt (mitk::Point3D &point, float eps, TimeStepType timestep) const |
int | GetIndex (const VertexType *vertex, TimeStepType timestep=0) |
Remove a vertex at given timestep within the container. More... | |
bool | IsEmptyTimeStep (unsigned int t) const override |
Check if there isn't something at this timestep. More... | |
bool | IsNearContour (Point3D &point, float eps, TimeStepType timestep) const |
Check if mouse cursor is near the contour. 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 | |
virtual std::vector< std::string > | GetClassHierarchy () const |
virtual const char * | GetClassName () const |
BaseProperty::ConstPointer | GetConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const override |
Get property by its key. More... | |
std::vector< std::string > | GetPropertyKeys (const std::string &contextName="", bool includeDefaultContext=false) const override |
Query keys of existing properties. More... | |
std::vector< std::string > | GetPropertyContextNames () const override |
Query names of existing contexts. More... | |
BaseProperty * | GetNonConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) override |
Get property by its key. More... | |
void | SetProperty (const std::string &propertyKey, BaseProperty *property, const std::string &contextName="", bool fallBackOnDefaultContext=false) override |
Add new or change existent property. More... | |
void | RemoveProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=false) override |
Removes a property. If the property does not exist, nothing will be done. 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 pointer. More... | |
const mitk::TimeGeometry * | GetUpdatedTimeGeometry () |
Return the TimeGeometry of the data. More... | |
const mitk::BaseGeometry * | GetUpdatedGeometry (int t=0) |
Return the BaseGeometry of the data at time t. More... | |
mitk::BaseGeometry * | GetGeometry (int t=0) const |
Return the geometry, which is a TimeGeometry, of the data as non-const pointer. More... | |
void | UpdateOutputInformation () override |
Update the information for this BaseData (the geometry in particular) 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, i.e., at least the Geometry and other header data has been set. More... | |
void | ExecuteOperation (Operation *operation) override |
overwrite if the Data can be called by an Interactor (StateMachine). More... | |
virtual void | SetGeometry (BaseGeometry *aGeometry3D) |
Set the BaseGeometry of the data, which will be referenced (not copied!). Assumes the data object has only 1 time step ( is a 3D object ) and creates a new TimeGeometry which saves the given BaseGeometry. If an TimeGeometry has already been set for the object, it will be replaced after calling this function. 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 Geometry of the data. Assumes the data object has only 1 time step ( is a 3D object ) and creates a new TimeGeometry. If an TimeGeometry has already been set for the object, it will be replaced after calling this function. More... | |
virtual void | SetClonedTimeGeometry (const TimeGeometry *geometry) |
Set a clone of the provided TimeGeometry as TimeGeometry of the data. More... | |
virtual void | SetClonedGeometry (const BaseGeometry *aGeometry3D, unsigned int time) |
Set a clone of the provided geometry as 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. More... | |
mitk::BaseProperty::Pointer | GetProperty (const char *propertyKey) const |
Get the property (instance of BaseProperty) with key propertyKey from the PropertyList, and set it to this, respectively;. More... | |
void | SetProperty (const char *propertyKey, BaseProperty *property) |
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 As the base data has not a data vector given by itself, the number of time steps is defined over the time sliced geometry. In sub classes, a better implementation could be over the length of the data vector. More... | |
itk::ModifiedTimeType | GetMTime () const override |
Get the modified time of the last change of the contents this data object or its geometry. More... | |
void | Graft (const DataObject *) override |
Public Member Functions inherited from mitk::OperationActor | |
itkTypeMacroNoParent (OperationActor) virtual ~OperationActor() | |
Public Member Functions inherited from mitk::Identifiable | |
Identifiable () | |
Identifiable (const UIDType &uid) | |
Identifiable (const Identifiable &)=delete | |
Identifiable (Identifiable &&) noexcept | |
virtual | ~Identifiable () |
Identifiable & | operator= (const Identifiable &)=delete |
Identifiable & | operator= (Identifiable &&other) noexcept |
virtual UIDType | GetUID () const |
Get unique ID of an object. More... | |
Public Member Functions inherited from mitk::IPropertyOwner | |
~IPropertyOwner () override | |
Public Member Functions inherited from mitk::IPropertyProvider | |
virtual | ~IPropertyProvider () |
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from mitk::BaseData | |
static const char * | GetStaticNameOfClass () |
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 |
ContourModel is a structure of linked vertices defining a contour in 3D space. The vertices are stored in a mitk::ContourElement for each timestep. The contour line segments are implicitly defined by the given linked vertices. By default two control points are linked by a straight line. It is possible to add vertices at the front and end of the contour and to iterate in both directions.
Points are specified containing coordinates and additional (data) information, see mitk::ContourElement. For accessing a specific vertex either an index or a position in 3D space can be used. The vertices are best accessed by using a VertexIterator. Interaction with the contour is thus available without any mitk interactor class using the api of ContourModel. It is possible to shift single vertices as well as shifting the whole contour.
A contour can be either open like a single curved line segment or closed. A closed contour can for example represent a jordan curve.
The default mappers for this data structure are mitk::ContourModelGLMapper2D and mitk::ContourModelMapper3D. See these classes for display options which can can be set via properties.
Definition at line 47 of file mitkContourModel.h.
Definition at line 60 of file mitkContourModel.h.
typedef std::vector<ContourElement::Pointer> mitk::ContourModel::ContourModelSeries |
Definition at line 61 of file mitkContourModel.h.
Definition at line 59 of file mitkContourModel.h.
Definition at line 58 of file mitkContourModel.h.
Definition at line 54 of file mitkContourModel.h.
Possible interpolation of the line segments between control points.
Enumerator | |
---|---|
LINEAR | |
B_SPLINE |
Definition at line 65 of file mitkContourModel.h.
|
protected |
|
protected |
|
overrideprotected |
void mitk::ContourModel::AddVertex | ( | const Point3D & | vertex, |
bool | isControlPoint, | ||
TimeStepType | timestep = 0 |
||
) |
Add a vertex to the contour.
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). |
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.
vertex | - coordinate representation of a control point |
timestep | - the timestep at which the vertex will be add ( default 0) |
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.
vertex | - coordinate representation of a control point |
timestep | - the timestep at which the vertex will be add ( default 0) |
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.
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). |
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.
vertex | - coordinate representation of a control point |
timestep | - the timestep at which the vertex will be add ( default 0) |
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.
vertex | - coordinate representation of a control point |
timestep | - the timestep at which the vertex will be add ( default 0) |
VertexIterator mitk::ContourModel::Begin | ( | TimeStepType | timestep = 0 | ) | const |
Returns a const VertexIterator at the start element of the contour.
mitk::Exception | if the timestep is invalid. |
|
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.
|
virtual |
Clear the storage container at given timestep.
All control points are removed at timestep.
|
overrideprotectedvirtual |
reset to non-initialized state, release memory
Reimplemented from mitk::BaseData.
Pointer mitk::ContourModel::Clone | ( | ) | const |
|
virtual |
Close the contour. The last control point will be linked with the first point.
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.
other | |
timestep | - the timestep at which the vertex will be add ( default 0) |
check | - check for intersections ( default false) |
|
inline |
Deselect vertex.
Definition at line 78 of file mitkContourModel.h.
VertexIterator mitk::ContourModel::End | ( | TimeStepType | timestep = 0 | ) | const |
Returns a const VertexIterator at the end element of the contour.
mitk::Exception | if the timestep is invalid. |
|
overridevirtual |
overwrite if the Data can be called by an Interactor (StateMachine).
Implements mitk::OperationActor.
|
overridevirtual |
Expand the contour model and its TimeGeometry to given number of timesteps.
Reimplemented from mitk::BaseData.
VertexListType mitk::ContourModel::GetControlVertices | ( | TimeStepType | timestep | ) |
Returns a list pointing to all vertices that are indicated to be control points.
int mitk::ContourModel::GetIndex | ( | const VertexType * | vertex, |
TimeStepType | timestep = 0 |
||
) |
Remove a vertex at given timestep within the container.
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 vertix of the line closest to the passed point and the closest point on the contour).
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.
|
inline |
Get the interpolation of the line segments between control points.
Definition at line 100 of file mitkContourModel.h.
|
virtual |
Returns the next control vertex to the approximate nearest vertex of a given position in 3D space If the timestep is invalid a nullptr will be returned.
int mitk::ContourModel::GetNumberOfVertices | ( | TimeStepType | timestep = 0 | ) | const |
Returns the number of vertices at a given timestep.
timestep | - default = 0 |
|
virtual |
Returns the previous control vertex to the approximate nearest vertex of a given position in 3D space If the timestep is invalid a nullptr will be returned.
|
inline |
Get the current selected vertex.
Definition at line 75 of file mitkContourModel.h.
|
virtual |
Returns the vertex at the index position within the container. If the index or timestep is invalid a nullptr will be returned.
const VertexType* mitk::ContourModel::GetVertexAt | ( | mitk::Point3D & | point, |
float | eps, | ||
TimeStepType | timestep | ||
) | const |
VertexListType mitk::ContourModel::GetVertexList | ( | TimeStepType | timestep | ) |
Returns the container of the vertices.
|
override |
Initialize all data objects.
void mitk::ContourModel::Initialize | ( | const ContourModel & | other | ) |
Initialize object with specs of other contour. Note: No data will be copied.
|
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.
void mitk::ContourModel::InsertVertexAtIndex | ( | const Point3D & | vertex, |
int | index, | ||
bool | isControlPoint = false , |
||
TimeStepType | timestep = 0 |
||
) |
Insert a vertex at given index.
bool mitk::ContourModel::IsClosed | ( | int | timestep = 0 | ) | const |
Return if the contour is closed or not.
|
overridevirtual |
Returns whether the contour model is empty.
Reimplemented from mitk::BaseData.
|
virtual |
Returns whether the contour model is empty at a given timestep.
timestep | - default = 0 |
|
overridevirtual |
Check if there isn't something at this timestep.
Reimplemented from mitk::BaseData.
bool mitk::ContourModel::IsNearContour | ( | Point3D & | point, |
float | eps, | ||
TimeStepType | timestep | ||
) | const |
Check if mouse cursor is near the contour.
VertexIterator mitk::ContourModel::IteratorBegin | ( | TimeStepType | timestep = 0 | ) | const |
Returns a const VertexIterator at the start element of the contour.
mitk::Exception | if the timestep is invalid. |
VertexIterator mitk::ContourModel::IteratorEnd | ( | TimeStepType | timestep = 0 | ) | const |
Returns a const VertexIterator at the end element of the contour.
mitk::Exception | if the timestep is invalid. |
mitk::ContourModel::mitkClassMacro | ( | ContourModel | , |
BaseData | |||
) |
|
protected |
|
static |
|
virtual |
Set isClosed to false contour. The link between the last control point the first point will be removed.
|
virtual |
Redistributes control vertices with a given period (as number of vertices)
period | - the number of vertices between control points. |
timestep | - at this timestep all lines will be rebuilt. |
bool mitk::ContourModel::RemoveVertex | ( | const VertexType * | vertex, |
TimeStepType | timestep = 0 |
||
) |
Remove a vertex at given timestep within the container.
bool mitk::ContourModel::RemoveVertexAt | ( | int | index, |
TimeStepType | timestep = 0 |
||
) |
Remove a vertex at given index within the container.
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.
|
overridevirtual |
Inherit from base data - no region support available for contourModel objects.
Implements mitk::BaseData.
bool mitk::ContourModel::SelectControlVertexAt | ( | const Point3D & | point, |
float | eps, | ||
TimeStepType | timestep = 0 |
||
) |
Mark a control vertex at a given position in 3D space.
point | - query point in 3D space |
eps | - radius for nearest neighbour search (error bound). |
timestep | - search at this timestep |
bool mitk::ContourModel::SelectVertexAt | ( | const Point3D & | point, |
float | eps, | ||
TimeStepType | timestep = 0 |
||
) |
Mark a vertex at a given position in 3D space.
point | - query point in 3D space |
eps | - radius for nearest neighbour search (error bound). |
timestep | - search at this timestep |
bool mitk::ContourModel::SelectVertexAt | ( | int | index, |
TimeStepType | timestep = 0 |
||
) |
Mark a vertex at an index in the container as selected.
|
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.
bool mitk::ContourModel::SetControlVertexAt | ( | int | index, |
TimeStepType | timestep = 0 |
||
) |
Mark a vertex at an index in the container as control point.
bool mitk::ContourModel::SetControlVertexAt | ( | Point3D & | point, |
float | eps, | ||
TimeStepType | timestep = 0 |
||
) |
|
inline |
Set the interpolation of the line segments between control points.
Definition at line 92 of file mitkContourModel.h.
|
overridevirtual |
Inherit from base data - no region support available for contourModel objects.
Implements mitk::BaseData.
|
overridevirtual |
Inherit from base data - no region support available for contourModel objects.
Implements mitk::BaseData.
|
inline |
Set selected vertex as control point.
Definition at line 81 of file mitkContourModel.h.
bool mitk::ContourModel::SetVertexAt | ( | int | pointId, |
const Point3D & | point, | ||
TimeStepType | timestep = 0 |
||
) |
Set a coordinates for point at given index.
bool mitk::ContourModel::SetVertexAt | ( | int | pointId, |
const VertexType * | vertex, | ||
TimeStepType | timestep = 0 |
||
) |
Set a coordinates and control state for point at given index.
void mitk::ContourModel::ShiftContour | ( | Vector3D & | translate, |
TimeStepType | timestep = 0 |
||
) |
Shift the whole contour by a translation vector at given timestep.
translate | - the translation vector. |
timestep | - at this timestep the contour will be shifted. |
void mitk::ContourModel::ShiftSelectedVertex | ( | Vector3D & | translate | ) |
Shift the currently selected vertex by a translation vector.
translate | - the translation vector. |
|
staticprotected |
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.
|
override |
Update the OutputInformation of a ContourModel object.
The BoundingBox of the contour will be updated, if necessary.
|
overridevirtual |
Inherit from base data - no region support available for contourModel objects.
Implements mitk::BaseData.
|
protected |
Definition at line 469 of file mitkContourModel.h.
|
protected |
Definition at line 475 of file mitkContourModel.h.
|
protected |
Definition at line 472 of file mitkContourModel.h.
|
protected |
Definition at line 478 of file mitkContourModel.h.