Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intra links #285

Merged
merged 13 commits into from
Jul 27, 2023
220 changes: 188 additions & 32 deletions capsul/dataset.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ def pipeline_definition(self):

# links
self.export_parameter("NormalizeBaladin", "anatomy_data", "t1mri", is_optional=False)
self.add_link("t1mri->ReorientAnatomy.t1mri")
self.add_link("t1mri->ConvertBaladinNormalizationToAIMS.source_volume")
self.add_link("t1mri->ReorientAnatomy.t1mri")
self.export_parameter("ConvertBaladinNormalizationToAIMS", "registered_volume", "template", is_optional=False)
self.add_link("template->NormalizeBaladin.anatomical_template")
self.export_parameter("ConvertBaladinNormalizationToAIMS", "set_transformation_in_source_volume", is_optional=False)
self.export_parameter("ReorientAnatomy", "allow_flip_initial_MRI", is_optional=False)
self.export_parameter("ReorientAnatomy", "commissures_coordinates", "ReorientAnatomy_commissures_coordinates", is_optional=True)
self.add_link("NormalizeBaladin.transformation_matrix->ConvertBaladinNormalizationToAIMS.read")
self.export_parameter("NormalizeBaladin", "transformation_matrix", "NormalizeBaladin_transformation_matrix", is_optional=True)
self.add_link("NormalizeBaladin.transformation_matrix->ConvertBaladinNormalizationToAIMS.read")
self.export_parameter("NormalizeBaladin", "normalized_anatomy_data", "NormalizeBaladin_normalized_anatomy_data", is_optional=True)
self.export_parameter("ConvertBaladinNormalizationToAIMS", "write", "ConvertBaladinNormalizationToAIMS_write", is_optional=True)
self.add_link("ConvertBaladinNormalizationToAIMS.write->ReorientAnatomy.transformation")
Expand Down
7 changes: 4 additions & 3 deletions capsul/pipeline/test/fake_morphologist/brainorientation.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ def pipeline_definition(self):
self.export_parameter("select_AC_PC_Or_Normalization", "switch", "select_AC_PC_Or_Normalization", is_optional=True)
self.export_parameter("Normalization", "t1mri", "T1mri", is_optional=False)
self.add_link("T1mri->StandardACPC.T1mri")
self.export_parameter("Normalization", "allow_flip_initial_MRI", is_optional=False)
self.add_link("allow_flip_initial_MRI->StandardACPC.allow_flip_initial_MRI")
self.export_parameter("StandardACPC", "allow_flip_initial_MRI", is_optional=False)
self.add_link("allow_flip_initial_MRI->Normalization.allow_flip_initial_MRI")
self.export_parameter("StandardACPC", "Normalised", "StandardACPC_Normalised", is_optional=True)
self.export_parameter("StandardACPC", "Anterior_Commissure", "StandardACPC_Anterior_Commissure", is_optional=True)
self.export_parameter("StandardACPC", "Posterior_Commissure", "StandardACPC_Posterior_Commissure", is_optional=True)
Expand Down Expand Up @@ -60,8 +60,8 @@ def pipeline_definition(self):
self.add_link("StandardACPC.reoriented_t1mri->select_AC_PC_Or_Normalization.StandardACPC_switch_reoriented_t1mri")
self.export_parameter("Normalization", "transformation", "normalization_transformation", weak_link=True, is_optional=True)
self.add_link("Normalization.transformation->TalairachFromNormalization.normalization_transformation")
self.add_link("Normalization.reoriented_t1mri->TalairachFromNormalization.t1mri")
self.add_link("Normalization.reoriented_t1mri->select_AC_PC_Or_Normalization.Normalization_switch_reoriented_t1mri")
self.add_link("Normalization.reoriented_t1mri->TalairachFromNormalization.t1mri")
self.export_parameter("Normalization", "normalized", "Normalization_normalized", weak_link=True, is_optional=True)
self.export_parameter("Normalization", "NormalizeFSL_NormalizeFSL_transformation_matrix", "Normalization_NormalizeFSL_NormalizeFSL_transformation_matrix", weak_link=True, is_optional=True)
self.export_parameter("Normalization", "NormalizeSPM_spm_transformation", "Normalization_NormalizeSPM_spm_transformation", weak_link=True, is_optional=True)
Expand Down Expand Up @@ -130,6 +130,7 @@ def pipeline_definition(self):
self.allow_flip_initial_MRI = False
self.StandardACPC_Normalised = 'No'
self.StandardACPC_remove_older_MNI_normalization = True
self.Normalization_select_Normalization_pipeline = 'NormalizeSPM'
self.Normalization_init_translation_origin = 0
self.Normalization_NormalizeFSL_alignment = 'Not Aligned but Same Orientation'
self.Normalization_NormalizeFSL_set_transformation_in_source_volume = True
Expand Down
8 changes: 4 additions & 4 deletions capsul/pipeline/test/fake_morphologist/fslnormalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ def pipeline_definition(self):
self.add_process("converter", "capsul.pipeline.test.fake_morphologist.aimsconverter.AimsConverter")

# links
self.export_parameter("ConvertFSLnormalizationToAIMS", "source_volume", "t1mri", is_optional=False)
self.add_link("t1mri->converter.read")
self.export_parameter("converter", "read", "t1mri", is_optional=False)
self.add_link("t1mri->ReorientAnatomy.t1mri")
self.export_parameter("NormalizeFSL", "anatomical_template", "template", is_optional=False)
self.add_link("template->ConvertFSLnormalizationToAIMS.registered_volume")
self.add_link("t1mri->ConvertFSLnormalizationToAIMS.source_volume")
self.export_parameter("ConvertFSLnormalizationToAIMS", "registered_volume", "template", is_optional=False)
self.add_link("template->NormalizeFSL.anatomical_template")
self.export_parameter("NormalizeFSL", "Alignment", "alignment", is_optional=False)
self.export_parameter("ConvertFSLnormalizationToAIMS", "set_transformation_in_source_volume", is_optional=False)
self.export_parameter("ReorientAnatomy", "allow_flip_initial_MRI", is_optional=False)
Expand Down
Loading