Skip to main content

A toolkit for performing TG-142 QA-related tasks on a linear accelerator

Project description

Join the chat at https://gitter.im/jrkerns/pylinac Latest Version https://img.shields.io/pypi/l/pylinac.svg https://travis-ci.org/jrkerns/pylinac.svg?branch=master https://coveralls.io/repos/jrkerns/pylinac/badge.svg?branch=master

Pylinac provides TG-142 quality assurance (QA) tools to Python programmers as well as non-programmers in the field of therapy medical physics. The package comes in two flavors: source-level and web app. The source-level allows programmers and those familiar with Python to create custom tests with pylinac while the web app is for those who don’t want or don’t know how to program.

Below are the tools currently available; tools will be added one at a time as they are developed.

  • Starshot Analysis -

    The Starshot module analyses a starshot image made of radiation spokes, whether gantry, collimator, MLC or couch. It is based on ideas from Depuydt et al and Gonzalez et al and evolutionary optimization.

    Features:

    • Analyze scanned film images, single EPID images, or a set of EPID images - Any image that you can load in can be analyzed, including 1 or a set of EPID DICOM images and films that have been digitally scanned.

    • Any image size - Have machines with different EPIDs? Scanned your film at different resolutions? No problem.

    • Dose/OD can be inverted - Whether your device/image views dose as an increase in value or a decrease, pylinac will detect it and invert if necessary.

    • Automatic noise detection & correction - Sometimes there’s dirt on the scanned film; sometimes there’s a dead pixel on the EPID. Pylinac will detect these spurious noise signals and can avoid or account for them.

    • Accurate, FWHM star line detection - Pylinac uses not simply the maximum value to find the center of a star line, but analyzes the entire star profile to determine the center of the FWHM, ensuring small noise or maximum value bias is avoided.

    • Adaptive searching - If you passed pylinac a set of parameters and a good result wasn’t found, pylinac can recover and do an adaptive search by adjusting parameters to find a “reasonable” wobble.

  • VMAT QA -

    The VMAT module consists of the class VMAT, which is capable of loading an EPID DICOM Open field image and MLC field image and analyzing the images according to the Varian RapidArc QA tests and procedures, specifically the Dose-Rate & Gantry-Speed (DRGS) and MLC speed (MLCS) tests.

    Features:

    • Do both tests - Pylinac can handle either DRGS or DRMLC tests.

    • Adjust for offsets - Older VMAT patterns were off-center. Easily account for the offset by passing it in.

    • Automatic identification using file names - If your file names are clear, the image type and test type don’t even have to be specified; just load and analyze.

  • CT & CBCT QA -

    The CBCT module automatically analyzes DICOM images of a CatPhan acquired when doing CBCT or regular CT quality assurance. It can load a folder or zip file that the images are in and automatically correct for phantom setup in 6 degrees. It can analyze the HU regions and image scaling (CTP404), the high-contrast line pairs (CTP528) to calculate the modulation transfer function (MTF), and the HU uniformity (CTP486) on the corresponding slice.

    Currently only Varian (CatPhan 504) is supported, but Elekta (CatPhan 503) support is being worked on.

    Features:

    • Automatic phantom registration - Your phantom can be tilted, rotated, or translated–pylinac will register the phantom.

    • Automatic testing of 4 major modules - Major modules are automatically registered and analyzed.

    • Any scan protocol - Scan your CatPhan504 with any Varian protocol; or even scan it in a regular CT scanner. Any field size or field extent is allowed.

  • Log Analysis -

    The log analyzer module reads and parses Varian linear accelerator machine logs, both Dynalogs and Trajectory logs. The module also calculates actual and expected fluences as well as performing gamma evaluations. Data is structured to be easily accessible and easily plottable.

    Unlike most other modules of pylinac, the log analyzer module has no end goal. Data is parsed from the logs, but what is done with that info, and which info is analyzed is up to the user.

    Features:

    • Analyze Dynalogs or Trajectory logs - Either platform is supported. Tlog versions 2.1 and 3.0 supported.

    • Save Trajectory log data to CSV - The Trajectory log binary data format does not allow for easy export of data. Pylinac lets you do that so you can use Excel or other software that you use with Dynalogs.

    • Plot or analyze any axis - Every data axis can be plotted: the actual, expected, and even the difference.

  • Picket Fence MLC Analysis -

    The picket fence module is meant for analyzing EPID images where a “picket fence” MLC pattern has been made. Physicists regularly check MLC positioning through this test. This test can be done using film and one can “eyeball” it, but this is the 21st century and we have numerous ways of quantifying such data. This module attains to be one of them. It will load in an EPID dicom image and determine the MLC peaks, error of each MLC pair to the picket, and give a few visual indicators for passing/warning/failing.

    Features:

    • Analyze either HD or regular MLCs - Just pass a flag and tell pylinac whether it’s HD or not.

    • Easy-to-read pass/warn/fail overlay - Analysis gives you easy-to-read tools for determining the status of an MLC pair.

    • Any Source-to-Image distance - Whatever your clinic uses as the SID for picket fence, pylinac can account for it.

    • Account for panel translation - Have an off-CAX setup? No problem. Translate your EPID and pylinac knows.

    • Account for panel sag - If your EPID sags at certain angles, just tell pylinac and the results will be shifted.

  • Flatness/Symmetry Analysis -

    Analysis of Flatness & Symmetry of film or EPID images. Multiple equation definitions, in/cross plane.

Documentation

To get started, install, run the demos, view the API docs, and learn the module design, visit the Full Documentation on Read The Docs.

Discussion

Have questions? Ask them here on the pylinac forum.

Contributing

Contributions to pylinac can be many. The most useful things a non-programmer can contribute are images to analyze and bug reports. If you have VMAT images, starshot images, machine log files, CBCT DICOM files, or anything else you want analyzed, email or share them via Dropbox, Google Drive, etc: jkerns at gmail.com

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

pylinac-0.9.1.zip (16.3 MB view details)

Uploaded Source

Built Distribution

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

pylinac-0.9.1-py3-none-any.whl (17.4 MB view details)

Uploaded Python 3

File details

Details for the file pylinac-0.9.1.zip.

File metadata

  • Download URL: pylinac-0.9.1.zip
  • Upload date:
  • Size: 16.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pylinac-0.9.1.zip
Algorithm Hash digest
SHA256 f1de5efd1247c9946f92fde25b5914d13c9c91d1cba6aee6810a2658422946a6
MD5 2fd1f29deae6278cdb56cfa30fcb5d4f
BLAKE2b-256 01ef82e6b85fbfb5dfa2199cd6c5fe92d3e372419280594b2da06dfc0f29c037

See more details on using hashes here.

File details

Details for the file pylinac-0.9.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pylinac-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3d0dc04adde7d9c9e7fc900c5ddb080161a32d2cfe8e0cc0070109a5eeb83d69
MD5 82881e1971cc797aef3887355f5c644f
BLAKE2b-256 8605686907a5c97bf09f8022569810f2104a176f88725a1277c11a6f87a577f7

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