Skip to main content

A utility package for implementing functions in 3D Slicer

Project description

Banner image!

Slicer_scripting_tutorial

A repository built for the slicer tutorial run by Marcus Milantoni and Edward Wang.

Table of Contents

License

The following repository is under MIT license. For more information, visit LICENSE.

Requirements

  • numpy
  • matplotlib

The full list can be found in requirements.txt

Setup

Downloading the 3D slicer application & supporting software

Please follow the steps provided bellow:

  1. Visit slicer to download the application.
  2. Visit anaconda to download python3/ jupyter notebook.
  3. Visit Visual Studio Code to download the source-code editor (optional).
  4. From the Extensions Manager widget, download the SlicerJupyter, MeshToLabelMap, PETDICOMExtension (if working with PET DICOMS), SlicerRT (if working with radiotherapy data).
    • The Slicer application needs to restart to install the extensions.

Set up the SlicerJupyter

  1. Using the search widget in Slicer, open the SlicerJupyter extension by searching for JupyterKernel.

    The Slicer application on the SlicerJupyter Modules!

  2. Click the "Start Jupyter Server" button. A JupyterLab notebook will open when the setup is complete.

  3. Click the "Jupyter server in external Python environment" and copy the command to clipboard.

  4. Open the anaconda prompt (Terminal if on mac) and paste the command.

  5. (Optional) open an external environment (Visual Studio Code) and select the Slicer kernel!

Install python packages

  1. Open the Python console by clicking the python logo on the widget bar.
  2. Import pip with
    import pip
    
  3. install the packages with
    pip.main(['install', 'requirements.txt'])
    

Tutorial

cervical_cancer_tutorial

This tutorial was created to demonstrate the basic_functions module on the cervical cancer example patient. This tutorial runs through most of the functions that are used in Slicer Python image processing.

Examples

A list of all the the example patients provided.

Brain Pre-op

This dataset is provided by the Brain Resection Multimodal Imaging Database (ReMIND) on the Cancer Imaging Archive. The data includes a patient that was surgically treated with image-guided tumor resection between 2018 and 2022. The preoperative T1 & T2 MRIs are used as well as the segmentation of the tumor. More information can be found here.

Juvekar, P., Dorent, R., Kögl, F., Torio, E., Barr, C., Rigolo, L., Galvin, C., Jowkar, N., Kazi, A., Haouchine, N., Cheema, H., Navab, N., Pieper, S., Wells, W. M., Bi, W. L., Golby, A., Frisken, S., & Kapur, T. (2023). The Brain Resection Multimodal Imaging Database (ReMIND) (Version 1) [dataset]. The Cancer Imaging Archive. https://doi.org/10.7937/3RAG-D070

Cervical Cancer

This dataset is provided by the CC-TUMOR-HETEROGENITY collection on the Cancer Imaging Archive. The dataset includes a PET/CT DICOM of a patient with cervical cancer, and structure RTstructs created using TotalSegmentator. More information can be found here.

Mayr, N., Yuh, W. T. C., Bowen, S., Harkenrider, M., Knopp, M. V., Lee, E. Y.-P., Leung, E., Lo, S. S., Small Jr., W., & Wolfson, A. H. (2023). Cervical Cancer – Tumor Heterogeneity: Serial Functional and Molecular Imaging Across the Radiation Therapy Course in Advanced Cervical Cancer (Version 1) [Data set]. The Cancer Imaging Archive. https://doi.org/10.7937/ERZ5-QZ59

Acknowledgements

The slicer scripting tutorial would not be possible without the following open source software:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slicerutil-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slicerutil-0.1.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file slicerutil-0.1.0.tar.gz.

File metadata

  • Download URL: slicerutil-0.1.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for slicerutil-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bc99cfcb4f3fb915b0702e4100b67ba2b07d935a16c4dea6160e01af2d97a483
MD5 cdbecc57bbbe03c8371f814890dd8ec3
BLAKE2b-256 d9912a307da8e72ee79ce209735c9f62245f05629bb206f5b8cc60f6a1b10c96

See more details on using hashes here.

File details

Details for the file slicerutil-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: slicerutil-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for slicerutil-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d1f4340355be1dc816d53eb835dd4b5a5991f63f585f4264b348296315e3b7d
MD5 1eefe179e614afe299ce6574ede7fdba
BLAKE2b-256 9af73892d68724bd0f96b68c3c8f1ec0022e215ccb6616d87b20f90ab14beffe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page