Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkSegGroupInsertOperation.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 mitkSegGroupInsertOperation_h
14 #define mitkSegGroupInsertOperation_h
15 
19 
20 namespace mitk
21 {
22  class Image;
23 
33  {
34  public:
36 
37  using ModifyGroupImageMapType = std::map<MultiLabelSegmentation::GroupIndexType, Image::ConstPointer >;
38  using ModifyLabelsMapType = std::map<MultiLabelSegmentation::GroupIndexType, MultiLabelSegmentation::ConstLabelVectorType>;
39  using GroupIndexSetType = std::set<MultiLabelSegmentation::GroupIndexType>;
40  using ModifyGroupNameMapType = std::map<MultiLabelSegmentation::GroupIndexType, std::string >;
41 
49  const GroupIndexSetType& groupIDs,
50  const ModifyGroupImageMapType& groupImages = {},
51  const ModifyLabelsMapType& groupLabels = {});
52 
53  ~SegGroupInsertOperation() override = default;
54 
57 
60 
63 
69 
72 
75 
76  // Explicitly delete copy operations because internally std::unique_ptr are used.
79 
87  const GroupIndexSetType& relevantGroupIDs,
88  bool noLabels = false, bool noGroupImages = false);
89 
90  protected:
91  using ModifyCompressedImageMapType = std::map<MultiLabelSegmentation::GroupIndexType, std::unique_ptr<CompressedImageContainer>>;
96  };
97 
98 }
99 #endif
#define MITKSEGMENTATION_EXPORT
MultiLabelSegmentation class for handling labels and layers in a segmentation session.
ConstLabelVector ConstLabelVectorType
Base class for any operation based on a MultiLabelSegmentation instance.
An Operation for inserting groups into a MultiLabelSegmentation.
MultiLabelSegmentation::ConstLabelVectorType GetGroupLabels(MultiLabelSegmentation::GroupIndexType groupID) const
Get the labels for a specific group index.
SegGroupInsertOperation & operator=(const SegGroupInsertOperation &)=delete
std::map< MultiLabelSegmentation::GroupIndexType, std::unique_ptr< CompressedImageContainer > > ModifyCompressedImageMapType
std::string GetGroupName(MultiLabelSegmentation::GroupIndexType groupID) const
Get the group name for a specific group index.
GroupIndexSetType GetImageGroupIDs() const
Get the group indices that have associated image data.
Image::Pointer GetGroupImage(MultiLabelSegmentation::GroupIndexType groupID) const
Get the group image for a specific group index.
std::map< MultiLabelSegmentation::GroupIndexType, Image::ConstPointer > ModifyGroupImageMapType
static SegGroupInsertOperation * CreateFromSegmentation(MultiLabelSegmentation *segmentation, const GroupIndexSetType &relevantGroupIDs, bool noLabels=false, bool noGroupImages=false)
Factory method that creates an insert operation from the current state of a segmentation.
std::map< MultiLabelSegmentation::GroupIndexType, std::string > ModifyGroupNameMapType
SegGroupInsertOperation(const SegGroupInsertOperation &)=delete
ModifyCompressedImageMapType m_Images
SegGroupInsertOperation(MultiLabelSegmentation *segmentation, const GroupIndexSetType &groupIDs, const ModifyGroupImageMapType &groupImages={}, const ModifyLabelsMapType &groupLabels={})
Construct an insert operation with the given group data.
~SegGroupInsertOperation() override=default
mitkClassMacro(SegGroupInsertOperation, SegChangeOperationBase)
std::map< MultiLabelSegmentation::GroupIndexType, MultiLabelSegmentation::ConstLabelVectorType > ModifyLabelsMapType
GroupIndexSetType GetGroupIDs() const
Get all group indices managed by this operation.
std::set< MultiLabelSegmentation::GroupIndexType > GroupIndexSetType
GroupIndexSetType GetLabelGroupIDs() const
Get the group indices that have associated label data.
class ITK_EXPORT Image
Find image slices visible on a given plane.