Skip to content

Commit 7464e21

Browse files
committed
feat: Update totalFieldVarianceInVoxel space based on voxel resolution
1 parent 6bbae23 commit 7464e21

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

sdcflows/data/sd_syn.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"shrink_factors": [ [ 1, 1 ], [ 1 ] ],
1515
"sigma_units": [ "vox", "vox" ],
1616
"smoothing_sigmas": [ [ 2, 0 ], [ 0 ] ],
17-
"transform_parameters": [ [ 0.8, 6.0, 3.0 ], [ 0.8, 2.0, 1.0 ] ],
17+
"transform_parameters": [ [ 0.8, 6.0, 10.0 ], [ 0.8, 2.0, 0.5 ] ],
1818
"transforms": [ "SyN", "SyN" ],
1919
"use_histogram_matching": [ true, true ],
2020
"winsorize_lower_quantile": 0.001,

sdcflows/data/sd_syn_sloppy.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"shrink_factors": [ [ 1, 1 ], [ 1 ] ],
1515
"sigma_units": [ "vox", "vox" ],
1616
"smoothing_sigmas": [ [ 2, 0 ], [ 0 ] ],
17-
"transform_parameters": [ [ 0.8, 6.0, 3.0 ], [ 0.8, 2.0, 1.0 ] ],
17+
"transform_parameters": [ [ 0.8, 6.0, 10.0 ], [ 0.8, 2.0, 0.5 ] ],
1818
"transforms": [ "SyN", "SyN" ],
1919
"use_histogram_matching": [ true, true ],
2020
"verbose": true,

sdcflows/workflows/fit/syn.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"""
2424
Estimating the susceptibility distortions without fieldmaps.
2525
"""
26+
import json
2627

2728
from nipype.pipeline import engine as pe
2829
from nipype.interfaces import utility as niu
@@ -214,9 +215,14 @@ def init_syn_sdc_wf(
214215
find_zooms = pe.Node(niu.Function(function=_adjust_zooms), name="find_zooms")
215216
zooms_epi = pe.Node(RegridToZooms(), name="zooms_epi")
216217

218+
syn_config = data.load(f"sd_syn{'_sloppy' * sloppy}.json")
219+
220+
vox_params = pe.Node(niu.Function(function=_mm2vox), name="vox_params")
221+
vox_params.inputs.registration_config = json.loads(syn_config.read_text())
222+
217223
# SyN Registration Core
218224
syn = pe.Node(
219-
Registration(from_file=data.load(f"sd_syn{'_sloppy' * sloppy}.json")),
225+
Registration(from_file=syn_config),
220226
name="syn",
221227
n_procs=omp_nthreads,
222228
)
@@ -295,11 +301,14 @@ def init_syn_sdc_wf(
295301
(anat_dilmsk, amask2epi, [("out_file", "input_image")]),
296302
(amask2epi, epi_umask, [("output_image", "in2")]),
297303
(readout_time, warp_dir, [("pe_direction", "pe_dir")]),
304+
(clip_epi, vox_params, [("out_file", "moving_image")]),
305+
(readout_time, vox_params, [("pe_direction", "pe_dir")]),
298306
(warp_dir, syn, [("out", "restrict_deformation")]),
299307
(anat_merge, syn, [("out", "fixed_image")]),
300308
(fixed_masks, syn, [("out", "fixed_image_masks")]),
301309
(epi_merge, syn, [("out", "moving_image")]),
302310
(moving_masks, syn, [("out", "moving_image_masks")]),
311+
(vox_params, syn, [("out", "transform_parameters")]),
303312
(syn, extract_field, [(("forward_transforms", _pop), "transform")]),
304313
(clip_epi, extract_field, [("out_file", "epi")]),
305314
(readout_time, extract_field, [("readout_time", "ro_time"),

0 commit comments

Comments
 (0)