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;
210 VertexIterator Begin(
int timestep = 0)
const;
215 VertexIterator IteratorBegin(
int timestep = 0)
const;
220 VertexIterator End(
int timestep = 0)
const;
225 VertexIterator IteratorEnd(
int timestep = 0)
const;
230 virtual void Close(
int timestep = 0);
235 virtual void Open(
int timestep = 0);
242 virtual void SetClosed(
bool isClosed,
int timestep = 0);
247 int GetNumberOfVertices(
int timestep = 0)
const;
252 virtual bool IsEmpty(
int timestep)
const;
256 bool IsEmpty()
const override;
260 virtual const VertexType *GetVertexAt(
int index,
int timestep = 0)
const;
266 int GetIndex(
const VertexType *vertex,
int timestep = 0);
270 bool IsEmptyTimeStep(
unsigned int t)
const override;
278 bool SelectVertexAt(
int index,
int timestep = 0);
282 bool SetControlVertexAt(
int index,
int timestep = 0);
292 bool SelectVertexAt(
mitk::Point3D &point,
float eps,
int timestep = 0);
300 bool SetControlVertexAt(
mitk::Point3D &point,
float eps,
int timestep = 0);
306 bool RemoveVertexAt(
int index,
int timestep = 0);
312 bool RemoveVertex(
const VertexType *vertex,
int timestep = 0);
322 bool RemoveVertexAt(
mitk::Point3D &point,
float eps,
int timestep = 0);
342 virtual void Clear(
int timestep);
346 void Initialize()
override;
357 void SetRequestedRegionToLargestPossibleRegion()
override;
362 bool RequestedRegionIsOutsideOfTheBufferedRegion()
override;
367 bool VerifyRequestedRegion()
override;
382 void SetRequestedRegion(
const itk::DataObject *data)
override;
387 void Expand(
unsigned int timeSteps)
override;
394 void UpdateOutputInformation()
override;
402 void Clear()
override;
407 void ExecuteOperation(
Operation *operation)
override;
413 virtual void RedistributeControlVertices(
int period,
int timestep);
423 void ClearData()
override;
426 void InitializeEmpty()
override;
446 itkEventMacro(ContourModelSizeChangeEvent, ContourModelEvent);
447 itkEventMacro(ContourModelAddEvent, ContourModelSizeChangeEvent);
448 itkEventMacro(ContourModelRemoveEvent, ContourModelSizeChangeEvent);
449 itkEventMacro(ContourModelExpandTimeBoundsEvent, ContourModelEvent);
std::deque< VertexType * > VertexListType
ContourModel is a structure of linked vertices defining a contour in 3D space. The vertices are store...
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
MITKCORE_EXPORT const ScalarType eps
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.