Skip to main content

NIMPA: Neuro and NiftyPET Image Processing and Analysis

Docs Version Downloads Py-Versions DOI Licence Tests

NIMPA is a stand-alone Python sub-package of NiftyPET, dedicated to high-throughput processing and analysis of brain images, particularly those, which are acquired using positron emission tomography (PET) and magnetic resonance (MR). Although, it is an essential part of the NiftyPET package for seamless PET image reconstruction, NIMPA is equally well suited for independent image processing, including image trimming, upsampling and partial volume correction (PVC).

Trimming is performed in order to reduce the unused image voxels in brain imaging, when using whole body PET scanners, for which only some part of the field of view (FOV) is used.

The upsampling is needed for more accurate extraction (sampling) of PET data using regions of interest (ROI), obtained using parcellation of the corresponding T1w MR image, usually of higher image resolution.

PVC is needed to correct for the spill-in and spill-out of PET signal from defined ROIs (specific for any given application).

Documentation with installation manual and tutorials: https://niftypet.readthedocs.io/

Quick Install

Note that it’s recommended (but not required) to use conda.

# cross-platform install
conda install -c conda-forge python=3 \
  ipykernel numpy scipy scikit-image matplotlib ipywidgets dipy nibabel pydicom
pip install "nimpa>=2"

For optional dcm2niix (image conversion from DICOM to NIfTI) and/or niftyreg (image registration) support, simply install them separately (pip install dcm2niix niftyreg).

External CMake Projects

The raw C/CUDA libraries may be included in external projects using cmake. Simply build the project and use find_package(NiftyPETnimpa).

# print installation directory (after `pip install nimpa`)...
python -c "from niftypet.nimpa import cmake_prefix; print(cmake_prefix)"

# ... or build & install directly with cmake
mkdir build && cd build
cmake ../niftypet && cmake --build . && cmake --install . --prefix /my/install/dir

At this point any external project may include NIMPA as follows (Once setting -DCMAKE_PREFIX_DIR=<installation prefix from above>):

cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
project(myproj)
find_package(NiftyPETnimpa COMPONENTS improc REQUIRED)
add_executable(myexe ...)
target_link_libraries(myexe PRIVATE NiftyPET::improc)

Licence

Licence DOI

Copyright 2018-21

Metadata

Release files for nimpa 2.6.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nimpa 2.6.3
File Size Uploaded Provenance Actions
nimpa-2.6.3.tar.gz 1.7 MB Without provenance Details for nimpa-2.6.3.tar.gz

Release files / nimpa-2.6.3.tar.gz

Download URL nimpa-2.6.3.tar.gz
Size 1.7 MB
Tags Source
SHA-256 checksum
How to use checksums
7fd06f1bb246131ff8a3a872902bd007a737e8ac1b62c74b800443173769ec41
BLAKE2b-256 checksum
How to use checksums
a49d2ecdc3645e029ce759f69163a4b2d97ea1a7836a81690228da648386b2aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Security for nimpa 2.6.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.6.3 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page