PCAGuidedIDIFMixin ========================================================= .. py:class:: petpal.pipelines.pca_guided_idif_steps.PCAGuidedIDIFMixin(input_image_path: str, mask_image_path: str, output_tac_path: str, num_pca_components: int, verbose: bool) Bases: :py:obj:`petpal.pipelines.steps_base.StepsAPI` Mixin class to provide shared functionality for PCA-guided IDIF pipeline steps. This class is designed to standardize and extend functionality across various PCA-guided IDIF calculation steps. It handles input and output path management, configuration initialization, and helps define the relationships between preprocessing pipeline steps. Inheritance: Inherits from the :class:`~.StepsAPI` base class. :ivar init_kwargs: A dictionary containing initial configuration parameters. :vartype init_kwargs: dict :ivar call_kwargs: A dictionary containing runtime call-specific parameters. :vartype call_kwargs: dict :ivar input_image_path: Path to the input 4D-PET image. :vartype input_image_path: str :ivar mask_image_path: Path to the mask image in the same space as 4D-PET image. :vartype mask_image_path: str :ivar output_tac_path: Path where output TAC data will be saved. :vartype output_tac_path: str :ivar num_pca_components: Number of PCA components to compute. :vartype num_pca_components: int :ivar verbose: Whether to show detailed diagnostic output or not. :vartype verbose: bool :ivar name: Name of the pipeline step (default is "pca_guided_idif_base"). :vartype name: str .. py:property:: input_image_path .. py:property:: mask_image_path .. py:property:: output_tac_path :type: str .. py:property:: num_pca_components .. py:property:: verbose .. py:method:: set_input_as_output_from(*sending_steps: petpal.pipelines.preproc_steps.ImageToImageStep) -> None Sets the input image paths based on the output paths from other steps in the pipeline. The first sending step will set the input image path, and the second sending step will set the second image path. :param sending_steps: Two pipeline steps whose outputs will be used as the input image path and second image input path. :type sending_steps: tuple[ImageToImageStep] :raises AssertionError: If the number of provided sending steps is not exactly two. .. py:method:: infer_outputs_from_inputs(out_dir: str, der_type: str = 'tacs', suffix: str = 'tac', ext: str = '.tsv', **extra_desc) Infers the output array path based on the inputs and specified parameters. This method generates a BIDS-like derivatives filepath for the output based on the subject and session IDs extracted from the input image path. :param out_dir: Directory where the output array will be saved. :type out_dir: str :param der_type: Type of derivative. Will set the sub-directory in `out_dir`. Defaults to 'tacs'. :type der_type: str, optional :param suffix: Suffix for the output filename. Defaults to 'tac'. :type suffix: str, optional :param ext: File extension for the output file. Defaults to '.tsv'. :type ext: str, optional :param \*\*extra_desc: Additional descriptive parameters for the output filename. .. py:method:: execute(*args, **kwargs) :abstractmethod: .. py:method:: __call__(*args, **kwargs)