Hi,
I have a labelmap and I’m transforming it using a transform node:
lblmap_node.SetAndObserveTransformNodeID(transform_node.GetID())
but then when I save this labelmap_node and open it later it seems like it hasn’t been transformed:
slicer.util.saveNode(lblmap_node, path)
I’ve seen threads here about hardening the transform, or exporting the node in the world coordinate system. I finally extract the segmentation out of labelmap, apply the transform of segmentation node and convert it into labelmap again:
segmentation_node.SetAndObserveTransformNodeID(transform_node.GetID())
slicer.modules.segmentations.logic().ExportVisibleSegmentsToLabelmapNode(segmentationNode, segmentationLblmap, reference_volume_node)
It works but weiredly it cuts an area of labelmap shown in the image bellow:
instead of being like this:
Am I missing something here? I appreciate any suggestions.
Best,
Saeed