Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkSegChangeOperationApplier.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 mitkSegChangeOperationApplier_h
14 #define mitkSegChangeOperationApplier_h
15 
16 #include "mitkCommon.h"
17 #include <mitkOperationActor.h>
19 
20 namespace mitk
21 {
26  {
27  public:
29 
30 
31  static SegChangeOperationApplier *GetInstance();
32 
38  void ExecuteOperation(Operation *op) override;
39 
40  protected:
42 
44  };
45 
46 
48 
50  {
51  public:
52 
53  using GroupIndexSetType = std::set<MultiLabelSegmentation::GroupIndexType>;
54 
57  const GroupIndexSetType& relevantGroupIDs, bool coverAllTimeSteps, TimeStepType timeStep = 0,
58  bool noLabels = false, bool noGroupImages = false, bool noNames = false);
59 
61 
62  void RegisterUndoRedoOperationEvent(const std::string& description);
63 
64  protected:
65  MultiLabelSegmentation::Pointer m_Segmentation;
69  bool m_NoLabels;
71  bool m_NoNames;
72 
74  };
75 
77  {
78  public:
79 
80  using GroupIndexSetType = std::set<MultiLabelSegmentation::GroupIndexType>;
81 
84  const GroupIndexSetType& relevantGroupIDs, bool noLabels = false, bool noGroupImages = false);
85 
87 
88  void RegisterUndoRedoOperationEvent(const std::string& description);
89 
90  protected:
91  MultiLabelSegmentation::Pointer m_Segmentation;
93  bool m_NoLabels;
95 
97  };
98 
100  {
101  public:
102 
103  using GroupIndexSetType = std::set<MultiLabelSegmentation::GroupIndexType>;
104 
107  const GroupIndexSetType& relevantGroupIDs, bool noLabels = false, bool noGroupImages = false);
108 
110 
111  void RegisterUndoRedoOperationEvent(const std::string& description);
112 
113  protected:
114  MultiLabelSegmentation::Pointer m_Segmentation;
116 
117 
119  };
120 
122  {
123  public:
124 
127  const MultiLabelSegmentation::LabelValueVectorType& relevantLabels);
128 
130 
131  void RegisterUndoRedoOperationEvent(const std::string& description);
132 
133  protected:
134  MultiLabelSegmentation::Pointer m_Segmentation;
136 
137 
139  };
140 }
141 #endif
#define MITKSEGMENTATION_EXPORT
MultiLabelSegmentation class for handling labels and layers in a segmentation session.
std::vector< LabelValueType > LabelValueVectorType
abstract class, that can be used by Undo to undo an operation.
Base class of all Operation-classes.
Definition: mitkOperation.h:30
Executes a all operations based on SegChangeOperationBase.
mitkClassMacroNoParent(SegChangeOperationApplier) static SegChangeOperationApplier *GetInstance()
Returns an instance of the class.
void ExecuteOperation(Operation *op) override
Executes a SegGroupModifyOperation.
Base class for any operation based on a MultiLabelSegmentation instance.
void RegisterUndoRedoOperationEvent(const std::string &description)
SegGroupInsertUndoRedoHelper(MultiLabelSegmentation *segmentation, const GroupIndexSetType &relevantGroupIDs, bool noLabels=false, bool noGroupImages=false)
std::set< MultiLabelSegmentation::GroupIndexType > GroupIndexSetType
MultiLabelSegmentation::Pointer m_Segmentation
SegGroupModifyUndoRedoHelper(MultiLabelSegmentation *segmentation, const GroupIndexSetType &relevantGroupIDs, bool coverAllTimeSteps, TimeStepType timeStep=0, bool noLabels=false, bool noGroupImages=false, bool noNames=false)
std::set< MultiLabelSegmentation::GroupIndexType > GroupIndexSetType
MultiLabelSegmentation::Pointer m_Segmentation
void RegisterUndoRedoOperationEvent(const std::string &description)
MultiLabelSegmentation::Pointer m_Segmentation
SegGroupRemoveUndoRedoHelper(MultiLabelSegmentation *segmentation, const GroupIndexSetType &relevantGroupIDs, bool noLabels=false, bool noGroupImages=false)
std::set< MultiLabelSegmentation::GroupIndexType > GroupIndexSetType
void RegisterUndoRedoOperationEvent(const std::string &description)
MultiLabelSegmentation::LabelValueVectorType m_RelevantLabels
SegLabelPropModifyUndoRedoHelper(MultiLabelSegmentation *segmentation, const MultiLabelSegmentation::LabelValueVectorType &relevantLabels)
void RegisterUndoRedoOperationEvent(const std::string &description)
Find image slices visible on a given plane.
std::size_t TimeStepType