-
Notifications
You must be signed in to change notification settings - Fork 29
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
Comments
@eugenegkim That's just a bug because I haven't had enough test case for that. Thank you! |
@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>') |
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! |
@eugenegkim Oh BTW, have we meet at the Bruker sequence programming course? Your name is familiar 😃 |
Yeah! Seems like ages ago. Hope you and all your loved ones are doing well. |
@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. |
@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. |
Thanks! |
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?
The text was updated successfully, but these errors were encountered: