File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -317,18 +317,29 @@ def generate_summarize_tissue_mask(nuisance_wf,
317
317
pass
318
318
319
319
elif step == 'resolution' :
320
-
321
320
mask_to_epi = pe .Node (interface = fsl .FLIRT (),
322
321
name = '{}_flirt'
323
322
.format (node_mask_key ))
324
323
325
324
mask_to_epi .inputs .interp = 'nearestneighbour'
326
325
327
326
if regressor_selector ['extraction_resolution' ] == "Functional" :
327
+ # invert func2anat matrix to get anat2func_linear_xfm
328
+ anat2func_linear_xfm = pe .Node (interface = fsl .ConvertXFM (), name = 'anat2func_linear_xfm' )
329
+ anat2func_linear_xfm .inputs .invert_xfm = True
330
+ nuisance_wf .connect (* (
331
+ pipeline_resource_pool ['Transformations' ]['func_to_anat_linear_xfm' ] +
332
+ (anat2func_linear_xfm , 'in_file' )
333
+ ))
334
+ # apply anat2func matrix
335
+ mask_to_epi .inputs .apply_xfm = True
336
+ mask_to_epi .inputs .output_type = 'NIFTI_GZ'
328
337
nuisance_wf .connect (* (
329
338
pipeline_resource_pool ['Functional_mean' ] +
330
339
(mask_to_epi , 'reference' )
331
340
))
341
+ nuisance_wf .connect (anat2func_linear_xfm , 'out_file' ,
342
+ mask_to_epi , 'in_matrix_file' )
332
343
else :
333
344
resolution = regressor_selector ['extraction_resolution' ]
334
345
mask_to_epi .inputs .apply_isoxfm = resolution
You can’t perform that action at this time.
0 commit comments