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

rostral-caudal axis is flipped for tail prone data #9

Closed
eugenegkim opened this issue Jun 4, 2020 · 8 comments
Closed

rostral-caudal axis is flipped for tail prone data #9

eugenegkim opened this issue Jun 4, 2020 · 8 comments

Comments

@eugenegkim
Copy link
Contributor

Very nice tool! My only issue is that the rostral-caudal (anterior-posterior) axis is the wrong way around for my tail prone dataset even though the Entry field is correctly identified as "FeetFirst". Is there a way to flip the orientation in this case?

@dvm-shlee
Copy link
Member

@eugenegkim That's just a bug because I haven't had enough test case for that.
Could you provide the dataset that causes the issue? then I can fix it for the next update.

Thank you!

@dvm-shlee
Copy link
Member

@eugenegkim Oh BTW, could you let me know if it just flipped or rotated 180 degrees so that the left and right are also flipped?

If you are urgent to access the data and If you are familiar with python, you can easily correct that with python API.

For example. as below.

import numpy as np
import nibabel as nib
import brkraw as br
from brkraw.lib.utils import apply_rotate
raw = br.load('<your raw data path>')
old_nii = raw.get_niftiobj(<scan_id>, <reco_id>)
new_affine = apply_rotate(old_nii.affine, rad_y=np.pi)

new_nii = nib.Nifti1Image(old_nii._dataobj, affine=new_affine, header=old_nii._header)
new_nii.to_filename('<new filename>')

@eugenegkim
Copy link
Contributor Author

Oh good point. It looks like it's rotated 180 degrees. I use an in-house converter, so it's not urgent. But I'm looking into making all my data BIDS-compliant. I'll send you the dataset in a moment. Thanks!

@dvm-shlee
Copy link
Member

@eugenegkim Oh BTW, have we meet at the Bruker sequence programming course? Your name is familiar 😃

@eugenegkim
Copy link
Contributor Author

Yeah! Seems like ages ago. Hope you and all your loved ones are doing well.

@dvm-shlee
Copy link
Member

@eugenegkim Thanks for sharing the data. I will update the code once I clarify the issue. Regarding the BIDS, there is something I haven't documented yet (for JSON), so if you experiencing any issue, please let me know.

dvm-shlee added a commit that referenced this issue Jun 4, 2020
@dvm-shlee
Copy link
Member

dvm-shlee commented Jun 4, 2020

@eugenegkim I found using your dataset that Bruker does internal correction for the position, so actually no need additional correction, but my code originally did. It has been removed now. It will work without issue from v0.3.3 released version.

@eugenegkim
Copy link
Contributor Author

Thanks!

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