Medical Imaging Interaction Toolkit  2025.12.02
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 
29  {
30  public:
32 
33  using ModifyGroupImageMapType = std::map<MultiLabelSegmentation::GroupIndexType, Image::ConstPointer >;
34  using ModifyLabelsMapType = std::map<MultiLabelSegmentation::GroupIndexType, MultiLabelSegmentation::ConstLabelVectorType>;
35  using GroupIndexSetType = std::set<MultiLabelSegmentation::GroupIndexType>;
36  using ModifyGroupNameMapType = std::map<MultiLabelSegmentation::GroupIndexType, std::string >;
37 
40  const GroupIndexSetType& groupIDs,
41  const ModifyGroupImageMapType& groupImages = {},
42  const ModifyLabelsMapType& groupLabels = {});
43 
44  ~SegGroupInsertOperation() override = default;
45 
49 
55 
56  // Explicitly delete copy operations because internally std::unique_ptr are used.
59 
61  const GroupIndexSetType& relevantGroupIDs,
62  bool noLabels = false, bool noGroupImages = false);
63 
64  protected:
65  using ModifyCompressedImageMapType = std::map<MultiLabelSegmentation::GroupIndexType, std::unique_ptr<CompressedImageContainer>>;
70  };
71 
72 }
73 #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 applying an edited slice to the a group of a MultiLabelSegmentation.
MultiLabelSegmentation::ConstLabelVectorType GetGroupLabels(MultiLabelSegmentation::GroupIndexType groupID) const
Get the labels for a certain group that is applied in the operation.
SegGroupInsertOperation & operator=(const SegGroupInsertOperation &)=delete
std::map< MultiLabelSegmentation::GroupIndexType, std::unique_ptr< CompressedImageContainer > > ModifyCompressedImageMapType
std::string GetGroupName(MultiLabelSegmentation::GroupIndexType groupID) const
GroupIndexSetType GetImageGroupIDs() const
Image::Pointer GetGroupImage(MultiLabelSegmentation::GroupIndexType groupID) const
Get the modified group image for a certain group and time step that is applied in the operation.
std::map< MultiLabelSegmentation::GroupIndexType, Image::ConstPointer > ModifyGroupImageMapType
static SegGroupInsertOperation * CreateFromSegmentation(MultiLabelSegmentation *segmentation, const GroupIndexSetType &relevantGroupIDs, bool noLabels=false, bool noGroupImages=false)
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={})
~SegGroupInsertOperation() override=default
mitkClassMacro(SegGroupInsertOperation, SegChangeOperationBase)
std::map< MultiLabelSegmentation::GroupIndexType, MultiLabelSegmentation::ConstLabelVectorType > ModifyLabelsMapType
GroupIndexSetType GetGroupIDs() const
std::set< MultiLabelSegmentation::GroupIndexType > GroupIndexSetType
GroupIndexSetType GetLabelGroupIDs() const
class ITK_EXPORT Image
Find image slices visible on a given plane.