Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkFillRegionBaseTool.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 mitkFillRegionBaseTool_h
14 #define mitkFillRegionBaseTool_h
15 
16 #include "mitkCommon.h"
17 #include "mitkContourModelUtils.h"
18 #include "mitkContourUtils.h" //TODO remove legacy support
19 #include "mitkImage.h"
20 #include "mitkSegTool2D.h"
22 
23 #include "mitkDataNode.h"
24 
25 #include "mitkImageCast.h"
26 
27 namespace mitk
28 {
42  {
43  public:
45 
46  protected:
47  FillRegionBaseTool(); // purposely hidden
48  ~FillRegionBaseTool() override;
49 
50  void ConnectActionsAndFunctions() override;
51 
53  virtual void OnClick(StateMachineAction*, InteractionEvent* interactionEvent);
54 
68  virtual Image::Pointer GenerateFillImage(const Image* workingSlice, Point3D seedPoint, mitk::Label::PixelType& seedLabelValue) const;
69 
72  virtual void PrepareFilling(const Image* workingSlice, Point3D seedPoint) = 0;
73 
74  Label::PixelType m_FillLabelValue = 0;
75  Label::PixelType m_SeedLabelValue = 0;
76 
78  private:
79  };
80 
81 } // namespace
82 
83 #endif
#define MITKSEGMENTATION_EXPORT
Base class for tools that fill a connected region of a 2D slice.
~FillRegionBaseTool() override
virtual Image::Pointer GenerateFillImage(const Image *workingSlice, Point3D seedPoint, mitk::Label::PixelType &seedLabelValue) const
virtual void OnClick(StateMachineAction *, InteractionEvent *interactionEvent)
Add a control point and finish current segment.
mitkClassMacro(FillRegionBaseTool, SegTool2D)
void ConnectActionsAndFunctions() override
virtual void PrepareFilling(const Image *workingSlice, Point3D seedPoint)=0
Image class for storing images.
Definition: mitkImage.h:70
unsigned short PixelType
Definition: mitkLabel.h:94
Abstract base class for segmentation tools.
Definition: mitkSegTool2D.h:57
Represents an action, that is executed after a certain event (in statemachine-mechanism) TODO: implem...
Find image slices visible on a given plane.