From aa3093f2d503da80d083408d30766026ba2f7600 Mon Sep 17 00:00:00 2001 From: NicolasGensollen Date: Fri, 25 Oct 2024 14:04:25 +0200 Subject: [PATCH] Revert "[FIX] Correct the `pet-linear` pipeline (#1348)" This reverts commit 1fad1c3a3ccbd56b9b4c5f3fc1884ec602be4e55. --- clinica/pipelines/pet/linear/pipeline.py | 30 ++++-------------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/clinica/pipelines/pet/linear/pipeline.py b/clinica/pipelines/pet/linear/pipeline.py index aae24d09c..9e877c5a8 100644 --- a/clinica/pipelines/pet/linear/pipeline.py +++ b/clinica/pipelines/pet/linear/pipeline.py @@ -38,7 +38,7 @@ def get_input_fields(self) -> List[str]: list of str : A list of (string) input fields name. """ - return ["pet", "t1w", "t1w_to_mni", "t1w_linear"] + return ["pet", "t1w", "t1w_to_mni"] def get_output_fields(self) -> List[str]: """Specify the list of possible outputs of this pipeline. @@ -66,12 +66,7 @@ def _build_input_node(self): ClinicaException, ) from clinica.utils.image import get_mni_template - from clinica.utils.input_files import ( - T1W_LINEAR, - T1W_LINEAR_CROPPED, - T1W_NII, - T1W_TO_MNI_TRANSFORM, - ) + from clinica.utils.input_files import T1W_NII, T1W_TO_MNI_TRANSFORM from clinica.utils.inputs import clinica_file_reader from clinica.utils.stream import cprint from clinica.utils.ux import print_images_to_process @@ -107,21 +102,6 @@ def _build_input_node(self): raise ClinicaBIDSError(err) # Inputs from t1-linear pipeline - # T1w images registered - t1w_linear_file_pattern = ( - T1W_LINEAR - if self.parameters.get("uncropped_image", False) - else T1W_LINEAR_CROPPED - ) - try: - t1w_linear_files, _ = clinica_file_reader( - self.subjects, - self.sessions, - self.caps_directory, - t1w_linear_file_pattern, - ) - except ClinicaException as e: - raise ClinicaCAPSError(e) # Transformation files from T1w files to MNI: try: t1w_to_mni_transformation_files, _ = clinica_file_reader( @@ -144,7 +124,6 @@ def _build_input_node(self): ("t1w", t1w_files), ("pet", pet_files), ("t1w_to_mni", t1w_to_mni_transformation_files), - ("t1w_linear", t1w_linear_files), ], synchronize=True, interface=nutil.IdentityInterface(fields=self.get_input_fields()), @@ -154,7 +133,6 @@ def _build_input_node(self): (read_input_node, self.input_node, [("t1w", "t1w")]), (read_input_node, self.input_node, [("pet", "pet")]), (read_input_node, self.input_node, [("t1w_to_mni", "t1w_to_mni")]), - (read_input_node, self.input_node, [("t1w_linear", "t1w_linear")]), ] ) @@ -416,12 +394,12 @@ def _build_core_nodes(self): ( self.input_node, ants_registration_nonlinear_node, - [("t1w_linear", "moving_image")], + [("t1w", "moving_image")], ), ( ants_registration_nonlinear_node, ants_applytransform_nonlinear_node, - [("forward_transforms", "transforms")], + [("reverse_forward_transforms", "transforms")], ), ( ants_applytransform_node,