I would like to be able to create 3 buttons in my Slicer Jupiter kernel. One that will act just like “save as” (download to the desktop .nrrd files), next an upload button doing exactly like this line does:
volume = slicer.util.loadVolume(‘Data/image.nrrd’) but letting the user to choose his .nrrd file.
And a screenshot button that will capture the scene displayed.
Thanks in advance
Sorry I can’t help you, I’ve got the same problem
You can use standard Jupyter widgets for file upload/download, as shown in “File upload/download” section in this example notebook: https://github.com/Slicer/SlicerNotebooks/blob/master/01_Data_loading_and_display.ipynb
I’ve found that FileUpload widget is not reliable for large files (https://github.com/jupyter-xeus/xeus-python/issues/272), so you either need to upload using Upload button in the main notebook list or try the script posted here and if you find that it still does not work then add a note to that bug report.