Skip to content

Latest commit

 

History

History
82 lines (52 loc) · 2.54 KB

README.md

File metadata and controls

82 lines (52 loc) · 2.54 KB

pynemaiqpet

Python routines to analyze NEMA image quality phantom scans.

Banner

Authors

Georg Schramm

Installation

We recommend using the Anaconda Python distribution to create a conda virtual environment for pynemaiqpet.

The installation consists of three steps:

  1. (Optional) Install the Anaconda or Miniforge Python distribution to gain access to the conda or mamba package manager.
  2. Create a conda virtual environment and install the pynemaiqpet Python package and command-line tools from conda-forge.

Note: You can also install the package from pypi using pip install, but we recommend the installation from conda-forge as explained below.

Installation method 1 (recommended): Anaconda/Miniforge and conda-forge

You can either install Anaconda or use the community-driven Miniforge distribution. Find more information and downloads here.

To create a virtual conda environment containing the pynemaiqpet Python package and command-line tools, run:

conda create -c conda-forge -n pynemaiqpet pynemaiqpet

After installation, activate the environment by running:

conda activate pynemaiqpet

Installation method 2 (not recommended): pypi and pip

pip install pynemaiqpet

Test your installation

To test your installation, execute the following commands in Python:

import pynemaiqpet
print(pynemaiqpet.__version__)
print(pynemaiqpet.__file__)

Alternatively, you can check the command-line tool's help page:

pynemaiqpet_wb_nema_iq -h

Running Demos

To analyze a PET reconstruction of the NEMA whole-body phantom stored in DICOM format in the folder my_pet_recon, use the following command:

pynemaiqpet_wb_nema_iq my_pet_recon --output_dir my_pet_recon_results --show --verbose

To apply an additional isotropic Gaussian post-filter to the reconstructed image before analysis, use the --fwhm_mm argument. For example, to apply a filter with a full width at half maximum (FWHM) of 5.0 mm:

pynemaiqpet_wb_nema_iq my_pet_recon --output_dir my_pet_recon_results_5mm_fwhm_gauss --show --verbose --fwhm_mm 5.0

Note: This GitHub repository contains two example NEMA reconstructions in the data subfolder.

Batch-processing data sets

If you need to analyze many reconstructions stored in different dicom folders, have a look at the vision_earl.py or dmi_earl.py
example python scripts in the scripts subfolder that show how to do that efficiently in python.