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

Inconsistency in euleur affine parametrisation between Affine and Motion transform #812

Open
1 task done
romainVala opened this issue Feb 2, 2022 · 2 comments
Open
1 task done

Comments

@romainVala
Copy link
Contributor

romainVala commented Feb 2, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Problem summary

I would like the euler parameter (degree, translation) to be the same convention between the 2 transform : Motion and Affine

I know that this is not a real problem (to have different convention) because if one only use the Random version having a change in x or y or even a swap between x and y would not matter (because you randomly parse [-alpha +alpha] with the same range in all 3 directions (x,y,z)

But for consistency, I think it should be the same, and for more advance use it may becomes important

I just open the issue in case you could easily find the discrepency. (but for me this is quickly a nightmare this itk conventions issues ... I had hard time to solve it for my motion implementation ...)

Code for reproduction

import torchio as tio

suj = tio.datasets.Colin27()
tmotion = tio.RandomMotion(num_transforms=1)

suj_motion = tmotion(suj)
suj_motion.t1.save('colin_motion.nii')


hist = suj_motion.history[0]
deg, trans, times = hist.degrees['t1'],hist.translation['t1'],hist.times['t1'],

taff = tio.Affine(scales=(1,1,1), degrees=deg[0], translation=trans[0], center="image")
suj_aff=taff(suj)

suj_aff.t1.save('colin_affine.nii')

Actual outcome

I expect the motion image should be a mixt of tissue comming from the original position and from the new position (colin_affin.nii)

but I clearly see it is not the case

(Actually I compare with an other implementation of motion (the PR is comming soon ) and as both should produce the same artefact (for the same transient affine displacement) I notice it is not the case.

Error messages

No response

Expected outcome

I could add screen shot to show the problem but not sure if it helps ...

System info

No response

@romainVala
Copy link
Contributor Author

I guess nobody cares ...

@fepegar
Copy link
Owner

fepegar commented Apr 23, 2022

Hi, @romainVala. Thanks for reporting! I'm going to reopen so this issue stays in the backlog, in case someone wants to tackle it one day.

@fepegar fepegar reopened this Apr 23, 2022
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