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

[ENH] Handling of different coordinate systems #11

Closed
kaitj opened this issue Aug 2, 2023 · 4 comments · Fixed by #32
Closed

[ENH] Handling of different coordinate systems #11

kaitj opened this issue Aug 2, 2023 · 4 comments · Fixed by #32
Assignees
Labels
enhancement New feature or request

Comments

@kaitj
Copy link
Contributor

kaitj commented Aug 2, 2023

Describe the feature you'd like to see
At some version of Slicer, I believe the coordinate system either switched or could be toggled to be LPS or RAS. We had previously implemented something to handle this in the afids-validator, reading in the coordinate system and flipping the coordinates as needed when reading in files.

We should probably implement it here too.

@kaitj kaitj added the enhancement New feature or request label Aug 2, 2023
@kaitj
Copy link
Contributor Author

kaitj commented Aug 28, 2023

As is, there are methods to read in / save AFIDs of different coordinate systems, but no way of transforming between the two if needed.

@kaitj
Copy link
Contributor Author

kaitj commented Sep 5, 2023

One thing I just came across in the nibabel documentation is that they assume RAS. Not sure if this affects the accuracy of applying the affine that is grabbed from the image and applied to an afid coordinate that is potentially in LPS.

@ataha24, do you have any thoughts or experience with this?

@ataha24
Copy link

ataha24 commented Sep 5, 2023

good catch! We keep all analyses in RAS (and afids-data is in RAS) -- slicer moved to LPS convention so if someone is annotating AFIDs using a lastest version of slicer we may need to handle that. Now whenever I apply a transform (specifically talking non-linear warps) I do a LPS conversion because most software packages are configured that way. However for an affine, it is ok to keep in RAS.

@kaitj
Copy link
Contributor Author

kaitj commented Sep 5, 2023

Other way around I think. Thought slicer always defaulted to LPS until a recent version. In any case, I wouldn't be opposed to doing something similar to nibabel and always setting everything to RAS upon loading - I thought most packages assume RAS.

@kaitj kaitj self-assigned this Sep 7, 2023
@kaitj kaitj linked a pull request Sep 7, 2023 that will close this issue
9 tasks
@kaitj kaitj closed this as completed in #32 Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants