Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkPickingTool.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 mitkPickingTool_h
14 #define mitkPickingTool_h
15 
16 #include "mitkSegWithPreviewTool.h"
17 #include "mitkPointSet.h"
18 
20 
21 namespace us
22 {
23  class ModuleResource;
24 }
25 
26 namespace mitk
27 {
41  {
42  public:
44  itkFactorylessNewMacro(Self);
45  itkCloneMacro(Self);
46 
47  const char **GetXPM() const override;
48  const char *GetName() const override;
50 
51  void Activated() override;
52  void Deactivated() override;
53 
55  void ClearPicks();
56 
57  bool HasPicks() const;
58 
59  protected:
60  PickingTool(); // purposely hidden
61  ~PickingTool() override;
62 
63  void ConnectActionsAndFunctions() override;
64 
66  virtual void OnAddPoint(StateMachineAction*, InteractionEvent* interactionEvent);
67 
69  virtual void OnDelete(StateMachineAction*, InteractionEvent* interactionEvent);
70 
72  void ClearSeeds();
73 
74  void DoUpdatePreview(const Image* inputAtTimeStep, const Image* oldSegAtTimeStep, MultiLabelSegmentation* previewImage, TimeStepType timeStep) override;
75 
76  // seed point
77  PointSet::Pointer m_PointSet;
78  DataNode::Pointer m_PointSetNode;
79  };
80 
81 } // namespace
82 
83 #endif
#define MITKSEGMENTATION_EXPORT
Image class for storing images.
Definition: mitkImage.h:70
MultiLabelSegmentation class for handling labels and layers in a segmentation session.
Extracts a single region from a segmentation image and creates a new image with same geometry of the ...
PointSet::Pointer m_PointSet
void DoUpdatePreview(const Image *inputAtTimeStep, const Image *oldSegAtTimeStep, MultiLabelSegmentation *previewImage, TimeStepType timeStep) override
virtual void OnAddPoint(StateMachineAction *, InteractionEvent *interactionEvent)
Add point action of StateMachine pattern.
virtual void OnDelete(StateMachineAction *, InteractionEvent *interactionEvent)
Delete action of StateMachine pattern.
us::ModuleResource GetIconResource() const override
Returns the tool button icon of the tool wrapped by a usModuleResource.
bool HasPicks() const
void ConnectActionsAndFunctions() override
DataNode::Pointer m_PointSetNode
const char * GetName() const override
Returns the name of this tool. Make it short!
void ClearSeeds()
Clear all seed points.
void Deactivated() override
Called when the tool gets deactivated.
const char ** GetXPM() const override
Returns an icon in the XPM format.
mitkClassMacro(PickingTool, SegWithPreviewTool)
~PickingTool() override
void Activated() override
Called when the tool gets activated.
Base class for any auto segmentation tool that provides a preview of the new segmentation.
Represents an action, that is executed after a certain event (in statemachine-mechanism) TODO: implem...
Find image slices visible on a given plane.
std::size_t TimeStepType