Medical Imaging Interaction Toolkit  2025.08.99-f7084adb
Medical Imaging Interaction Toolkit
mitkSegGroupModifyOperation.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 mitkSegGroupModifyOperation_h
14 #define mitkSegGroupModifyOperation_h
15 
19 
20 namespace mitk
21 {
22  class Image;
23 
29  {
30  public:
32 
33  using ModifyTSImageMapType = std::map<TimeStepType, Image::ConstPointer>;
34  using ModifyGroupImageMapType = std::map<MultiLabelSegmentation::GroupIndexType, ModifyTSImageMapType >;
35  using ModifyLabelsMapType = std::map<MultiLabelSegmentation::GroupIndexType, MultiLabelSegmentation::ConstLabelVectorType>;
36  using GroupIndexVectorType = std::vector<MultiLabelSegmentation::GroupIndexType>;
37  using TimeStepVectorType = std::vector<TimeStepType>;
38  using ModifyGroupNameMapType = std::map<MultiLabelSegmentation::GroupIndexType, std::string >;
39 
42  const ModifyGroupImageMapType& modifiedGroupImages,
43  const ModifyLabelsMapType& modifiedLabels,
44  const ModifyGroupNameMapType& modifiedNames);
45 
46  ~SegGroupModifyOperation() override = default;
47 
48  GroupIndexVectorType GetImageGroupIDs() const;
49  TimeStepVectorType GetImageTimeSteps(MultiLabelSegmentation::GroupIndexType groupID) const;
50 
51  GroupIndexVectorType GetLabelGroupIDs() const;
52  GroupIndexVectorType GetNameGroupIDs() const;
53 
55  Image::Pointer GetModifiedGroupImage(MultiLabelSegmentation::GroupIndexType groupID, TimeStepType timeStep) const;
58  std::string GetModifiedName(MultiLabelSegmentation::GroupIndexType groupID) const;
59 
60  // Explicitly delete copy operations because internally std::unique_ptr are used.
62  SegGroupModifyOperation& operator=(const SegGroupModifyOperation&) = delete;
63 
64  static SegGroupModifyOperation* CreatFromSegmentation(MultiLabelSegmentation* segmentation,
65  const std::set<MultiLabelSegmentation::GroupIndexType>& relevantGroupIDs, bool coverAllTimeSteps, TimeStepType timeStep = 0,
66  bool noLabels = false, bool noGroupImages = false, bool noNames = false);
67 
68  protected:
69  using ModifyCompressedImageMapType = std::map<MultiLabelSegmentation::GroupIndexType, std::map<TimeStepType, std::unique_ptr<CompressedImageContainer>>>;
73  };
74 
75 }
76 #endif
mitk::SegGroupModifyOperation
An Operation for applying an edited slice to the a group of a MultiLabelSegmentation.
Definition: mitkSegGroupModifyOperation.h:28
mitk::SegGroupModifyOperation::TimeStepVectorType
std::vector< TimeStepType > TimeStepVectorType
Definition: mitkSegGroupModifyOperation.h:37
itk::SmartPointer< Self >
mitkCompressedImageContainer.h
mitk::MultiLabelSegmentation::GroupIndexType
std::size_t GroupIndexType
Definition: mitkLabelSetImage.h:56
mitk::SegGroupModifyOperation::ModifyTSImageMapType
std::map< TimeStepType, Image::ConstPointer > ModifyTSImageMapType
Definition: mitkSegGroupModifyOperation.h:33
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::SegGroupModifyOperation::ModifyGroupImageMapType
std::map< MultiLabelSegmentation::GroupIndexType, ModifyTSImageMapType > ModifyGroupImageMapType
Definition: mitkSegGroupModifyOperation.h:34
mitk::SegGroupModifyOperation::ModifyLabelsMapType
std::map< MultiLabelSegmentation::GroupIndexType, MultiLabelSegmentation::ConstLabelVectorType > ModifyLabelsMapType
Definition: mitkSegGroupModifyOperation.h:35
mitk::SegGroupModifyOperation::m_ModifiedNames
ModifyGroupNameMapType m_ModifiedNames
Definition: mitkSegGroupModifyOperation.h:72
mitk::MultiLabelSegmentation
MultiLabelSegmentation class for handling labels and layers in a segmentation session.
Definition: mitkLabelSetImage.h:43
mitkSegChangeOperationBase.h
mitk::SegGroupModifyOperation::ModifyCompressedImageMapType
std::map< MultiLabelSegmentation::GroupIndexType, std::map< TimeStepType, std::unique_ptr< CompressedImageContainer > >> ModifyCompressedImageMapType
Definition: mitkSegGroupModifyOperation.h:69
MITKSEGMENTATION_EXPORT
#define MITKSEGMENTATION_EXPORT
Definition: MitkSegmentationExports.h:15
mitk::MultiLabelSegmentation::ConstLabelVectorType
ConstLabelVector ConstLabelVectorType
Definition: mitkLabelSetImage.h:58
mitk::TimeStepType
std::size_t TimeStepType
Definition: mitkTimeGeometry.h:27
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
itk::Image
class ITK_EXPORT Image
Definition: mitkGeometryClipImageFilter.h:25
MitkSegmentationExports.h
mitk::SegGroupModifyOperation::m_ModifiedLabels
ModifyLabelsMapType m_ModifiedLabels
Definition: mitkSegGroupModifyOperation.h:71
mitk::SegGroupModifyOperation::ModifyGroupNameMapType
std::map< MultiLabelSegmentation::GroupIndexType, std::string > ModifyGroupNameMapType
Definition: mitkSegGroupModifyOperation.h:38
mitk::SegGroupModifyOperation::m_ModifiedImages
ModifyCompressedImageMapType m_ModifiedImages
Definition: mitkSegGroupModifyOperation.h:70
mitk::SegChangeOperationBase
Base class for any operation based on a MultiLabelSegmentation instance.
Definition: mitkSegChangeOperationBase.h:38
mitk::SegGroupModifyOperation::GroupIndexVectorType
std::vector< MultiLabelSegmentation::GroupIndexType > GroupIndexVectorType
Definition: mitkSegGroupModifyOperation.h:36