Medical Imaging Interaction Toolkit  2021.10.00
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_Included
14 #define mitkContourModelLiveWireInteractor_h_Included
15 
16 #include "mitkCommon.h"
19 
21 
22 namespace mitk
23 {
38  {
39  public:
41  itkFactorylessNewMacro(Self);
42  itkCloneMacro(Self);
43 
44  virtual void SetEditingContourModelNode(mitk::DataNode *_arg);
45 
46  virtual void SetWorkingImage(mitk::Image *_arg);
47 
48  void ConnectActionsAndFunctions() override;
49 
50  protected:
53 
55  bool OnCheckPointClick(const InteractionEvent *interactionEvent) override;
57  bool IsHovering(const InteractionEvent *interactionEvent) override;
58 
60  void OnMovePoint(StateMachineAction *, InteractionEvent *interactionEvent) override;
62  void OnDeletePoint(StateMachineAction *, InteractionEvent *interactionEvent) override;
64  void OnFinishEditing(StateMachineAction *, InteractionEvent *interactionEvent) override;
65 
67  void SplitContourFromSelectedVertex(mitk::ContourModel *srcContour,
68  const mitk::ContourModel::VertexType *nextPoint,
69  const mitk::ContourModel::VertexType *previousPoint,
70  int timestep);
72  void SetRepulsivePoints(const mitk::ContourModel::VertexType *nextPoint,
73  mitk::ContourModel *contour,
74  int timestep);
75 
76  const float eps = 3.0;
79 
82 
85 
86  std::vector<itk::Index<2>> m_ContourBeingModified;
87 
91  };
92 
93 } // namespace mitk
94 
95 #endif // mitkContourModelLiveWireInteractor_h_Included
ContourModel is a structure of linked vertices defining a contour in 3D space. The vertices are store...
MITKCORE_EXPORT const ScalarType eps
mitk::ContourModel::VertexIterator m_NextActiveVertexUpIter
#define MITKSEGMENTATION_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
mitk::ImageLiveWireContourModelFilter::Pointer m_LiveWireFilter
Base class from with interactors that handle DataNodes are to be derived.
mitk::ContourModel::VertexIterator m_NextActiveVertexDownIter
Represents an action, that is executed after a certain event (in statemachine-mechanism) TODO: implem...
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
Image class for storing images.
Definition: mitkImage.h:69
ContourElement::VertexIterator VertexIterator
Represents a single vertex of a contour.
Class for nodes of the DataTree.
Definition: mitkDataNode.h:57