Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
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;
41  us::ModuleResource GetIconResource() const override;
42 
43  void Activated() override;
44  void Deactivated() override;
45 
46  bool SeedImageIsValid();
47 
48  protected:
49  GrowCutTool(); // purposely hidden
50  ~GrowCutTool() override;
51 
52  void DoUpdatePreview(const Image *inputAtTimeStep,
53  const Image *oldSegAtTimeStep,
54  LabelSetImage *previewImage,
55  TimeStepType timeStep) override;
56 
57  double m_DistancePenalty = 0.0;
58  };
59 
60 } // namespace mitk
61 
62 #endif
mitk::SegWithPreviewTool
Base class for any auto segmentation tool that provides a preview of the new segmentation.
Definition: mitkSegWithPreviewTool.h:38
mitk::GrowCutTool::IndexType
SeedImageType::IndexType IndexType
Definition: mitkGrowCutTool.h:37
us
Definition: mitkAbstractFileReader.h:29
mitkSegWithPreviewTool.h
mitk::Image
Image class for storing images.
Definition: mitkImage.h:69
mitk::GrowCutTool::SeedImageType
itk::Image< DefaultSegmentationDataType, 3 > SeedImageType
Definition: mitkGrowCutTool.h:34
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::EventStateMachine
‍**
Definition: mitkEventStateMachine.h:111
mitk::GrowCutTool
Definition: mitkGrowCutTool.h:26
MITKSEGMENTATION_EXPORT
#define MITKSEGMENTATION_EXPORT
Definition: MitkSegmentationExports.h:15
us::ModuleResource
Definition: usModuleResource.h:55
mitk::TimeStepType
std::size_t TimeStepType
Definition: mitkTimeGeometry.h:27
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
MitkSegmentationExports.h
mitk::LabelSetImage
LabelSetImage class for handling labels and layers in a segmentation session.
Definition: mitkLabelSetImage.h:43