imagej / pyimagej

Use ImageJ from Python
https://pyimagej.readthedocs.io/
Other
474 stars 83 forks source link

cannot open nii or nii.gz file #292

Closed weitongwei closed 1 year ago

weitongwei commented 1 year ago

`import imagej

ij = imagej.init()

imp = ij.io().open('test.nii')`

[java.lang.Enum.toString] [ERROR] No opener IOPlugin found for FileLocation:file:/K:/py_script_tools/test.nii.

NicoKiaru commented 1 year ago

Hello @weitongwei ,

It may be that you need to initialise imagej differently. Please try:

ij = imagej.init('sc.fiji:fiji')

This should bring the bio-formats library with imagej and allow for opening a variety of file formats.

weitongwei commented 1 year ago

Thanks. This works.