Skip to content

Commit

Permalink
rf: Use validation_and_dummies_wf in transform mode
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Feb 11, 2025
1 parent 1ddf3c5 commit 6c78e54
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions fmriprep/workflows/bold/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
init_ds_registration_wf,
init_func_fit_reports_wf,
)
from .reference import init_raw_boldref_wf
from .reference import init_raw_boldref_wf, init_validation_and_dummies_wf
from .registration import init_bold_reg_wf
from .stc import init_bold_stc_wf
from .t2s import init_bold_t2s_wf
Expand Down Expand Up @@ -407,15 +407,18 @@ def init_bold_fit_wf(
]) # fmt:skip
else:
config.loggers.workflow.info('Found HMC boldref - skipping Stage 1')

validate_bold = pe.Node(ValidateImage(), name='validate_bold')
validate_bold.inputs.in_file = bold_file

hmcref_buffer.inputs.boldref = precomputed['hmc_boldref']

validation_and_dummies_wf = init_validation_and_dummies_wf(bold_file=bold_file)

workflow.connect([
(validate_bold, hmcref_buffer, [('out_file', 'bold_file')]),
(validate_bold, func_fit_reports_wf, [('out_report', 'inputnode.validation_report')]),
(validation_and_dummies_wf, hmcref_buffer, [
('outputnode.bold_file', 'bold_file'),
('outputnode.skip_vols', 'dummy_scans'),
]),
(validation_and_dummies_wf, func_fit_reports_wf, [
('outputnode.validation_report', 'inputnode.validation_report'),
]),
(hmcref_buffer, hmc_boldref_source_buffer, [('boldref', 'in_file')]),
]) # fmt:skip

Expand Down

0 comments on commit 6c78e54

Please sign in to comment.