Skip to content

Commit

Permalink
REF: Use assignment expression for random seed
Browse files Browse the repository at this point in the history
  • Loading branch information
ghisvail committed May 28, 2023
1 parent ce37eac commit 0415b61
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions clinica/pipelines/t1_linear/anat_linear_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,6 @@ def build_output_node(self):
]
)




if not (self.parameters.get("uncropped_image")):
self.connect(
[
Expand Down Expand Up @@ -273,10 +270,9 @@ def build_core_nodes(self):
ants_registration_node.inputs.fixed_image = self.ref_template
ants_registration_node.inputs.transform_type = "a"
ants_registration_node.inputs.dimension = 3
if self.parameters.get("random_seed") is not None:
ants_registration_node.inputs.random_seed = self.parameters.get(
"random_seed"
)

if random_seed := self.parameters.get("random_seed", None):
ants_registration_node.inputs.random_seed = random_seed

# 3. Crop image (using nifti). It uses custom interface, from utils file

Expand Down

0 comments on commit 0415b61

Please sign in to comment.