Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkEraseRegionTool.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 mitkEraseRegionTool_h
14 #define mitkEraseRegionTool_h
15 
16 #include <mitkFillRegionBaseTool.h>
18 
19 namespace us
20 {
21  class ModuleResource;
22 }
23 
24 namespace mitk
25 {
38  {
39  public:
41  itkFactorylessNewMacro(Self);
42  itkCloneMacro(Self);
43 
46 
49 
51  const char *GetName() const override;
52 
53  protected:
54  EraseRegionTool() = default; // purposely hidden
55  ~EraseRegionTool() = default;
56 
63  Image::Pointer GenerateFillImage(const Image* workingSlice, Point3D seedPoint, mitk::Label::PixelType& seedLabelValue) const override;
64 
66  void PrepareFilling(const Image* workingSlice, Point3D seedPoint) override;
67  };
68 
69 } // namespace
70 
71 #endif
#define MITKSEGMENTATION_EXPORT
Erase a connected region by filling it with the background (unlabeled) pixel value.
us::ModuleResource GetIconResource() const override
Return the toolbar icon resource for this tool.
us::ModuleResource GetCursorIconResource() const override
Return the cursor icon resource for this tool.
~EraseRegionTool()=default
Image::Pointer GenerateFillImage(const Image *workingSlice, Point3D seedPoint, mitk::Label::PixelType &seedLabelValue) const override
Generate a fill image by region-growing from the seed point.
void PrepareFilling(const Image *workingSlice, Point3D seedPoint) override
Configure fill parameters to erase (set fill label to UNLABELED_VALUE).
mitkClassMacro(EraseRegionTool, FillRegionBaseTool)
const char * GetName() const override
Return the human-readable name of this tool ("Erase").
Base class for tools that fill a connected region of a 2D slice.
Image class for storing multi-dimensional medical image data.
Definition: mitkImage.h:76
unsigned short PixelType
Pixel type used for label values (unsigned short).
Definition: mitkLabel.h:106
Represents a resource (text file, image, etc.) embedded in a CppMicroServices module.
Find image slices visible on a given plane.