Skip to content

Commit

Permalink
pad with ANTS not homemade pad
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmeunier79 committed Jun 7, 2024
1 parent 38a496f commit b8290f0
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions macapype/pipelines/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ def create_short_preparation_pipe(params, params_template={},
outputnode, 'preproc_T2')

# resample T1 to higher dimension
if "resample_T1_pad" in params.keys():
if "pad_template" in params.keys():

resample_T1_pad = pe.Node(
regutils.RegResample(),
Expand Down Expand Up @@ -740,20 +740,13 @@ def create_short_preparation_pipe(params, params_template={},
params_template["padded_template_head"]

elif "template_head" in params_template.keys():
if "pad_val" in params["resample_T1_pad"].keys():
pad_val = params["resample_T1_pad"]["pad_val"]
print("Found pad_val {}".format(pad_val))

# padding versio of the template
pad_template = NodeParams(
niu.Function(
input_names=["img_file", "pad_val", "const"],
output_names=["padded_img_file"],
function=pad_zero_mri),
params=parse_key(params, "resample_T1_pad"),
pad_template = pe.NodeParams(
ImageMath(),
params=parse_key(params, "pad_template"),
name="pad_template")

pad_template.inputs.img_file = params_template["template_head"]
pad_template.inputs.op1 = params_template["template_head"]

# resample_T1_pad
data_preparation_pipe.connect(
Expand Down

0 comments on commit b8290f0

Please sign in to comment.