I am trying to write python in jupyter!
(/SimpleITK-Notebooks/python && SimpleITK-Notebooks/utilities in PYTHONPATH environment variable)
(importing update_path_to_download_script && download data scripts)
import SimpleITK as silk
import download data
from download data import fetch_data, fetch_data_all
from ipywidgets import interact
%env SITK_SHOW_COMMAND ‘c:/users/myname/ImageJ’
sick.Show(site.ReadImage(fetch_data(“SimpleITK.jpg”), “”, debugOn=True))
I run this in a python3 window. all the code is executed without error until it reaches to the site.Show line and it display this message
in Show(*args, **kwargs)
7979 (line number in SimpleITK.py)
7981. return _SimpleITK.Show(*args, **kwargs)
7982 class ImageFileWriter(ProcessObject):
7983 " " "
RuntimeError: Exception thrown in SimpleITK Show: D:/a/1/work/Code/IO/src/sitkImageFileWriter.cxx:210
sick: ERROR: Unable to determine ImageIO writer for "c://Users//myname//AppData//Local//Temp//TempFile-14168-3’.jpg’ "
my macOS keyword is messed up and all the / should have been backslashes . excuse me for that meaning it is windows path and is always shown with backslash!!
I hope did not confuse you. in SimpleITK.py explains that if you want to change the extension of the .jpg file use (set SITK_SHOW_EXTENSION ‘.jpg’ )and I tried to do that using (%env SITK_SHOW_EXTENSION ‘.jpg’), yet exception is thrown again, I have ImageJ installed version 5.3.x something and it is in my system path and I can launch and use it perfectly, as you see I have set my viewer set to ImageJ as well using %env in jupyter code!! I don’t understand what would be wrong? am I missing something here? may .jpg format can not be written or cannot find the file SimpleITK.jpg, I did place this image path in my system and imported that using import sys in jupyter code!!
thank you in advance