nanslice icon indicating copy to clipboard operation
nanslice copied to clipboard

Viewing 4D data

Open emilljungberg opened this issue 7 years ago • 1 comments
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.

emilljungberg avatar Mar 21 '18 09:03 emilljungberg

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!

spinicist avatar Mar 21 '18 16:03 spinicist