12 #ifndef _MITK_CONTOURMODEL_H_ 13 #define _MITK_CONTOURMODEL_H_ 52 itkFactorylessNewMacro(
Self);
78 void Deselect() { this->m_SelectedVertex =
nullptr; }
83 if (this->m_SelectedVertex)
85 m_SelectedVertex->IsControlPoint = isControlPoint;
94 this->m_lineInterpolation = interpolation;
123 void AddVertex(VertexType &vertex,
int timestep = 0);
134 void AddVertex(
const VertexType *vertex,
int timestep = 0);
147 void AddVertex(
mitk::Point3D &vertex,
bool isControlPoint,
int timestep = 0);
158 void AddVertexAtFront(
mitk::Point3D &vertex,
int timestep = 0);
169 void AddVertexAtFront(VertexType &vertex,
int timestep = 0);
182 void AddVertexAtFront(
mitk::Point3D &vertex,
bool isControlPoint,
int timestep = 0);
186 void InsertVertexAtIndex(
mitk::Point3D &vertex,
int index,
bool isControlPoint =
false,
int timestep = 0);
190 bool SetVertexAt(
int pointId,
const mitk::Point3D &point,
unsigned int timestep = 0);
194 bool SetVertexAt(
int pointId,
const VertexType *vertex,
unsigned int timestep = 0);
198 bool IsClosed(
int timestep = 0)
const;
211 VertexIterator Begin(
int timestep = 0)
const;
216 VertexIterator IteratorBegin(
int timestep = 0)
const;
221 VertexIterator End(
int timestep = 0)
const;
226 VertexIterator IteratorEnd(
int timestep = 0)
const;
231 virtual void Close(
int timestep = 0);
236 virtual void Open(
int timestep = 0);
243 virtual void SetClosed(
bool isClosed,
int timestep = 0);
248 int GetNumberOfVertices(
int timestep = 0)
const;
253 virtual bool IsEmpty(
int timestep)
const;
257 bool IsEmpty()
const override;
261 virtual const VertexType *GetVertexAt(
int index,
int timestep = 0)
const;
267 int GetIndex(
const VertexType *vertex,
int timestep = 0);
271 bool IsEmptyTimeStep(
unsigned int t)
const override;
279 bool SelectVertexAt(
int index,
int timestep = 0);
283 bool SetControlVertexAt(
int index,
int timestep = 0);
293 bool SelectVertexAt(
mitk::Point3D &point,
float eps,
int timestep = 0);
301 bool SetControlVertexAt(
mitk::Point3D &point,
float eps,
int timestep = 0);
307 bool RemoveVertexAt(
int index,
int timestep = 0);
313 bool RemoveVertex(
const VertexType *vertex,
int timestep = 0);
323 bool RemoveVertexAt(
mitk::Point3D &point,
float eps,
int timestep = 0);
343 virtual void Clear(
int timestep);
347 void Initialize()
override;
358 void SetRequestedRegionToLargestPossibleRegion()
override;
363 bool RequestedRegionIsOutsideOfTheBufferedRegion()
override;
368 bool VerifyRequestedRegion()
override;
383 void SetRequestedRegion(
const itk::DataObject *data)
override;
388 void Expand(
unsigned int timeSteps)
override;
395 void UpdateOutputInformation()
override;
403 void Clear()
override;
408 void ExecuteOperation(
Operation *operation)
override;
414 virtual void RedistributeControlVertices(
int period,
int timestep);
424 void ClearData()
override;
427 void InitializeEmpty()
override;
447 itkEventMacro(ContourModelSizeChangeEvent, ContourModelEvent);
448 itkEventMacro(ContourModelAddEvent, ContourModelSizeChangeEvent);
449 itkEventMacro(ContourModelRemoveEvent, ContourModelSizeChangeEvent);
450 itkEventMacro(ContourModelExpandTimeBoundsEvent, ContourModelEvent);
std::deque< VertexType * > VertexListType
ContourModel is a structure of linked vertices defining a contour in 3D space. The vertices are store...
MITKCORE_EXPORT const ScalarType eps
mitk::ContourElement::VertexType VertexType
itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent)
Base of all data objects.
Base class of all Operation-classes.
void Deselect()
Deselect vertex.
#define MITKCONTOURMODEL_EXPORT
mitk::ContourElement::VertexIterator VertexIterator
DataCollection - Class to facilitate loading/accessing structured data.
VertexListType::const_iterator ConstVertexIterator
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
#define mitkCloneMacro(classname)
VertexType * m_SelectedVertex
LineSegmentInterpolation m_lineInterpolation
mitk::ContourElement::VertexListType VertexListType
VertexListType::iterator VertexIterator
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.