@@ -175,6 +175,8 @@ def init_mcribs_morph_grayords_wf(
175
175
from niworkflows .engine .workflows import LiterateWorkflow as Workflow
176
176
from smriprep .interfaces .cifti import GenerateDScalar
177
177
178
+ from nibabies .interfaces .workbench import SurfaceVertexAreas
179
+
178
180
workflow = Workflow (name = name )
179
181
workflow .__desc__ = f"""\
180
182
*Grayordinate* "dscalar" files [@hcppipelines] containing { grayord_density } samples were
@@ -206,15 +208,19 @@ def init_mcribs_morph_grayords_wf(
206
208
run_without_submitting = True ,
207
209
)
208
210
209
- get_current_midthickness = pe .Node (
211
+ subject_midthickness = pe .Node (
210
212
niu .Function (function = _get_surf ),
211
213
name = "get_midthickness" ,
212
214
run_without_submitting = True ,
213
215
)
214
- get_current_midthickness .inputs .name = "midthickness"
215
- get_current_midthickness .inputs .mult = 3
216
+ subject_midthickness .inputs .name = "midthickness"
217
+ subject_midthickness .inputs .mult = 3
218
+
219
+ template_midthickness = subject_midthickness .clone ("get_new_midthickness" )
216
220
217
- get_new_midthickness = get_current_midthickness .clone ("get_new_midthickness" )
221
+ # Create Vertex Areas from midthickness surfaces
222
+ subject_va = pe .MapNode (SurfaceVertexAreas (), iterfield = "in_file" , name = "subject_va" )
223
+ template_va = subject_va .clone ("template_va" )
218
224
219
225
# Setup Workbench command. LR ordering for hemi can be assumed, as it is imposed
220
226
# by the iterfield of the MapNode in the surface sampling workflow above.
@@ -258,10 +264,12 @@ def init_mcribs_morph_grayords_wf(
258
264
259
265
# fmt: off
260
266
workflow .connect ([
261
- (inputnode , get_current_midthickness , [("surfaces" , "surfaces" )]),
262
- (inputnode , get_new_midthickness , [("midthickness_fsLR" , "surfaces" )]),
263
- (get_current_midthickness , resample , [("out" , "current_area" )]),
264
- (get_new_midthickness , resample , [("out" , "new_area" )]),
267
+ (inputnode , subject_midthickness , [("surfaces" , "surfaces" )]),
268
+ (inputnode , template_midthickness , [("midthickness_fsLR" , "surfaces" )]),
269
+ (subject_midthickness , subject_va , [("out" , "in_file" )]),
270
+ (template_midthickness , template_va , [("out" , "in_file" )]),
271
+ (subject_va , resample , [("out_file" , "current_area" )]),
272
+ (template_va , resample , [("out_file" , "new_area" )]),
265
273
(inputnode , surfmorph_list , [
266
274
(('morphometrics' , _get_surf , "curv" ), "in1" ),
267
275
(('morphometrics' , _get_surf , "sulc" ), "in2" ),
0 commit comments