Skip to content

Timmy-Codes/OnkoDICOMSegDemo

Repository files navigation

Auto-Segmentation Prototype

Description

This is a prototype of the functionality which has been proposed to be added to the program OnkoDicom an open source medical research software which has been used in a wide variety of areas including areas in Africa, intended to improve the ability for radio-oncologists to develop methodologies to help patients.

This specific functionality which is being prototyped is the ability for the user to be able to create segmentations of areas of the human body which is of interest to the user to be further focused on without the need for the user to manually draw and isolate the specific body part.

Requirements

  • Python version 3.12: link
  • Poetry: link

Dependencies

Installation

  1. Ensure you have Python installed on your machine (see Requirements)
  2. Extract the folder from the zip
  3. Open Terminal console and navigate to the folder/project location e.g. cd C:\path\to\your\project
  4. Setup a virtual environment by typing the following into the console:
  • Windows: python -m venv venv
  • MacOS: python3 -m venv venv

N.B. Windows uses python.exe while Mac uses python3. 5. Activate the virtual environment by typing the following (depending on OS) into the console:

  • MacOS: source venv/bin/activate
  • Windows: venv\Scripts\activate
  • Windows (PowerShell): .\venv\Scripts\Activate.ps1
  1. Install poetry in your virtual environment by entering the following into console: pip install poetry
  2. Install poetry dependencies by typing the following into console: poetry install
  3. Wait for the installation to complete

Usage

Included in the Zip file is an anonymised Dicom directory (Demo) for the purposes of demonstration

  1. Open Terminal console in the folder/project location
  2. To run the application, enter the following into the console:
  • Windows: python main.py
  • MacOS: python3 main.py
  1. Wait for the program to open – this may take a couple of minutes.

  2. When the file selection prompt opens select the “Demo” directory

  3. You will then be directed to the prototype user interface

  4. Select the appropriate body part from the drop-down menu you would like to segment

  5. Select if you want the process to go faster (lower resolution) o Quickest results will be obtained by selecting Task: 'total' with the option Fast selected

  6. Click Start

  7. Wait for processing to complete, as depending on task selection and your computers specifications, the processing may take quite some time

  8. Once complete, click 'Load Segmentations'

  9. Open the segmentations folder saved in the Demo directory

  10. Select desired segmentations to display (for this image set it is advised to select lung segmentations, as the scans are of the chest area)

  11. View segmentations on each axis by dragging the sliders up and down on the image views

  12. To disable a segmentation or multiple segmentations in the view panels, uncheck the corresponding checkbox in the segmentations panel

  13. After closing the application, back in the terminal console type “deactivate” at the prompt to close the virtual environment.

About

A little demo implementation of TotalSegmentatorAPI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages