Skip to content

Commit

Permalink
Implement for PETLinear
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasGensollen committed Nov 27, 2024
1 parent 86e701b commit c5cc436
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions clinica/pipelines/pet/linear/pipeline.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Use hash instead of parameters for iterables folder names
# Otherwise path will be too long and generate OSError
from pathlib import Path
from typing import List

from nipype import config

from clinica.pipelines.pet.engine import PETPipeline
from clinica.utils.bids import Visit

cfg = dict(execution={"parameterize_dirs": False})
config.update_config(cfg)
Expand All @@ -30,6 +32,26 @@ def _check_custom_dependencies(self) -> None:
"""Check dependencies that can not be listed in the `info.json` file."""
pass

def get_processed_images(self) -> list[Visit]:
from clinica.utils.filemanip import extract_visits
from clinica.utils.input_files import pet_linear_nii
from clinica.utils.inputs import clinica_file_reader

processed_visits: list[Visit] = []
if self.caps_directory.is_dir():
cropped_files, _ = clinica_file_reader(
self.subjects,
self.sessions,
self.caps_directory,
pet_linear_nii(
acq_label=self.parameters["acq_label"],
suvr_reference_region=self.parameters["suvr_reference_region"],
uncropped_image=self.parameters["uncropped_image"],
),
)
processed_visits.extend(extract_visits(cropped_files))
return processed_visits

def get_input_fields(self) -> List[str]:
"""Specify the list of possible inputs of this pipeline.
Expand Down

0 comments on commit c5cc436

Please sign in to comment.