nipy/niwidgets

Can't load nifti

vukovicnikola opened this issue · 3 comments

Typing:

test = NiftiWidget('/coefs/wholebrain30.nii') test.nifti_plotter(plotting_func=plotting.plot_glass_brain, threshold=(0.0, 10.0, 0.01), display_mode=['ortho','xz'])

Causes this error:

FileNotFoundError: [Errno 2] No such file or directory: '/coefs'

If I specify the path alternatively as './coefs/wholebrain30.nii', it complains:

TypeError: argument should be string, bytes or integer, not PosixPath

Thanks for flagging this!

No problem @janfreyberg. Hope you will be able to fix it! I'd love to try the widgets to plot some brain data...

OK, I assume you were working with v 0.1.3 from pypi. I've just pushed a new version there, so updating should work! Alternatively, try installing from github instead.

BTW, the mistake in the top line would be that starting a filepath with / indicates the filepath is absolute, which is why it failed.

Hope it works now - let me know if you've got any problems with it.