Package: nipet
NIPET is a Python sub-package ofNiftyPET, offering high-throughput PET image reconstruction as well as image processing and analysis (nimpa:https://github.com/NiftyPET/NIMPA) for PET/MR imaging with high quantitative accuracy and precision. The software is written in CUDA C and embedded in Python C extensions.The scientific aspects of this software are covered in two open-access publications:NiftyPET: a High-throughput Software Platform for High Quantitative Accuracy and Precision PET Imaging and AnalysisNeuroinformatics (2018) 16:95.https://doi.org/10.1007/s12021-017-9352-yRapid processing of PET list-mode data for efficient uncertainty estimation and data analysisPhysics in Medicine & Biology (2016).https://doi.org/10.1088/0031-9155/61/13/N322Although, the two stand-alone and independent packages,nipetandnimpa, are dedicated to brain imaging, they can equally well be used for whole body imaging.  Strong emphasis is put on the data, which are acquired using positron emission tomography (PET) and magnetic resonance (MR), especially the hybrid and simultaneous PET/MR scanners.This software platform and Python name-spaceNiftyPETcovers the entire processing pipeline, from the raw list-mode (LM) PET data through to the final image statistic of interest (e.g., regional SUV), including LM bootstrapping and multiple reconstructions to facilitate voxel-wise estimation of uncertainties.In order to facilitate all the functionality,NiftyPETrelies on third-party software for image conversion from DICOM to NIfTI (dcm2niix) and image registration (NiftyReg).  The additional software is installed automatically to a user specified location.Documentation with installation manual and tutorials:https://niftypet.readthedocs.io/Quick InstallNote that installation prompts for setting the path toNiftyPET_toolsand
hardware attenuation maps. This can be avoided by setting the environment
variablesPATHTOOLSandHMUDIR, respectively.
It’s also recommended (but not required) to useconda.# optional (Linux syntax) to avoid promptsexportPATHTOOLS=$HOME/NiftyPET_toolsexportHMUDIR=$HOME/mmr_hardwareumaps# cross-platform installcondainstall-cconda-forgepython=3\ipykernelnumpyscipyscikit-imagematplotlibipywidgetsdipynibabelpydicompipinstall"nipet>=2"External CMake ProjectsThe raw C/CUDA libraries may be included in external projects usingcmake.
Simply build the project and usefind_package(NiftyPETnipet).# print installation directory (after `pip install nipet`)...python-c"from niftypet.nipet import cmake_prefix; print(cmake_prefix)"# ... or build & install directly with cmakemkdirbuild&&cdbuildcmake../niftypet&&cmake--build.&&cmake--install.--prefix/my/install/dirAt this point any external project may include NIPET as follows
(Once setting-DCMAKE_PREFIX_DIR=<installationprefix from above>):cmake_minimum_required(VERSION3.3FATAL_ERROR)project(myproj)find_package(NiftyPETnipetCOMPONENTSmmr_auxemmr_lmprocpetprjnifty_scatterREQUIRED)add_executable(myexe...)target_link_libraries(myexePRIVATENiftyPET::mmr_auxeNiftyPET::mmr_lmprocNiftyPET::petprjNiftyPET::nifty_scatter)LicenceCopyright 2018-21Pawel J. Markiewicz@ University College LondonCasper O. da Costa-Luis@ King’s College LondonContributors