Cli Idif ======== .. py:module:: petpal.cli.cli_idif .. autoapi-nested-parse:: This script provides a command-line interface (CLI) to calculate the image-derived input function (IDIF) using necktangle methods. Users can choose between the single threshold method and the double threshold method. The script supports the following functionalities: - Single threshold method: Calculates the time-activity curve (TAC) from PET data using a single percentile threshold. - Double threshold method: Computes the IDIF from a 4D PET necktangle matrix using a double threshold method. Requires: The script relies on the :doc:`argparse `, :doc:`numpy `, and :doc:`nibabel ` modules. Example usage: Using the single threshold method: .. code-block:: bash python idif_necktangle_cli.py single --pet-4d-filepath /path/to/pet_4d.nii --carotid-necktangle-mask-3d-filepath /path/to/mask.nii --percentile 90 Using the double threshold method: .. code-block:: bash python idif_necktangle_cli.py double --necktangle-filepath /path/to/necktangle.npy --percentile 90 --frame-start-times-filepath /path/to/start_times.npy --frame-duration-times-filepath /path/to/duration_times.npy .. seealso:: :mod:`pet_cli.idif_necktangle` - Module for calculating IDIF using necktangle methods.