16 #ifndef _MITK_CONTOURMODEL_H_
17 #define _MITK_CONTOURMODEL_H_
56 itkFactorylessNewMacro(
Self) itkCloneMacro(
Self)
80 void Deselect() { this->m_SelectedVertex =
nullptr; }
85 if (this->m_SelectedVertex)
87 m_SelectedVertex->IsControlPoint = isControlPoint;
96 this->m_lineInterpolation = interpolation;
125 void AddVertex(VertexType &vertex,
int timestep = 0);
136 void AddVertex(
const VertexType *vertex,
int timestep = 0);
149 void AddVertex(
mitk::Point3D &vertex,
bool isControlPoint,
int timestep = 0);
160 void AddVertexAtFront(
mitk::Point3D &vertex,
int timestep = 0);
171 void AddVertexAtFront(VertexType &vertex,
int timestep = 0);
184 void AddVertexAtFront(
mitk::Point3D &vertex,
bool isControlPoint,
int timestep = 0);
188 void InsertVertexAtIndex(
mitk::Point3D &vertex,
int index,
bool isControlPoint =
false,
int timestep = 0);
192 bool SetVertexAt(
int pointId,
const mitk::Point3D &point,
unsigned int timestep = 0);
196 bool SetVertexAt(
int pointId,
const VertexType *vertex,
unsigned int timestep = 0);
200 bool IsClosed(
int timestep = 0)
const;
212 VertexIterator Begin(
int timestep = 0)
const;
217 VertexIterator IteratorBegin(
int timestep = 0)
const;
222 VertexIterator End(
int timestep = 0)
const;
227 VertexIterator IteratorEnd(
int timestep = 0)
const;
232 virtual void Close(
int timestep = 0);
237 virtual void Open(
int timestep = 0);
244 virtual void SetClosed(
bool isClosed,
int timestep = 0);
249 int GetNumberOfVertices(
int timestep = 0)
const;
254 virtual bool IsEmpty(
int timestep)
const;
258 virtual bool IsEmpty()
const override;
262 virtual const VertexType *GetVertexAt(
int index,
int timestep = 0)
const;
268 int GetIndex(
const VertexType *vertex,
int timestep = 0);
272 virtual bool IsEmptyTimeStep(
unsigned int t)
const override;
280 bool SelectVertexAt(
int index,
int timestep = 0);
284 bool SetControlVertexAt(
int index,
int timestep = 0);
308 bool RemoveVertexAt(
int index,
int timestep = 0);
314 bool RemoveVertex(
const VertexType *vertex,
int timestep = 0);
344 virtual void Clear(
int timestep);
348 virtual void Initialize()
override;
359 virtual void SetRequestedRegionToLargestPossibleRegion()
override;
364 virtual bool RequestedRegionIsOutsideOfTheBufferedRegion()
override;
369 virtual bool VerifyRequestedRegion()
override;
384 virtual void SetRequestedRegion(
const itk::DataObject *data)
override;
389 virtual void Expand(
unsigned int timeSteps)
override;
396 virtual void UpdateOutputInformation()
override;
404 virtual void Clear()
override;
409 void ExecuteOperation(
Operation *operation)
override;
415 virtual void RedistributeControlVertices(
int period,
int timestep);
425 virtual void ClearData()
override;
428 virtual void InitializeEmpty()
override;
448 itkEventMacro(ContourModelSizeChangeEvent, ContourModelEvent);
449 itkEventMacro(ContourModelAddEvent, ContourModelSizeChangeEvent);
450 itkEventMacro(ContourModelRemoveEvent, ContourModelSizeChangeEvent);
451 itkEventMacro(ContourModelExpandTimeBoundsEvent, ContourModelEvent);
ContourModel is a structure of linked vertices defining a contour in 3D space. The vertices are store...
Base of all data objects.
Base class of all Operation-classes.
void Deselect()
Deselect vertex.
Represents a contour in 3D space. A ContourElement is consisting of linked vertices implicitely defin...
#define MITKCONTOURMODEL_EXPORT
mitk::ContourElement::VertexIterator VertexIterator
DataCollection - Class to facilitate loading/accessing structured data.
VertexType * GetSelectedVertex()
Get the current selected vertex.
ContourModelSeries m_ContourSeries
LineSegmentInterpolation
Possible interpolation of the line segments between control points.
#define mitkClassMacro(className, SuperClassName)
void SetSelectedVertexAsControlPoint(bool isControlPoint=true)
Set selected vertex as control point.
mitk::ContourElement::ConstVertexIterator ConstVertexIterator
itkEventMacro(ContourModelEvent, itk::AnyEvent)
#define mitkCloneMacro(classname)
VertexType * m_SelectedVertex
LineSegmentInterpolation m_lineInterpolation
MITKCORE_EXPORT const ScalarType eps
mitk::ContourElement::VertexListType VertexListType
std::vector< mitk::ContourElement::Pointer > ContourModelSeries
LineSegmentInterpolation GetLineSegmentInterpolation()
Get the interpolation of the line segments between control points.
Represents a single vertex of contour.
void SetLineSegmentInterpolation(LineSegmentInterpolation interpolation)
Set the interpolation of the line segments between control points.
BaseGeometry Describes the geometry of a data object.