Skip to content

Commit 16c6383

Browse files
committed
WIP: Outline final steps for MCRIBS->fsLR morphometrics
1 parent 5efab1a commit 16c6383

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

nibabies/workflows/anatomical/resampling.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,15 @@ def init_mcribs_morph_grayords_wf(
196196
fslr_density = "32k" if grayord_density == "91k" else "59k"
197197

198198
inputnode = pe.Node(
199-
niu.IdentityInterface(fields=["subject_id", "subjects_dir", "fsLR_midthickness"]),
199+
niu.IdentityInterface(
200+
fields=[
201+
"subject_id",
202+
"subjects_dir",
203+
"surfaces",
204+
"morphometrics",
205+
"fsLR_midthickness",
206+
]
207+
),
200208
name="inputnode",
201209
)
202210

@@ -213,6 +221,9 @@ def init_mcribs_morph_grayords_wf(
213221
run_without_submitting=True,
214222
)
215223

224+
# TODO: Extract L/R midthickness from surfaces
225+
# TODO: Coerce morphometrics into curv-L, curv-R, sulc-L, sulc-R, thickness-L, thickness-R
226+
216227
# Setup Workbench command. LR ordering for hemi can be assumed, as it is imposed
217228
# by the iterfield of the MapNode in the surface sampling workflow above.
218229
resample = pe.MapNode(
@@ -233,13 +244,11 @@ def init_mcribs_morph_grayords_wf(
233244
str(atlases / 'mcribs' / 'lh.sphere.reg.dHCP42.surf.gii'),
234245
str(atlases / 'mcribs' / 'rh.sphere.reg.dHCP42.surf.gii'),
235246
] * 3
236-
# current area: FreeSurfer directory midthickness
247+
# current area: FreeSurfer (M-CRIB-S) midthickness
237248
resample.inputs.new_sphere = [
238249
str(atlases / 'dHCP' / 'dHCP.week42.L.sphere.surf.gii'),
239250
str(atlases / 'dHCP' / 'dHCP.week42.R.sphere.surf.gii'),
240251
] * 3
241-
# new area: dHCP midthickness
242-
243252
resample.inputs.out_file = [
244253
f"space-fsLR_hemi-{h}_den-{grayord_density}_{morph}.shape.gii"
245254
# Order: curv-L, curv-R, sulc-L, sulc-R, thickness-L, thickness-R
@@ -269,6 +278,7 @@ def init_mcribs_morph_grayords_wf(
269278
]),
270279
# (surfmorph_list, surf2surf, [('out', 'source_file')]),
271280
# (surf2surf, resample, [('out_file', 'in_file')]),
281+
(inputnode, resample, [("fsLR_midthickness", "new_area")]),
272282
(resample, gen_cifti, [
273283
(("out_file", _collate), "scalar_surfs")]),
274284
(gen_cifti, outputnode, [("out_file", "cifti_morph"),

0 commit comments

Comments
 (0)