/contour-alignment-tool

Application for the manual alignment of contours in kV projections.

MIT LicenseMIT

contour-alignment-tool

An application for visualising and aligning contours in kV projections.

Report Bug · Request Feature

Table of Contents
  1. Getting Started
  2. Usage
  3. Build
  4. Acknowledgments
  5. Contact

About

The Contour Alignment Tool is an application designed for aligning 3D contour structures with 2D kilovoltage projections. Users can load projections along with the associated CT, structure set, and plan files. The tool generates 2D contours from the selected 3D structure and allows users to manually align the 2D contour to the correct position. The aligned contours can be exported as masks facilitating the creation of labeled data for machine learning projects. Furthermore, the tool offers the ability to load a large range of 2D projection types, serving a wide range of general usage scenarios.

image


Getting Started

System Requirements and Prerequisites

  • Windows
  • MATLAB Runtime Version 9.10 can be downloaded here. Visit the MathWorks website for more details.

Installation

The latest release of the Contour Alignment Tool can be downloaded here.

Once downloaded, extract the contents to a local directory.

Data

The following set of files are required to use the application:

  • CT DICOMS
  • Structure DICOM
  • Plan DICOM
  • Kilovoltage images (.tiff, .xim, .hnd, .hnc, or .his)

Suitable data to test the application can be downloaded from the SPARK Database.

(back to top)

Usage

Loading Data

  1. Run the ContourAlignmentTool executable. Once the application loads, the data processing screen will be displayed as shown below.

    [!IMPORTANT]
    Depending on the system, the application can take several minutes to open.

    image

  2. The data can be loaded by using as shown below the clinical data browse or invidual browse:

    • Individual browse: Select each file or folder individually using the respective browse buttons.

    [!NOTE] If the CT, RS, and RP are all within the same folder, the RS and RP files will load automatically when the CT folder is selected.

    • Clinical data browse: This option is useful for bulk loading of several patients and fractions. The data must be in the required folder structure. The selected folder should contain a folder for each patient. For each patient, there should be a "Patient Plans" folder containing the plan DICOMs and "Pateint Images" folder containing a folder for each fraction.
  3. Set the number of projections, pixel spacing, SID, SDD, and detector offset if they differe from the defaults. A warning is displayed if the parameters can not be determined from the file headers.

    image

  4. Select the Structure of Interest from the dropdown menu.

  5. Click Proceed, once all data has been selected. The execution time can vary depending on the file type, number of projections, and whether it is executed on a GPU.

  6. Once the data is processed, labelling of the data can be performed. image


Contour Alignment

Navigation
The shorcut buttons can be used to go to the first, previous, next, or last projection.

The navigation panel provides a list of all projections sorted by alignment confidence. Click on the projection name to load the selected projection.

Moving the contour
The contour can be moved using:

  • the arrow buttons on the main screen
  • arrow keys
  • mouse click + drag

The contour position can be reset using the reset button in the middle of the arrows buttons.

Confidence in alignment
For each projection, the confidence in alignment can be selected.


Display

Options under the Display menu:

  • DRR Viewer: The DRR viewer displays a full DRR view with the true location of the target contour based on the plan.
  • Contour Fill: Change the contour between a border and fill
  • Contour Colour: Change the colour of the contour
  • Invert Intensity: Invert the intensity of the projections.

Contrast Adjustment
The projection contrast can be adjusted using the panel on the main screen. The contrast can be manually changed using the sliders. Additional options include auto adjustment, adjustment based on contour location and adjustment based on an ROI selection.


Data Export

The contours can be exported as binary PNG files. To export the updated contours, go File -> Export or Export As...

  • Export will save the contours to the default location or the location set during data loading.
  • Export As... will save the contours to a new location of choice.

(back to top)

Build

MATLAB App Designer is required to edit and export the application:

Supporting Files


Acknowledgments

The geometry simulation and forward projections are performed using the Reconstruction Toolkit (RTK).


Contact

Adam Mylonas | adam.mylonas@sydney.edu.au

The University of Sydney
Image X Institute
Faculty of Medicine and Health

(back to top)