Nipype Reorient node performs unwanted reslicing

Hi fellow Nipype users,

I’m currently experiencing trouble in my Nipype pipeline using the Reorient node from the nipype.interfaces.image module. I want to perform LPS reorientation on an MPRAGE image with

dim_x 128 size_x 1.7500000 mm orientation_x left to right
dim_y 128 size_y 1.7500000 mm orientation_y posterior to anterior
dim_z 52 size_z 5.4729691 mm orientation_z inferior to superior (RAI Code: LPI)

Unexpectedly the output file now has the following characteristics

dim_x 128 size_x 2.0000000 mm orientation_x right to left
dim_y 128 size_y 2.0000000 mm orientation_y anterior to posterior
dim_z 52 size_z 2.0000000 mm orientation_z inferior to superior (RAI Code: RAI)

Reorientation of the axis is as wanted but it appears that also reslicing to 2x2x2mm was performed leaving the image squished on the z axis.

The documentation clearly states that “No resampling is performed, and thus the output image is not de-obliqued or registered to any other image or template.” https://nipype.readthedocs.io/en/latest/api/generated/nipype.interfaces.image.html

The in_file comes straight from selectfiles and out_file goes directly to datasink. So no other processing happened. Also I’ve been using similar reorientation on other images multiple times and all worked fine.

Has anyone seen this before or has a hint to what might have happened?

I’m using Nipype version 1.5.0 with python 3.6 on Linux-centos6. Let me know if there is any other information needed to understanding this problem as this is my first post at NeuroStars.

Best,
Jonas

Can you open an issue on Nipype? And if you provide the header in binary, you can help us reproduce the issue.

import nibabel as nb
img = nb.load(fname)
print(img.header.binaryblock)

Hi effigies,
thanks for your reply! Do you need the header for the unedited MPRAGE image or after reorientation? Also, with opening an issue on Nippe you mean in the Nipype GitHub here right? https://github.com/nipy/nipype/issues

Best,
Jonas