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;
121 void AddVertex(
const VertexType &vertex,
TimeStepType timestep = 0);
162 void AddVertexAtFront(
const VertexType &vertex,
TimeStepType timestep = 0);
175 void AddVertexAtFront(
const Point3D &vertex,
bool isControlPoint,
TimeStepType timestep = 0);
179 void InsertVertexAtIndex(
const Point3D &vertex,
int index,
bool isControlPoint =
false,
TimeStepType timestep = 0);
187 bool SetVertexAt(
int pointId,
const VertexType *vertex,
TimeStepType timestep = 0);
191 bool IsClosed(
int timestep = 0)
const;
209 VertexIterator IteratorBegin(
TimeStepType timestep = 0)
const;
219 VertexIterator IteratorEnd(
TimeStepType timestep = 0)
const;
236 virtual void SetClosed(
bool isClosed,
TimeStepType timestep = 0);
241 int GetNumberOfVertices(
TimeStepType timestep = 0)
const;
250 bool IsEmpty()
const override;
255 virtual const VertexType *GetVertexAt(
int index,
TimeStepType timestep = 0)
const;
271 int GetIndex(
const VertexType *vertex,
TimeStepType timestep = 0);
275 bool IsEmptyTimeStep(
unsigned int t)
const override;
284 bool SelectVertexAt(
int index,
TimeStepType timestep = 0);
288 bool SetControlVertexAt(
int index,
TimeStepType timestep = 0);
323 bool RemoveVertexAt(
int index,
TimeStepType timestep = 0);
329 bool RemoveVertex(
const VertexType *vertex,
TimeStepType timestep = 0);
345 void ShiftSelectedVertex(
Vector3D &translate);
363 void Initialize()
override;
372 VertexListType GetControlVertices(
TimeStepType timestep);
382 void SetRequestedRegionToLargestPossibleRegion()
override;
387 bool RequestedRegionIsOutsideOfTheBufferedRegion()
override;
392 bool VerifyRequestedRegion()
override;
397 void SetRequestedRegion(
const itk::DataObject *data)
override;
402 void Expand(
unsigned int timeSteps)
override;
409 void UpdateOutputInformation()
override;
417 void Clear()
override;
422 void ExecuteOperation(
Operation *operation)
override;
428 virtual void RedistributeControlVertices(
int period,
TimeStepType timestep);
438 void ClearData()
override;
441 void InitializeEmpty()
override;
444 static void ShiftVertex(VertexType *vertex,
Vector3D &vector);
461 itkEventMacro(ContourModelSizeChangeEvent, ContourModelEvent);
462 itkEventMacro(ContourModelAddEvent, ContourModelSizeChangeEvent);
463 itkEventMacro(ContourModelRemoveEvent, ContourModelSizeChangeEvent);
464 itkEventMacro(ContourModelExpandTimeBoundsEvent, ContourModelEvent);
VertexListType::const_iterator ConstVertexIterator
ContourModel is a structure of linked vertices defining a contour in 3D space. The vertices are store...
MITKCORE_EXPORT const ScalarType eps
itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent)
VertexListType::iterator VertexIterator
ContourElement::VertexListType VertexListType
Base of all data objects.
Base class of all Operation-classes.
void Deselect()
Deselect vertex.
#define MITKCONTOURMODEL_EXPORT
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)
ContourElement::VertexType VertexType
void SetSelectedVertexAsControlPoint(bool isControlPoint=true)
Set selected vertex as control point.
std::vector< ContourElement::Pointer > ContourModelSeries
std::vcl_size_t TimeStepType
#define mitkCloneMacro(classname)
std::deque< VertexType * > VertexListType
ContourElement::ConstVertexIterator ConstVertexIterator
VertexType * m_SelectedVertex
LineSegmentInterpolation m_lineInterpolation
ContourElement::VertexIterator VertexIterator
LineSegmentInterpolation GetLineSegmentInterpolation()
Get the interpolation of the line segments between control points.
Represents a single vertex of a contour.
void SetLineSegmentInterpolation(LineSegmentInterpolation interpolation)
Set the interpolation of the line segments between control points.