Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkContourModelLiveWireInteractor.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkContourModelLiveWireInteractor_h
14 #define mitkContourModelLiveWireInteractor_h
15 
16 #include "mitkCommon.h"
19 
21 
22 namespace mitk
23 {
38  {
39  public:
41  itkFactorylessNewMacro(Self);
42  itkCloneMacro(Self);
43 
44  virtual void SetWorkingImage(mitk::Image *_arg);
45 
46  void ConnectActionsAndFunctions() override;
47 
48  protected:
51 
53  bool OnCheckPointClick(const InteractionEvent *interactionEvent) override;
54 
56  void OnMovePoint(StateMachineAction *, InteractionEvent *interactionEvent) override;
58  void OnAddPoint(StateMachineAction*, InteractionEvent* interactionEvent) override;
60  void OnDeletePoint(StateMachineAction *, InteractionEvent *interactionEvent) override;
62  void OnFinishEditing(StateMachineAction *, InteractionEvent *interactionEvent) override;
63 
66  const mitk::ContourModel::VertexType *nextPoint,
67  const mitk::ContourModel::VertexType *previousPoint,
68  int timestep);
71  mitk::ContourModel *contour,
72  int timestep);
73 
74  mitk::ImageLiveWireContourModelFilter::Pointer m_LiveWireFilter;
76 
79 
82 
83  std::vector<itk::Index<2>> m_ContourBeingModified;
84 
85  mitk::ContourModel::Pointer m_ContourLeft;
86  mitk::ContourModel::Pointer m_ContourRight;
87  };
88 
89 } // namespace mitk
90 
91 #endif
#define MITKSEGMENTATION_EXPORT
void SetRepulsivePoints(const mitk::ContourModel::VertexType *nextPoint, mitk::ContourModel *contour, int timestep)
Set repulsive points which should not be changed during editing of the contour.
mitk::ContourModel::VertexIterator m_NextActiveVertexDownIter
mitkClassMacro(ContourModelLiveWireInteractor, ContourModelInteractor)
void OnMovePoint(StateMachineAction *, InteractionEvent *interactionEvent) override
Update contour when point is moved.
bool OnCheckPointClick(const InteractionEvent *interactionEvent) override
Select/ add and select vertex to modify contour and prepare for modification of contour.
mitk::ContourModel::VertexIterator m_NextActiveVertexUpIter
virtual void SetWorkingImage(mitk::Image *_arg)
void OnAddPoint(StateMachineAction *, InteractionEvent *interactionEvent) override
Add a new control point.
void OnDeletePoint(StateMachineAction *, InteractionEvent *interactionEvent) override
Delete selected vertex and recompute contour.
void SplitContourFromSelectedVertex(mitk::ContourModel *srcContour, const mitk::ContourModel::VertexType *nextPoint, const mitk::ContourModel::VertexType *previousPoint, int timestep)
Split contour into a part before the selected vertex and after the selected vertex.
mitk::ImageLiveWireContourModelFilter::Pointer m_LiveWireFilter
void OnFinishEditing(StateMachineAction *, InteractionEvent *interactionEvent) override
Finish modification of contour.
ContourModel is a structure of linked vertices defining a contour in 3D space. The vertices are store...
ContourElement::VertexIterator VertexIterator
Image class for storing images.
Definition: mitkImage.h:70
Represents an action, that is executed after a certain event (in statemachine-mechanism) TODO: implem...
Find image slices visible on a given plane.
Represents a single vertex of a contour.