I have a label map with numbers which I would like to keep when I convert it to a segment but I don’t know if this is possible.
For example i have labels 1,3,5,8 but I think I loose them to segment 0 1 2 and 4.
I have looked-up this function but I don’t know if this is what I need or how it works?
/// Update segmentation from segments in a labelmap node.
/// \param updatedSegmentIDs Defines how label values 1…N are mapped to segment IDs (0…N-1).
static bool ImportLabelmapToSegmentationNode(vtkOrientedImageData* labelmapImage,
vtkMRMLSegmentationNode* segmentationNode, vtkStringArray* updatedSegmentIDs,
vtkGeneralTransform* labelmapToSegmentationTransform=nullptr );