Medical Imaging Interaction Toolkit  2018.4.99-37cb6b01
Medical Imaging Interaction Toolkit
mitkPaintbrushTool.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 mitkPaintbrushTool_h_Included
14 #define mitkPaintbrushTool_h_Included
15 
16 #include "mitkCommon.h"
18 #include "mitkPointOperation.h"
19 #include "mitkPointSet.h"
21 
22 namespace mitk
23 {
24  class StateMachineAction;
25  class InteractionEvent;
26  class InteractionPositionEvent;
27 
45  {
46  public:
47  // sent when the pen size is changed or should be updated in a GUI.
49 
51 
52  void SetSize(int value);
53 
54  protected:
55  PaintbrushTool(int paintingPixelValue = 1); // purposely hidden
56  ~PaintbrushTool() override;
57 
58  void ConnectActionsAndFunctions() override;
59 
60  void Activated() override;
61  void Deactivated() override;
62 
63  virtual void OnMousePressed(StateMachineAction *, InteractionEvent *);
64  virtual void OnMouseMoved(StateMachineAction *, InteractionEvent *);
65  virtual void OnPrimaryButtonPressedMoved(StateMachineAction *, InteractionEvent *);
66  virtual void MouseMoved(mitk::InteractionEvent *interactionEvent, bool leftMouseButtonPressed);
67  virtual void OnMouseReleased(StateMachineAction *, InteractionEvent *);
68  virtual void OnInvertLogic(StateMachineAction *, InteractionEvent *);
69 
74  void UpdateContour(const InteractionPositionEvent *);
75 
79  mitk::Point2D upperLeft(mitk::Point2D p);
80 
84  void CheckIfCurrentSliceHasChanged(const InteractionPositionEvent *event);
85 
86  void OnToolManagerWorkingDataModified();
87 
89  static int m_Size;
90 
92 
94 
99  };
100 
101 } // namespace
102 
103 #endif
DataNode::Pointer m_WorkingNode
Paintbrush tool for InteractiveSegmentation.
Super class for all position events.
mitk::Point3D m_LastPosition
#define MITKSEGMENTATION_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
ContourModel::Pointer m_MasterContour
Represents an action, that is executed after a certain event (in statemachine-mechanism) TODO: implem...
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
Message1< int > SizeChanged
Image::Pointer m_WorkingSlice
Base class for tools that use a contour for feedback.
PlaneGeometry::ConstPointer m_CurrentPlane
itk::SmartPointer< Self > Pointer
Definition: mitkBaseData.h:46