nanslice
nanslice copied to clipboard
Viewing 4D data
trafficstars
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.
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!