Medical Imaging Interaction Toolkit  2025.12.02
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 
50 
53 
59 
60  // Explicitly delete copy operations because internally std::unique_ptr are used.
63 
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
#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.
mitkClassMacro(SegGroupModifyOperation, SegChangeOperationBase)
MultiLabelSegmentation::ConstLabelVectorType GetModifiedLabels(MultiLabelSegmentation::GroupIndexType groupID) const
Get the modified group image for a certain group and time step that is applied in the operation.
~SegGroupModifyOperation() override=default
SegGroupModifyOperation(const SegGroupModifyOperation &)=delete
std::map< MultiLabelSegmentation::GroupIndexType, std::string > ModifyGroupNameMapType
GroupIndexVectorType GetNameGroupIDs() const
TimeStepVectorType GetImageTimeSteps(MultiLabelSegmentation::GroupIndexType groupID) const
std::vector< TimeStepType > TimeStepVectorType
GroupIndexVectorType GetLabelGroupIDs() const
ModifyCompressedImageMapType m_ModifiedImages
std::map< TimeStepType, Image::ConstPointer > ModifyTSImageMapType
std::map< MultiLabelSegmentation::GroupIndexType, ModifyTSImageMapType > ModifyGroupImageMapType
std::map< MultiLabelSegmentation::GroupIndexType, MultiLabelSegmentation::ConstLabelVectorType > ModifyLabelsMapType
SegGroupModifyOperation(MultiLabelSegmentation *segmentation, const ModifyGroupImageMapType &modifiedGroupImages, const ModifyLabelsMapType &modifiedLabels, const ModifyGroupNameMapType &modifiedNames)
GroupIndexVectorType GetImageGroupIDs() const
std::string GetModifiedName(MultiLabelSegmentation::GroupIndexType groupID) const
static SegGroupModifyOperation * CreatFromSegmentation(MultiLabelSegmentation *segmentation, const std::set< MultiLabelSegmentation::GroupIndexType > &relevantGroupIDs, bool coverAllTimeSteps, TimeStepType timeStep=0, bool noLabels=false, bool noGroupImages=false, bool noNames=false)
std::vector< MultiLabelSegmentation::GroupIndexType > GroupIndexVectorType
Image::Pointer GetModifiedGroupImage(MultiLabelSegmentation::GroupIndexType groupID, TimeStepType timeStep) const
Get the modified group image for a certain group and time step that is applied in the operation.
SegGroupModifyOperation & operator=(const SegGroupModifyOperation &)=delete
std::map< MultiLabelSegmentation::GroupIndexType, std::map< TimeStepType, std::unique_ptr< CompressedImageContainer > >> ModifyCompressedImageMapType
class ITK_EXPORT Image
Find image slices visible on a given plane.
std::size_t TimeStepType