Updating segmentation using numpy and transforms

Hello,
I downloaded some Contrast-enhanced CT scans and I used the Curved Planar Reformat extension in order to generate a straight volume of the aorta.
I have the need to edit the segmentations on the straightened space and, for instance, delete the first half of the vessel.
What I tried is the following:


straight_volume_node = slicer.util.getNode("straight_volume_node")
seg_node = slicer.util.getNode("segmenation")
straighteningTransformNode = slicer.util.getNode("straighteningTransform")

seg_node.SetAndObserveTransformNodeID(straighteningTransformNode.GetID())

aorta_array = arrayFromSegmentBinaryLabelmap(seg_node, "aorta", straight_volume_node)

#suppose the shape is (200,400,400)

aorta_array[100:,:,:] = 0

slicer.util.updateSegmentBinaryLabelmapFromArray(
                 aorta_array,
                 seg_node,
                 "aorta",
                 straight_volume_node,
             )

seg_node.SetAndObserveTransformNodeID(None)

However, this does not work, the segmentation is not aligned with the original volume.
How can I fix this ?