I am contributing to the development of the Oryx-MRSI tool. Previously we have successfully implemented Gannet code in our tool to process Philips .spar data. However, we are now attempting to implement processing for multi-voxel Siemens .rda data (XA-20) and have encountered an issue.
The code correctly positions the voxel box at the appropriate location and angles, but the directions appear mirrored. I have attempted several solutions, including negating angle values, modifying rotation matrices, and adjusting the signs of VoxDims and vox_ctr_coor parameters, but none of these approaches have resolved the issue.
I am sharing the data loading and mask generation code below. Any assistance would be greatly appreciated. Thank you. Mask_Press_run_Pinfo.m (6.3 KB) loadfile.m (18.5 KB)
Happy to help. Could you clarify exactly how the directions of the mask are mirrored? E.g., in which direction? It’s not entirely clear to me from the screenshot.
In the axial view, the voxel box is leaning to the right in the scanner image. However, in my outputs, it’s leaning to the left. Also, in data with a greater angle, the sagittal view also looks mirrored. I fixed this by flipping the masks with flipdim(mask,2), but it creates other problems for my tool in the next steps.
I’m afraid I’m still confused. In both your axial images, the brain and acquisition slab are angled in the same direction. They just appear to be flipped L-R (radiological vs. neurological convention). Could you open the image in a different image viewer like MRIcroGL, overlap the voxel mask, and show L-R, A-P, S-I labels?
According to the image from the scanner, the upper left corner should appear higher, but in my printouts the upper left is higher. I also added the flipped (row-wise down) mask as an overlay (green). I think it should appear like this.
Nothing has changed on the outputs unfortunately. Maybe there is something about my data. I am sending you my example data and edited standalone codes. You can run as
[Pinfo,MRIPressMask_file]=loadfile(‘sub8.rda’,‘/path/to/sub8/exam_1/spectra/’)
then,
Mask_Press_run_Pinfo(Pinfo,MRIPressMask_file)
it creates a Cr press mask to the sub8/exam_1/spectra/nifti/coreg_binary_mask directory. Thank you.
Thank you for your response. We are working with multivoxel data. In the next steps, we create the small voxels and align them into press boxes. So if when I flip the masks, the order and locations of these small voxels change. Ideally, I need to solve this problem without using flips, because flipping makes the next steps very complicated.
The image on the scanner screen shows the acquisition direction as +LPH, although the T2 images are in RAS orientation. Do you know any way to solve this without using flips?
Edit: Flipping also slightly changes the location of the box.