12 #ifndef mitkContourModel_h
13 #define mitkContourModel_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;
273 int GetIndex(
const VertexType *vertex,
TimeStepType timestep = 0);
277 bool IsEmptyTimeStep(
unsigned int t)
const override;
289 bool GetLineSegmentForPoint(
Point3D &point,
302 bool findClosest =
true)
const;
306 bool SelectVertexAt(
int index,
TimeStepType timestep = 0);
310 bool SetControlVertexAt(
int index,
TimeStepType timestep = 0);
345 bool RemoveVertexAt(
int index,
TimeStepType timestep = 0);
351 bool RemoveVertex(
const VertexType *vertex,
TimeStepType timestep = 0);
367 void ShiftSelectedVertex(
Vector3D &translate);
385 void Initialize()
override;
394 VertexListType GetControlVertices(
TimeStepType timestep);
404 void SetRequestedRegionToLargestPossibleRegion()
override;
409 bool RequestedRegionIsOutsideOfTheBufferedRegion()
override;
414 bool VerifyRequestedRegion()
override;
419 void SetRequestedRegion(
const itk::DataObject *data)
override;
424 void Expand(
unsigned int timeSteps)
override;
431 void UpdateOutputInformation()
override;
439 void Clear()
override;
444 void ExecuteOperation(
Operation *operation)
override;
450 virtual void RedistributeControlVertices(
int period,
TimeStepType timestep);
460 void ClearData()
override;
463 void InitializeEmpty()
override;
466 static void ShiftVertex(VertexType *vertex,
Vector3D &vector);