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

Return 3 vars from load_nifti instead of tuple #12

Open
wants to merge 2 commits into
base: docker_endpoint
Choose a base branch
from

Conversation

FelixLiu-SF
Copy link

load_nifti returns a tuple and the rest of the code uses the 3rd value which is the nibabel nifti img object. Subsequent calls for the object methods fail.
It is probably okay to change to ignore the nibabel object and instead use the data, affine, and other outputs from load_nifti directly, except for gpu_tracker.dump_streamlines uses img.header.get_zooms() which returns a 4-length tuple while load_nifti with return_voxsize=True would return a 3-length tuple; not sure of any implications to .dump_streamlines.

load_nifti returns a tuple and the rest of the code uses the 3rd value which is the nibabel nifti img object. Subsequent calls for the object methods fail. 
It is probably okay to change to ignore the nibabel object and instead use the data, affine, and other outputs from load_nifti directly, except for gpu_tracker.dump_streamlines uses img.header.get_zooms() which returns a 4-length tuple while load_nifti with return_voxsize=True would return a 3-length tuple; not sure of any implications to .dump_streamlines.
Fix issue when expecting old argument variable fa_numpy. Changed references to fa_file instead and add check for numpy or nifti loading.
@FelixLiu-SF
Copy link
Author

I also added another fix for the argument name change from fa_numpy to fa_file, and added the code for loading FA in nifti format.

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

Successfully merging this pull request may close these issues.

1 participant