python - SimpleITK.Show() generates error in ImageJ on Linux -


edit note: question phrased as

how link simpleitk.show() imagej in linux?

by upgrading simpleitk 1.0.0 1.0.1, able launch imagej simpleitk.show(). however, imagej unable open "sample_mri.hdr". imagej generates following error messages.

file not in supported format, reader

plugin not available, or not found.

root/local/linux/imagej/open("/temp/tempfile-7131-2.nii");

root/local/linux/imagej/rename("/temp/tempfile-7131-2.nii");

i have installed appropriate plugins imagej read hdr/img (analyze format). can open "sample_mri.hdr" imagej directly going file>open

debug messages:

sitk.show(img, 'sample image', debugon=true) 

findapplication search path: [ ./fiji.app, /cis/home/vwang/bin/fiji.app, ~/bin/fiji.app, /opt/fiji.app, /usr/local/fiji.app ]

result:

findapplication search path: [ ./fiji.app, /cis/home/vwang/bin/fiji.app, ~/bin/fiji.app, /opt/fiji.app, /usr/local/fiji.app ]

result:

findapplication search path: [ ./imagej, /cis/home/vwang/bin/imagej, ~/bin/imagej, /opt/imagej, /usr/local/imagej ]

result:

findapplication search path: [ ./, /cis/home/vwang/bin/, ~/bin/, /opt/, /usr/local/ ]

result: /usr/local/bin/imagej

show command: '/usr/local/bin/imagej' '-e' 'open("/tmp/sample-4434-0.nii"); rename("sample");'

plugins:

how link simpleitk.show() imagej in linux?

i've downloaded imagej , can view images running imagej directly. similar question asked , answered in past (can not "link"simpleitk::show() fiji), solution windows os. unix equivalent of

setx sitk_show_command "c:\blah\blah\imagej\imagej.exe 

my python code:

import simpleitk sitk  img = sitk.readimage("sample_mri.hdr") sitk.show(img, 'sample image') 

error message:

    return _simpleitk.show(*args, **kwargs) runtimeerror: exception thrown in simpleitk show:  /tmp/simpleitk/code/io/src/sitkshow.cxx:500: sitk::error: error in administrating child process: [no such file or directory] 

simpleitk unable find imagej. try adding debugon=true parameter show command. show search path it's using try , find imagej.

so show following:

sitk.show(img, 'sample image', debugon=true) 

on linux systems, simpleitk searches path following options: fiji.app/imagej-linux64, fiji.app/imagej-linux32, imagej/imagej, imagej, , imagej.

if imagej executable named else, simpleitk won't find it. suggest either soft linking make findable, or using sitk_show_command environment variable.

update: not finding imagej original problem. i'm not sure update, debugon flag set, can see actual command line simpleitk using try , launch imagej.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -