Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkGrowCutTool.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 mitkGrowCutTool_h
14 #define mitkGrowCutTool_h
15 
16 #include "mitkSegWithPreviewTool.h"
18 
19 namespace us
20 {
21  class ModuleResource;
22 }
23 
24 namespace mitk
25 {
27  {
28  public:
30  itkFactorylessNewMacro(Self);
31  itkCloneMacro(Self);
32 
33  itkSetMacro(DistancePenalty, double);
34  itkGetConstMacro(DistancePenalty, double);
35 
36  typedef itk::Image<DefaultSegmentationDataType, 3> SeedImageType;
37  typedef typename SeedImageType::IndexType IndexType;
38 
39  const char **GetXPM() const override;
40  const char *GetName() const override;
42 
43  void Activated() override;
44  void Deactivated() override;
45 
47 
48  protected:
49  GrowCutTool(); // purposely hidden
50  ~GrowCutTool() override;
51 
52  void DoUpdatePreview(const Image *inputAtTimeStep,
53  const Image *oldSegAtTimeStep,
54  MultiLabelSegmentation *previewImage,
55  TimeStepType timeStep) override;
56 
57  double m_DistancePenalty = 0.0;
58  };
59 
60 } // namespace mitk
61 
62 #endif
#define MITKSEGMENTATION_EXPORT
us::ModuleResource GetIconResource() const override
Returns the tool button icon of the tool wrapped by a usModuleResource.
mitkClassMacro(GrowCutTool, SegWithPreviewTool)
void DoUpdatePreview(const Image *inputAtTimeStep, const Image *oldSegAtTimeStep, MultiLabelSegmentation *previewImage, TimeStepType timeStep) override
const char ** GetXPM() const override
Returns an icon in the XPM format.
void Deactivated() override
Called when the tool gets deactivated.
~GrowCutTool() override
itk::Image< DefaultSegmentationDataType, 3 > SeedImageType
SeedImageType::IndexType IndexType
void Activated() override
Called when the tool gets activated.
const char * GetName() const override
Returns the name of this tool. Make it short!
Image class for storing images.
Definition: mitkImage.h:70
MultiLabelSegmentation class for handling labels and layers in a segmentation session.
Base class for any auto segmentation tool that provides a preview of the new segmentation.
Find image slices visible on a given plane.
std::size_t TimeStepType