-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Georg Schramm
authored and
Georg Schramm
committed
Nov 29, 2024
1 parent
d82c5b2
commit 89ff9a1
Showing
1 changed file
with
31 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,79 @@ | ||
# pynemaiqpet | ||
|
||
python routines to analyze NEMA image quality phantom scans | ||
Python routines to analyze NEMA image quality phantom scans. | ||
|
||
## Authors | ||
|
||
Georg Schramm | ||
|
||
## License | ||
|
||
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details | ||
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. | ||
|
||
## Installation | ||
|
||
We recommend to use the anaconda python distribution and to create a | ||
conda virtual environment for pynemaiqpet. | ||
We recommend using the Anaconda Python distribution to create a conda virtual environment for `pynemaiqpet`. | ||
|
||
The installation consists of three steps: | ||
|
||
1. (optional, if not done) Installation of anaconda / miniforge python distribution | ||
to get the conda / mamba package manager | ||
2. Creation of the conda virtual environment including the `pynemaiqpet` | ||
python package and command line tools from `conda-forge` | ||
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`. | ||
|
||
### Installation of miniforge | ||
**Note:** _You can also install the package from pypi using pip install, but we recommend the | ||
installation from conda-forge as explained below._ | ||
|
||
You can either install anaconda, or use the community driven miniforge | ||
distribution [here](https://github.com/conda-forge/miniforge) | ||
### Installation method 1: Anaconda/Miniforge and conda-forge | ||
|
||
### Creation of the virtual conda environment and installation of pynemaiqpet | ||
You can either install Anaconda or use the community-driven Miniforge distribution. Find more information and downloads [here](https://github.com/conda-forge/miniforge). | ||
|
||
You can create a virtual conda environment containing the `pynemaiqpet` | ||
python package and command line tools via: | ||
### Creation of the Virtual Conda Environment and Installation of pynemaiqpet | ||
|
||
``` | ||
To create a virtual conda environment containing the `pynemaiqpet` Python package and command-line tools, run: | ||
|
||
```bash | ||
conda create -c conda-forge -n pynemaiqpet pynemaiqpet | ||
``` | ||
|
||
After installation, activate the environment via | ||
After installation, activate the environment by running: | ||
|
||
```bash | ||
conda activate pynemaiqpet | ||
``` | ||
|
||
conda activate pynemaiqpet | ||
### Installation method 2 (not recommended): pypi and pip | ||
|
||
``` | ||
pip install pynemaiqpet | ||
``` | ||
|
||
### Test your installation | ||
|
||
To test your installation you can execute the following in python | ||
To test your installation, execute the following commands in Python: | ||
|
||
```python | ||
import pynemaiqpet | ||
print(pynemaiqpet.__version__) | ||
print(pynemaiqpet.__file__) | ||
``` | ||
|
||
or by displaying the help of the command line tool | ||
Alternatively, you can check the command-line tool's help page: | ||
|
||
``` | ||
```bash | ||
pynemaiqpet_wb_nema_iq -h | ||
``` | ||
|
||
## Run demos | ||
## Running Demos | ||
|
||
To analyze a PET reconstruction of the NEMA WB phantom stored in dicom in | ||
the folder `my_pet_recon` using the command line tool, you can execute: | ||
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: | ||
|
||
``` | ||
```bash | ||
pynemaiqpet_wb_nema_iq my_pet_recon --output_dir my_pet_recon_results --show --verbose | ||
``` | ||
|
||
You can also apply an additional isotropic Gaussian post filter to the reconstructed | ||
image, before running the analysis using the `--fwhm_mm` command line argument: | ||
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: | ||
|
||
``` | ||
```bash | ||
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 recons in the [data subfolder](./data). | ||
**Note:** This GitHub repository contains two example NEMA reconstructions in the [data subfolder](./data). |