Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkLabelSetImageConverter.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 mitkLabelSetImageConverter_h
14 #define mitkLabelSetImageConverter_h
15 
16 #include <mitkLabelSetImage.h>
17 
18 namespace mitk
19 {
23  MITKMULTILABEL_EXPORT Image::Pointer ConvertLabelSetImageToImage(MultiLabelSegmentation::ConstPointer labelSetImage);
24 
29  MITKMULTILABEL_EXPORT MultiLabelSegmentation::Pointer ConvertImageToLabelSetImage(Image::Pointer image);
30  MITKMULTILABEL_EXPORT MultiLabelSegmentation::Pointer ConvertImageVectorToLabelSetImage(const std::vector<mitk::Image::Pointer>& images, const TimeGeometry* timeGeometry);
31 
32  MITKMULTILABEL_EXPORT std::vector<mitk::Image::Pointer> SplitVectorImage(const Image* vecImage);
33 
38 
40 
42 
51 
61 
62  using IDToLabelClassNameMapType = std::map<MultiLabelSegmentation::LabelValueType, std::string>;
72  MITKMULTILABEL_EXPORT std::pair<Image::Pointer, IDToLabelClassNameMapType> CreateLabelClassMap(const MultiLabelSegmentation* segmentation, MultiLabelSegmentation::GroupIndexType groupID, const MultiLabelSegmentation::LabelValueVectorType& selectedLabels);
73 
83  MITKMULTILABEL_EXPORT std::pair<Image::Pointer, IDToLabelClassNameMapType> CreateLabelClassMap(const MultiLabelSegmentation* segmentation, MultiLabelSegmentation::GroupIndexType groupID);
84 
85 }
86 
87 #endif
#define MITKMULTILABEL_EXPORT
Image class for storing images.
Definition: mitkImage.h:70
MultiLabelSegmentation class for handling labels and layers in a segmentation session.
ConstLabelVector ConstLabelVectorType
std::vector< LabelValueType > LabelValueVectorType
mitk::Label::PixelType LabelValueType
Find image slices visible on a given plane.
std::vector< std::pair< Label::PixelType, Label::PixelType > > LabelValueMappingVector
MITKMULTILABEL_EXPORT Image::Pointer CreateFilteredGroupImage(const MultiLabelSegmentation *segmentation, MultiLabelSegmentation::GroupIndexType groupID, const MultiLabelSegmentation::LabelValueVectorType &selectedLabels)
MITKMULTILABEL_EXPORT Image::Pointer ConvertLabelSetImageToImage(MultiLabelSegmentation::ConstPointer labelSetImage)
Convert mitk::MultiLabelSegmentation to mitk::Image (itk::VectorImage)
MITKMULTILABEL_EXPORT Image::Pointer CreateLabelMask(const MultiLabelSegmentation *segmentation, MultiLabelSegmentation::LabelValueType labelValue, bool createBinaryMap=true)
MITKMULTILABEL_EXPORT MultiLabelSegmentation::Pointer ConvertImageToLabelSetImage(Image::Pointer image)
Convert mitk::Image to mitk::MultiLabelSegmentation, templating and differentation between itk::Image...
MITKMULTILABEL_EXPORT std::pair< Image::Pointer, IDToLabelClassNameMapType > CreateLabelClassMap(const MultiLabelSegmentation *segmentation, MultiLabelSegmentation::GroupIndexType groupID, const MultiLabelSegmentation::LabelValueVectorType &selectedLabels)
MITKMULTILABEL_EXPORT MultiLabelSegmentation::Pointer ConvertImageVectorToLabelSetImage(const std::vector< mitk::Image::Pointer > &images, const TimeGeometry *timeGeometry)
std::map< MultiLabelSegmentation::LabelValueType, std::string > IDToLabelClassNameMapType
MITKMULTILABEL_EXPORT bool CheckForLabelValueConflictsAndResolve(const mitk::MultiLabelSegmentation::LabelValueVectorType &newValues, mitk::MultiLabelSegmentation::LabelValueVectorType &usedLabelValues, mitk::MultiLabelSegmentation::LabelValueVectorType &correctedLabelValues)
MITKMULTILABEL_EXPORT std::vector< mitk::Image::Pointer > SplitVectorImage(const Image *vecImage)
MITKMULTILABEL_EXPORT Image::Pointer ConvertImageToGroupImage(const Image *inputImage, mitk::MultiLabelSegmentation::LabelValueVectorType &foundLabels)
MITKMULTILABEL_EXPORT MultiLabelSegmentation::LabelVectorType GenerateLabelSetWithMappedValues(const MultiLabelSegmentation::ConstLabelVectorType &, LabelValueMappingVector labelMapping)