Back to
Projects List
Launch 3DSlicer via clickable URLs for Viewing IDC Data via SlicerIDCBrowser and IDC Index
Key Investigators
- Vamsi Thiriveedhi (BWH, USA)
- Andrey Fedorov (BWH, USA)
- Steve Pieper (Isomics, USA)
- Andras Lasso (Queens University, Canada, USA)
- Umang Pandey (UCM3, Spain)
Presenter location: In-person
Project Description
IDC (Imaging Data Commons) has several TB of radiology data that can be viewed with various tools, such as OHIF v2, v3, and Kitware’s VolView. However, one could argue that none of these tools can match the power and versatility of 3DSlicer, which offers a wide range of features for exploring and analyzing radiology data. Steve has come up with a brilliant idea to make 3DSlicer more accessible and user-friendly: a simple URL that can be clicked to launch 3DSlicer and load the desired IDC data. This project aims to ease the way we view IDC Data on 3DSlicer by making it as easy as clicking a link by extending the capabilities of the SlicerIDCBrowser extension.
Notes for discussion:
- we could also have a mode where user clicking on IDC manifest would trigger Slicer opening and downloading the content of the manifest - this would be similar to TCIA manifest downloader. Need to think how to report progress, since for large cohorts it will take time, and s5cmd batch run does not provide the progress reporting means. TODO: link the s5cmd progress reporting issue
- warn/communicate to the user download size on disk
Objective
- Enable the local 3DSlicer to launch from slicer://idc-browser/ URLs
- Register the slicer://idc-browser/ protocol on Linux, Windows, and MacOS
- Integrate the protocol registration for slicer://viewer/ into the 3DSlicer installation process for Linux and MacOS
- Sequence of steps (under discussion) of how this should work when everything is done:
- user interacts with IDC Portal, which includes URLs at the study/series level for the types of data that can be handled by Slicer (exclude SM)
- when user clicks on a Slicer URL
- if user has Slicer installed, but no SlicerIDCBrowser extension - the only handler available is the default one - should it detect that extension is missing and inform user that it is needed?
- if user has Slicer and extension installed - open Slicer, select SlicerIDCBrowser, populate information in the GUI about what is being downloaded and automatically trigger the download and load into scene - need to discuss how to do error checking and alert user if certain series cannot be loaded. @vkt1414 thinks it may add delay and should just load the downloaded data into scene.
- if user does not have Slicer - probably nothing can be done, it won’t work - 404
Approach and Plan
- Incorporate class in SlicerIDCBrowser code base
- need to add support for progress reporting - Vamsi suggests to look at the number of files - or we can use total size of the downloaded files, since s5cmd creates multiple files during download
- Handle registration of custom browser protocol automatically based on the underlying OS
Progress and Next Steps
-
SlicerIDCBrowser can now register the slicer://idc-browser/ protocol on all three platforms MacOS, Linux, and Windows
- The downloading experience currently is dictated by the network speed
-
Need to explore/handle the behavior when multiple versions of slicer are present on the user’s system
@pieper thoughts on this:
My thought would be to have a script for each platform (maybe shell for mac/linux and .bat for windows) that would be launched by the url handler. That script would launch Slicer with ` –no-main-window –python-script ` where select.py would implement the logic to find the currently running and installed Slicer's and put up a dialog box so the user can select the target. Then it would either launch a new instance of the version of the user's choice, or it would send a signal to one of the running instances to load more data. We'd need to discuss how best to send the signal. It could be a literal operating system signal or it could be use something like the WebServer module so that running instances listen for these load requests. We should think about what is the best and most useful way to impement this.
-
@lassoan suggested
- To be able use a running slicer instance, to refer to this script to see https://github.com/lassoan/slicerio?tab=readme-ov-file#view-files-in-3d-slicer
- Use Visual DICOM Browser widget while loading a study
- Refer to his MONAI extension for reference to implementation of streaming logs to progress bar
-
@Punzo suggested
- refer to script repository in slicer for finding code
- filter by patient id by using onPatients() to show the specific patient into Visual DICOM browser
- Umangs observations:
If one has multiple slicer’s installed along with the nighlty version. Link opens slicer for the highest stable version (All had the extension and module loaded). Would there be a way to choose at least between nightly and stable version?
- The code is currently available at https://github.com/vkt1414/SlicerIDCBrowser and eventually may be available @ https://github.com/ImagingDataCommons/SlicerIDCBrowser
- Once the behavior of launching urls is refined in SlicerIDCBrowser, the goal is make atleast the registration of the slicer:// protocol available on Slicer directly
Illustrations
Demo on Windows
Demo on Linux (Ubuntu)
Demo on MacOS
Background and References
The discussion here made it easier to test a prototype and this project builds on the suggestions made here.
How to load nifti file from web browser link? - Development - 3D Slicer Community
SlicerSandbox/LoadRemoteFile/LoadRemoteFile.py at master · PerkLab/SlicerSandbox (github.com)