How to load AIM annotations on top of the scans?

Hello. So i tried doing what you said. I wrote a script to extract the segmentations and converted them to nrrd format. One problem though which I tried solving using your answer here - How to find the image match between the external reference with the annotations and the sequence in 3DSlicer? - #4 by lassoan
The segmentation is in 2D (since I have only one AIM annotation XML file for a patient). So the doctor must’ve made a segmentation on one of the slices (123 here) and exported it if im not wrong. Now, I’m able to display the 2D segmentation on 3D slicer but the location is off. I tried using the header of just one dicom file (1-123 only) and this is what it gives

OrderedDict([(‘type’, ‘short’),
(‘dimension’, 3),
(‘space’, ‘left-posterior-superior’),
(‘sizes’, array([512, 512, 1])),
(‘space directions’,
array([[0.53320312, 0. , 0. ],
[0. , 0.53320312, 0. ],
[0. , 0. , 1. ]])),
(‘kinds’, [‘domain’, ‘domain’, ‘domain’]),
(‘endian’, ‘little’),
(‘encoding’, ‘gzip’),
(‘space origin’,
array([-131.23339844, -274.73339844, -140. ]))])
when I try to enter these values as the header for the 2D image, it obviously throws an error. Could you please tell me how to fix this? what space variables should I put for the 2d segmentation so that it loads in the correct position? When I plot it using plt.imshow() over the scan, it is fine.
Thank you.