Skip to content

Commit 308f8ff

Browse files
committed
feat: Update totalFieldVarianceInVoxel space based on voxel resolution
1 parent e03e03c commit 308f8ff

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
@@ -227,9 +228,14 @@ def init_syn_sdc_wf(
227228
find_zooms = pe.Node(niu.Function(function=_adjust_zooms), name="find_zooms")
228229
zooms_epi = pe.Node(RegridToZooms(), name="zooms_epi")
229230

231+
syn_config = data.load(f"sd_syn{'_sloppy' * sloppy}.json")
232+
233+
vox_params = pe.Node(niu.Function(function=_mm2vox), name="vox_params")
234+
vox_params.inputs.registration_config = json.loads(syn_config.read_text())
235+
230236
# SyN Registration Core
231237
syn = pe.Node(
232-
Registration(from_file=data.load(f"sd_syn{'_sloppy' * sloppy}.json")),
238+
Registration(from_file=syn_config),
233239
name="syn",
234240
n_procs=omp_nthreads,
235241
)
@@ -310,11 +316,14 @@ def init_syn_sdc_wf(
310316
(anat_dilmsk, amask2epi, [("out_file", "input_image")]),
311317
(amask2epi, epi_umask, [("output_image", "in2")]),
312318
(readout_time, warp_dir, [("pe_direction", "pe_dir")]),
319+
(clip_epi, vox_params, [("out_file", "moving_image")]),
320+
(readout_time, vox_params, [("pe_direction", "pe_dir")]),
313321
(warp_dir, syn, [("out", "restrict_deformation")]),
314322
(anat_merge, syn, [("out", "fixed_image")]),
315323
(fixed_masks, syn, [("out", "fixed_image_masks")]),
316324
(epi_merge, syn, [("out", "moving_image")]),
317325
(moving_masks, syn, [("out", "moving_image_masks")]),
326+
(vox_params, syn, [("out", "transform_parameters")]),
318327
(syn, extract_field, [(("forward_transforms", _pop), "transform")]),
319328
(clip_epi, extract_field, [("out_file", "epi")]),
320329
(readout_time, extract_field, [("readout_time", "ro_time"),

0 commit comments

Comments
 (0)