Skip to content

Image-X-Institute/contour-alignment-tool

Repository files navigation

Contour Alignment Tool

An application for visualising and aligning contours in kV projections.

Report Bug · Request Feature


For the LEARN trial Patient Selection Tool see this README.

Table of Contents


About

The Contour Alignment Tool is a MATLAB-based application designed for aligning 3D structure contours with 2D kilovoltage projections.

Key Features:

  • Load projections along with CT, structure set, and treatment plan files.
  • Visualise and manually align 2D contours generated from 3D structures.
  • Export aligned contours as binary masks for machine learning applications.
  • Supports a wide range of 2D projection formats.

Tool Interface


Getting Started

System Requirements and Prerequisites


Installation

  1. Download the latest release:
    ContourAlignmentTool v1.3.7
  2. Extract contents to a local directory.

Data

Required data types:

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

Sample data is available from the SPARK Database.


Usage

Loading Data

  1. Launch the application by running the ContourAlignmentTool.exe.

    ⏳ It may take several minutes to load depending on the system.

  2. Load data via:

    • Individual Browse: Manually select CT, plan, structure, and image files.
    • Clinical Data Browse: Load entire patient datasets. For ROCK-RT data, choose YourHospital/liver for automatically patients load. (As Below)

    Data Loading

  3. Set parameters:

    • Number of projections
    • Pixel spacing
    • SID, SDD, detector offset (if not found in headers)

    Parameter Setup

  4. Select the Structure of Interest from the dropdown.

  5. Click Proceed to begin processing (execution time varies).

  6. After processing, begin labelling and alignment: Label View

Validate projections using the DRR Viewer under the Display menu.


Contour Alignment

Navigation

  • Use on-screen navigation buttons or arrow keys to switch projections.
  • Click any projection from the list to jump to it.

Moving Contours

  • Use:
    • Arrow keys / UI buttons
    • Mouse drag
  • Reset with the center reset button.

Confidence Selection

  • Mark each projection's alignment confidence for tracking.

Display Options

Located under the Display menu:

  • DRR Viewer: Shows full DRR view with true contour locations.
  • Contour Fill: Switch between filled or border display.
  • Contour Colour: Set custom contour colours.
  • Invert Intensity: Toggle image intensity inversion.

Contrast Adjustment

  • Use sliders to manually adjust contrast.
  • Additional tools for:
    • Auto adjust
    • ROI-based adjust
    • Contour-based adjust

Data Export

  • Navigate to FileExport or Export As...:
    • Export: Saves to the default or previously set directory.
    • Export As...: Choose a new export location.

Outputs are binary PNG masks aligned with each projection.


Build

To modify or build the tool, use MATLAB App Designer.

Project files:

  • ContourAlignmentTool.mlapp — main application file.
  • ContourAlignmentTool.prj — packaging project config.

Supporting Files

  • /ContourAlignmentTool_resources — application graphics
  • /Dependencies — core processing modules
  • /Supporting Apps — additional GUI components

Acknowledgments

Geometry simulation and projection rendering powered by the
Reconstruction Toolkit (RTK).


Contact

Adam Mylonas
Email: adam.mylonas@sydney.edu.au
Image X Institute, The University of Sydney
Faculty of Medicine and Health


Back to top

About

Application for the manual alignment of contours in kV projections.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •  

Languages