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

Viewing 4D data #1

Open
emilljungberg opened this issue Mar 21, 2018 · 1 comment
Open

Viewing 4D data #1

emilljungberg opened this issue Mar 21, 2018 · 1 comment

Comments

@emilljungberg
Copy link
Contributor

Current implementation doesn't seem to support 4D data. Would be neat to be able to specify which image in the 4th dimension to view, like a specific TE.

@spinicist
Copy link
Owner

Can you provide an example of the code you tried, and what the errors were please?

This is a known short-coming in nanslice. For 4D files so far, I have resorted to manually selecting the volume I want, and then creating a new Nifti1Image with only that volume. For example:

single_vol = all_img.get_data()[:,:,:,0]
single_img = nib.Nifti1Image(single_vol, affine=all_img.affine)

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