Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkMonaiLabel2DTool.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 #ifndef mitkMonaiLabel2DTool_h
13 #define mitkMonaiLabel2DTool_h
14 
15 #include <mitkMonaiLabelTool.h>
17 
18 namespace us
19 {
20  class ModuleResource;
21 }
22 
23 namespace mitk
24 {
37  {
38  public:
40  itkFactorylessNewMacro(Self);
41  itkCloneMacro(Self);
42 
44  const char *GetName() const override;
45 
48 
50  void Activated() override;
51 
56  void WriteImage(const Image *inputAtTimeStep, const std::string &inputImagePath) const override;
57 
63  void WriteBackResults(MultiLabelSegmentation *previewImage, MultiLabelSegmentation *segResults, TimeStepType timeStep) const override;
64 
66  void ConfirmCleanUp() override;
67 
68  protected:
69  MonaiLabel2DTool() = default;
70  ~MonaiLabel2DTool() = default;
71  };
72 }
73 #endif
#define MITKSEGMENTATION_EXPORT
Image class for storing multi-dimensional medical image data.
Definition: mitkImage.h:76
MONAI Label segmentation tool operating on 2D slices.
mitkClassMacro(MonaiLabel2DTool, MonaiLabelTool)
void WriteBackResults(MultiLabelSegmentation *previewImage, MultiLabelSegmentation *segResults, TimeStepType timeStep) const override
Write segmentation results back into the preview image at the working plane.
void WriteImage(const Image *inputAtTimeStep, const std::string &inputImagePath) const override
Write the input image slice to disk, extending the 2D slice to a 3D volume with depth 1.
us::ModuleResource GetIconResource() const override
Return the toolbar icon resource for this tool.
const char * GetName() const override
Return the human-readable name of this tool ("MONAI Label 2D").
void ConfirmCleanUp() override
Clean up preview content and clear seeds after confirmation.
void Activated() override
Activate the tool and configure label transfer scope to all labels.
MonaiLabel segmentation tool base class.
MultiLabelSegmentation class for handling labels and layers in a segmentation session.
Represents a resource (text file, image, etc.) embedded in a CppMicroServices module.
Find image slices visible on a given plane.
std::size_t TimeStepType
Type for time step indices (non-negative integers starting from 0).