Skip to content
Snippets Groups Projects
user avatar
Rob Oakes authored
f53976cf
History

Sonador IO Extension for Slicer

Sonador is a cloud platform for medical data visualization and research. It helps researchers and developers solve clinical and scientific problems by providing tools to create real-time, secure, and scalable solutions. 3D Slicer is an open platform for visualization, processing, segmentation, registration, and analysis of medical, biomedical, and other 3D images and meshes. It is commonly used for advanced 3D analysis, planning, personalized device design, and nagivating image guided procedures.

The Sonador IO extension for Slicer allows for medical data stored in Sonador/Orthanc to be imported into Slicer for visualization, inspection, and analysis. Sonador IO is compatible with all DICOM data types which can be loaded by Slicer.

Sonador IO Extension for Slicer

Install Sonador IO Extension from Source

Slicer extensions can be distributed in two flavors: pre-built packages that can be downloaded from the extensions browser and source packages. The Sonador IO extension for Slicer can be installed as a "source package." Released versions of the code are available from the Releases page of the IO extension project. In addition to packaged versions of the sources, the instructions in this README will also work for a zip archive download.

  1. Extract zip archive to a folder on the hard drive of your computer.
  2. Open 3D Slicer and a file explorer, drag the folder from the file explorer to the 3D Slicer main window.
  3. When prompted, confirm "Add Python scripted module to the application."
  4. Verify that Sondor dependencies are installed correctly.
  5. Optional: Enable Sonador 3D plugin.

Sonador IO Extension sources can be donwloaded as an archive by clicking on the "Code" button of the project and selecting "Zip Archive" from the list.

The installation instructions in this README can be used with a zip archie download of the repostiory.

Extract Zip Archive and Import to 3D Slicer

Extract zip archive to a folder on your hard drive. After downloading a source archive of the Sonador IO extension, it needs to be extracted to a location on your hard drive. Slicer loads source extensions by scanning folders part of its "Modules Path." The IO extension can be added to an existing folder in the path or a new folder can be added. The instructions here assume that a new folder will be used.

The Sonador IO extension for Slicer is distributed as a source package which needs to be extracted to the local hard drive prior to installation.

Copy the zip archive to the desired location, and then (for Windows users), select "Extract Compressed (Zipped) Folders" from the context menu. Choose the directory you wish to use for the IO extension sources and click the "Extract" button on the dialog.

Open 3D Slicer and a file explorer, drag the folder to the 3D slicer main window. Once the zip archive with the IO extension finishes extracting, open 3D slicer and a file explorer window and place them side by side. In the file explorer window, navigate to the folder you extracted the sources to in the previous step.

The script is loaded by dragging the top-level source folder onto the Slicer main window.

Once Slicer has launched and the data panel is showing, drag the top-level folder (sonadorio_slicer-0.1.0 in the screenshots) onto the Slicer main window. This will launch the "Select a reader" dialog. Ensure that "Add Python scripted modules to the application" is selected, and then press "Ok."

Slicer will prompt you to specify the script options. The Add selected module to Additional module paths option should be selected.

Slicer will then launch the "Import Script" dialog, which will configure the runtime settings for Slicer and the IO Extension. Ensure that SearchDialog appears in the list of modules and check the 'Add selected module to "Additional module paths"' option. If you select the "Enable developer mode" button, additional buttons to test and reload the IO extension will be available. Unless you will be adding additional features to the IO extension, it is better to leave "Developer mode" unselected. Click "Yes."

Verify Sonador Dependencies Installed Correctly

After clicking "Yes" in the previous step, Sonador will install the extension and download dependencies. This process may take some time, and Slicer may appear to be unresponsive while packages are being downloaded.

The IO extension installs a number of Python dependencies as part of its startup. To ensure that everything was installed correctly, review the Python console and look for errors.

When the plugin has completed its installation, open the Slicer "Python Console" to check that all dependencies were added to Slicer's internal Python version without issue. The Python console is accessible by clicking on the "Python Console" action from the "View" menu or by pressing Ctrl+3.

In the Python console, you should see a full log of the packages which were installed.

In the console, you will see a full log of the dependency packages which were installed by pip (Python's package manager). The output should be similar to that in the screenshot above (though the version numbers may differ). If you encounter any issues with installing the extension, please open an issue on this forum or Contact the Sonador Developers.

(Optional) Install the Sonador 3D DICOM Plugin

The Sonador IO Extension for Slicer includes a "DICOM plugin" which can be used for working with "Medical 3D" data. Though distributed with the IO extension, the Sonador M3D plugin must be activated separately. Slicer indcludes its own M3D extension that can also be used. If installing the Sonador 3D DICOM plugin, the built-in plugin (DICOMM3DPlugin) should be deactivated.

To activate the plugin, open the "Application Settings" dialog from the Edit menu (or by pressing Ctrl+2 on the keyboard). In the settings dialog select the "Modules" section. When the module loads, click on the "Expand" arrow button at the right of the dialog (the button appears as two arrows >>) to show the "Add" and "Remove" path buttons.

Click on the "Add" path button and navigate to the root directory of the Sonador IO Extension. Double click the folder so that you are in the root of the plugin (D:\AppData\Slicer\sonadorio_slicer-0.1.0\ in this example). Next, select the DICOMPlugins directory of the Sonador IO Extension and then click the "Select Folder." When the file dialog closes, you will be prompted to restart Slicer.

The Sonador 3D DICOM Plugin must be installed separately from the IO extension. This is done by adding the DICOMPlugins directory of the extension to the additional paths of Python Modules from the Slicer Settings dialog.

After Slicer restarts, you can enable the Sonador 3D plugin by opening the "DICOMPlugins" drawer of the DICOM module and ensuring that DICOMSonador3DPlugin is selected. To prevent compatibility issues, de-select the DICOMM3DPlugin and MultiVolumeImporterPlugin.

To enable M3D support within Slicer, open the DICOM plugins drawer and ensure that the DICOMSonador3DPlugin is selected. To prevent compatibility issues, deselect DICOMM3DPlugin and MultiVolumeImporterPlugin.

Quickstart

After the extension has been installed, the Sonador connection URL and API credentials can be entered by clicking on the "Connection" button in the settings drawer. The Sonador IO module can be loaded by clicking on the "Modules" button in the Slicer toolbar and searching for "Sonador IO". This will launch the "Sonador Connection Settings Dialog."

The API crednetials and connection URL can be entered by clicking on the Connection button in the Settings drawer.

The URL must include the full URL to the Sonador instance including connection scheme (eg, https) along with an API token for your account. You can verify that the connection is configured correctly by clicking on the "Test Connection" button.

Import Data to Slicer

Sonador resources can be imported into Slicer by clicking on the "Import data from Sonador" button in the "Sonador IO" module, which will launch the "Study Search" dialog.

Sonador data can be imported into Slicer by clicking on the Import data from Sonador button. Medical imaging data from Sonador can be imported to the local Slicer database using the Study Search dialog.

Studies can be located using a general search, or by matching individual tags using a key=value syntax. "Denver University Natural Knee" entered as a search term, for example, will return studies that include the term in any of their indexed DICOM tags or private tags. StudyDescription=DU04 will match studies which include "DU04" in their study description.

The study search dialog can be used to search any imaging server to which the user has access. The active server can be changed by selecting the dropdown box at the right of the search bar. To import a study, double click on its entry in the results list. This will load the "Import Sonador Data" dialog with a list of the series associated with the study. Series not already present in the Slicer database will be highlighted. If a series has been previously imported, the entry in the import list will include a checkmark in the "Slicer DB" column.

Series part of a selected study will shown in the Import Sonador Data dialog. Data that has been imported previously will include a checkmark in the Slicer DB column.

To import the data, click on the "Import to database" button. After import and indexing, the results will be added to the list of patients in the "DICOM" module. Imaging and model data is loaded to the active scene by selecting it in the local database and clicking "Load" at the bottom of the database screen.

Export Data to Sonador

Data created in Slicer and encoded to DICOM can be exported to Sonador by selecting the desired resources in the database and then clicking on the "Send data to Sonador" button in the Sonador IO module, which will open the "Export data to Sonador" dialog.

Data created in Slicer and encoded to DICOM can be exported to Sonador by selecting the resource in the local database and then clicking on the Send data to Sonador button in the Sonador IO module. Send data to Sonador button in the Sonador IO module.

The dialog provides a dropdown specifying which server the data will be sent to and a count of the number of files which will be transferred. To upload the data, click on the "Send" button.

The Send data to Sonador dialog allows you to specify which server the data should be sent to and the number of items to be transferred.

After clicking "Send", the transfer dialog will show a progress bar providing the status of the upload. If the a transfer fails, an error will be shown in the dialog. Additional details on any errors can be found by opening the Python Console (available from the View -> Python Console menu, or by pressing Ctrl+3 on the keyboard). The transfer can be aborted by clicking on the "Cancel" button.