Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkCloseRegionTool.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 mitkCloseRegionTool_h
14 #define mitkCloseRegionTool_h
15 
16 #include <mitkFillRegionBaseTool.h>
18 
19 namespace us
20 {
21  class ModuleResource;
22 }
23 
24 namespace mitk
25 {
42  {
43  public:
45  itkFactorylessNewMacro(Self);
46  itkCloneMacro(Self);
47 
50 
53 
55  const char *GetName() const override;
56 
57  protected:
58  CloseRegionTool() = default; // purposely hidden
59  ~CloseRegionTool() = default;
60 
67  Image::Pointer GenerateFillImage(const Image* workingSlice, Point3D seedPoint, mitk::Label::PixelType& seedLabelValue) const override;
68 
70  void PrepareFilling(const Image* workingSlice, Point3D seedPoint) override;
71 
72  };
73 
74 } // namespace
75 
76 #endif
#define MITKSEGMENTATION_EXPORT
Closes/fills the inside of a contour with the foreground pixel value.
const char * GetName() const override
Return the human-readable name of this tool ("Close").
~CloseRegionTool()=default
mitkClassMacro(CloseRegionTool, FillRegionBaseTool)
us::ModuleResource GetIconResource() const override
Return the toolbar icon resource for this tool.
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 and closing holes.
us::ModuleResource GetCursorIconResource() const override
Return the cursor icon resource for this tool.
void PrepareFilling(const Image *workingSlice, Point3D seedPoint) override
Configure fill parameters (label value and merge style) before applying the fill.
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.