Pca Guided Idif#
This module implements PCA (Principal Component Analysis)-guided methods for generating Image-Derived Input Functions (IDIF) from 4D-PET data. IDIFs are used in PET (Positron Emission Tomography) imaging workflows for kinetic modeling and quantification. The methods provided in this module focus on data-driven approaches based on PCA, offering tools for selecting relevant voxels and refining input functions.
The module is designed for flexibility, offering tools for to apply PCA-based analyses over 4D-PET data and masks. The classes are structured to allow reuse and extension for new functionalities.
Classes#
PCAGuidedIdifBase: An abstract base class that supports data preparation, PCA operations, and IDIF computation from PCA projections.PCAGuidedTopVoxelsIDIF: Implements IDIF generation based on selecting the top PCA component voxels.PCAGuidedIdifFitterBase: A base class for deriving optimal voxel fit masks using minimization routines and customizable terms (e.g., smoothness, noise).PCAGuidedIdifFitter: A concrete implementation ofPCAGuidedIdifFitterBase, providing default term definitions.
Dependencies#
numpy: For numerical operations and array manipulations.ants: For reading and handling medical image data.lmfit: Used for robust fitting and parameter optimization.sklearn: For PCA implementation.- Other project-specific utilities:
ScanTimingInfo: Handles timing information from NIfTI images.temporal_pca_analysis_of_image_over_mask(): Performs PCA on dynamic image data over a given mask.extract_roi_voxel_tacs_from_image_using_mask(): Extracts voxel TACS (Time-Activity Curves) from the input image.
Notes
The classes contain abstract (
NotImplementedError) methods, intended to be overridden by derived classes as per the specific use case. These serve as stubs for users wishing to extend the module.While the module supports large dynamic datasets, care should be taken with memory usage when handling large voxel masks or PCA decomposition.
Todo
Write a tutorial to to use the class to generate an IDIF and use the IF to perform kinetic analysis
Classes#
A base class for PCA-guided Image-Derived Input Function (IDIF) generation. |
|
Class for calculating a PCA-guided IDIF by averaging over the top voxels of a selected principal component (PC). |
|
Base class for calculating the PCA-guided IDIF by fitting to find the best voxels |
|
Class to calculate the PCA-guided Image-Derived Input Function (IDIF) by fitting to find the best voxels. |