Skip to content
Deepa Krishnaswamy edited this page Aug 11, 2023 · 15 revisions

TOC

Prerequisites

You will need to install 3D Slicer and the mpReview extension to annotate data, and to visualize the datasets already annotated.

Install 3DSlicer and the mpReview extension

Once 3DSlicer is installed, open the Extension Manager (see below), search for mpReview, and install the extension. When prompted, agree to installation of all dependencies! Note that once installation of the extension is completed, you will need to restart Slicer.

drawing
mpReview extension

Install the SlicerDevelopmentToolbox dependency

Once you installed the extension and restarted Slicer, you can find the mpReview extension by clicking on the magnifying glass and typing the name of the extension, as shown below.

drawing

Optional - if using Google Cloud Platform

If using the remote server with Google Cloud Platform option, you will need to do the following:

  1. Have a Google account
  2. Install Google SDK on your local machine
  3. Authenticate with gcloud auth login

Additionally, do the following depending on your OS:

  • Windows: 3DSlicer will automatically find the gcloud path
  • Linux and MacOS: Activate the environment where Google SDK is installed Start 3DSlicer from command line in the same terminal.

Usage

Using mpReview with a local DICOM database

Upload data to the local DICOM database

  1. Download the sample dataset from here and unzip it: https://github.com/SlicerProstate/mpReview/releases/download/sample-data/prostate_repeatability.zip

  2. Import this data into the 3DSlicer local DICOM database. Click on Add DICOM Data and then Import DICOM files. Select the data from the above prostate_repeatability directory. Your local DICOM database should then look like this:

4 data_in_local_dicomdatabase

Using mpReview

Watch the video below to use mpReview, or alternatively, follow the steps below:

mpreview_local.mp4
  1. Once you are done importing the data, open the mpReview extension.
5 select_mpreview
  1. In the Database Selection tab, select the Use local database
6 select_local_database
  1. In the Study Selection tab, select the first study in the list. You should be able to see all the studies that were imported into your local DICOM database. They are named as <PatientID>_<StudyDate>.
7 select_study
  1. After you click on the study, you will see a list of series. Keep the three series that are checked, these are the ones that will be loaded and a layout set automatically. The ones that are in gray are unable to be selected for viewing, and are usually DICOM Structured Reports, or DICOM Segmentation objects. These segmentation objects will be automatically loaded later, therefore they cannot be selected now.
8 select_series
  1. Now in the Seg Editor tab, select the series that you want as the reference. This will be the series that you actually annotate. It will also be set as the background for the other series automatically in the layout.
9 select_seg_editor_and_reference
  1. After selecting the reference, the layout should automatically update, and look like this:
10 layout_of_series
  1. You are now ready to segment! Add a segment to the four you already see by clicking Add. Then double click on the green square next to the Segment name to open up the Terminology. Choose the correct terminology. Now use the Segment Editor tools to draw a segment!
11 add_segment
  1. Lastly, go to the You're done tab and click on Save to save the segmentation to the local DICOM database.
12 save_segmentation

Using mpReview with Google Cloud Platform

Upload data to a DICOM datastore in GCP

Open this Google Colaboratory notebook to use Google Cloud Platform. The notebook will tell you how to:

  • create a project id
  • query for data for two patients from the QIN-PROSTATE-REPEATABILITY collection
  • save a manifest of where the files are stored
  • download files to a bucket
  • create a dataset and a DICOM datastore
  • and save your data to annotate in the DICOM datastore

Using mpReview

The steps for annotation and saving are similar to the local Slicer DICOM database use case. Here we go over specifically how to select the DICOM datastore created above.

Watch the video below to use mpReview with a GCP DICOM datastore, or alternatively, follow the steps below:

mpreview_gcp.mp4
  1. Once your data is in a DICOM datastore, open the mpReview extension.
5 select_mpreview
  1. In the Database Selection tab, select the Use GCP remote server. Then use the dropdown menus to select your project, dataset and DICOM datastore. You can also type in each of the boxes and the names will be completed. Depending on how many projects/datasets/dicom stores you have, it could take a few seconds to populate each of the lists. The GCP server url will be automatically populated. Then click the OK button.
1 remote_gcp_database_selection
  1. Follow steps 3 onwards from the local database configuration.

Using mpReview with any remote server

Upload data to a DICOM datastore

Make sure that your DICOM data is in a DICOM datastore, and that you have the url to this server.

Using mpReview

  1. Once your data is in a DICOM datastore, open the mpReview extension.
5 select_mpreview
  1. In the Database Selection tab, select the Use other remote server. Then paste in your url into the Other server URL box. Then click the OK button.
1 remote_other_database_selection

Sample data

The sample dataset consisting of two patients from the QIN-PROSTATE-REPEATABILITY collection can be downloaded from here.: https://github.com/SlicerProstate/mpReview/releases/tag/sample-data.

Sample dataset from U.Chicago is here: https://drive.google.com/drive/folders/1EXn7zOGBT4wtm1ztnSu60AoOzuwM0tO8

Troubleshooting

If the module is not responding, if you have progress dialog that does not change, please submit the issue. Include the errors printed out in red that you see in the python interactor (as displayed below), and also in the Slicer error log (menu "Help > Report a bug").

drawing