Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with the coordinate #3

Open
Tiansang-Psy opened this issue Aug 19, 2023 · 2 comments
Open

Issue with the coordinate #3

Tiansang-Psy opened this issue Aug 19, 2023 · 2 comments

Comments

@Tiansang-Psy
Copy link

Hello,

I'm trying to use pypreclin singularity to do preprocessing of data, and here is my test data

  1. Macaque_F99_LR_brian_1p5.nii (template, RAS)
  2. Kk_T1_brain_highRes_reorigin.nii (subject T1, IAL)
  3. Task.nii.gz (subject task)
    Singularity code used are as follows:

singularity run '/home/sangtian/ST_floder/tmp/pypreclin_test/pypreclin-ubuntu.simg' -V 2 -o 'test_out' -s test -f 'task.nii.gz' -a 'kk_T1_brain_highRes_reorigin.nii.gz' -r 2 -t 'Macaque_F99_LR_brain_1p5.nii' -NA RAS -NF RAS -C /etc/fsl/5.0/fsl.sh -j /i2bm/local/jip-Linux-x86_64/bin

When the program executes to Normalise, an error occurs as:
“Source file 'kk_T1_brain_highRes_reorigin.nii.gz' (LAS) and taget file 'Macaque_F99_LR_brain_1p5.nii' (RAS) must have the same orientation for JIP to work properly.”

I checked the output of code, it had already done Slice timing, reorient, Realign, but empty in the folder Normalization

So then I check the coordinate of subject T1 and template in FSLeyes, the coordinate of subject T1 is original as IAL, and the template is RAS. Then I try to change the coordinate of subject T1 from IAL to RAS, I used the function reorient_image and check_orientation from \pypreclin-master\pypreclin\utils\reorient.py

But even after the preprocessing, the orientation of subject T1 is still IAL, I am confused about it and I am using the following code:

`

from reorient import reorient_image, check_orientation

data_path = '../pypreclin_data/'
T1_data = data_path + 'kk_T1_brain_highRes_reorigin.nii'
RAS_T1_data = data_path + 'RAS_kk_T1_brain_highRes_reorigin.nii.gz'

reorient_image(T1_data, 'RAS', 'RAS_', data_path)
print(check_orientation([T1_data, RAS_T1_data]))

`

the output of the code is: (True, ['IAL', 'IAL'])

From the output, the reorient_image function does not change the coordinate of subject T1, and I don't know what the problem is.

I have also used other packages to orientate the coordinates, e.g. fslreorient2std, fslorient, fslswapdim, and I can convert the coordinates to "LAS" but never to RAS!

At this point, I thought, orient such a process seems to be easily integrated in the singularity step, it seems unnecessary to let us operate separately, so I checked the output folder, and I did find that there was an orient folder in the second step, so I assumed that the container had already completed the reorientation step

But I checked the coordinate of the output file named ‘dRAS_kk_T1_brain_highRes_reorigin.nii.gz’ generated by singularity is still ‘LAS’, so I am really confused about the result, I can't use Pypreclin and FSL's toolkit to solve this coordinate, and also the problem seems to be unsuccessfully handled by the official container, So I really don't know what to do with what's happening right now.

What exactly should I do to keep singularity's program running?

@monami-nishio
Copy link

Hi @Tiansang-Psy , have you found a solution for this?
I’m facing the exact same problem and am unsure how to resolve it.

@Tiansang-Psy
Copy link
Author

Hi @monami-nishio, I couldn't fix the issue, and I tried to contact the author via email for help (February 17, 2023 ~ March 14, 2023), but in the end couldn't get a solution either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants