diff --git a/mriqc/data/bootstrap-func.yml b/mriqc/data/bootstrap-func.yml index 659c3b5e8..5e34fc115 100644 --- a/mriqc/data/bootstrap-func.yml +++ b/mriqc/data/bootstrap-func.yml @@ -37,10 +37,28 @@ sections: - bids: {datatype: figures, desc: stdev} subtitle: Standard deviation of signal through time caption: The voxel-wise standard deviation of the signal (variability along time). + - bids: {datatype: figures, desc: background} + caption: This panel shows a mosaic enhancing the background around the head. + Artifacts usually unveil themselves in the air surrounding the head, where no signal + sources are present. + subtitle: View of the background of the voxel-wise average of the BOLD timeseries + - bids: {datatype: figures, desc: zoomed} + caption: This panel shows a mosaic of the brain. This mosaic is the most suitable to + screen head-motion intensity inhomogeneities, global/local noise, signal leakage + (for example, from the eyeballs and across the phase-encoding axis), etc. + subtitle: Voxel-wise average of BOLD time-series, zoomed-in covering just the brain - bids: {datatype: figures, desc: carpet} subtitle: Carpetplot and nuisance signals caption: The so-called «carpetplot» may assist in assessing head-motion derived artifacts and respiation effects. + +- name: Extended echo-wise reports + ordering: echo + reportlets: + - bids: {datatype: figures, desc: mean} + subtitle: Voxel-wise average of BOLD time-series + caption: The average signal calculated across the last axis (time). + - name: Extended reports shared across echos reportlets: - bids: {datatype: figures, desc: brainmask} @@ -54,23 +72,6 @@ sections: subtitle: Spatial normalization of the anatomical image static: false -- name: Extended echo-wise reports - ordering: echo - reportlets: - - bids: {datatype: figures, desc: background} - caption: This panel shows a mosaic enhancing the background around the head. - Artifacts usually unveil themselves in the air surrounding the head, where no signal - sources are present. - subtitle: View of the background of the voxel-wise average of the BOLD timeseries - - bids: {datatype: figures, desc: mean} - subtitle: Average signal through time - caption: The average signal calculated across the last axis (time). - - bids: {datatype: figures, desc: zoomed} - caption: This panel shows a mosaic of the brain. This mosaic is the most suitable to - screen head-motion intensity inhomogeneities, global/local noise, signal leakage - (for example, from the eyeballs and across the phase-encoding axis), etc. - subtitle: Voxel-wise average of BOLD time-series, zoomed-in covering just the brain - - name: About nested: true reportlets: diff --git a/mriqc/workflows/functional/output.py b/mriqc/workflows/functional/output.py index 501e77a1b..72a1d2328 100644 --- a/mriqc/workflows/functional/output.py +++ b/mriqc/workflows/functional/output.py @@ -151,12 +151,35 @@ def init_func_report_wf(name="func_report_wf"): iterfield=["in_file"], ) + mosaic_zoom = pe.MapNode( + PlotMosaic( + cmap="Greys_r", + ), + name="PlotMosaicZoomed", + iterfield=["in_file"], + ) + + mosaic_noise = pe.MapNode( + PlotMosaic( + only_noise=True, + cmap="viridis_r", + ), + name="PlotMosaicNoise", + iterfield=["in_file"], + ) + + if config.workflow.species.lower() in ("rat", "mouse"): + mosaic_mean.inputs.view = ["coronal", "axial"] + mosaic_stddev.inputs.view = ["coronal", "axial"] + mosaic_zoom.inputs.view = ["coronal", "axial"] + mosaic_noise.inputs.view = ["coronal", "axial"] + ds_report_mean = pe.MapNode( DerivativesDataSink( base_directory=reportlets_dir, desc="mean", datatype="figures", - dismiss_entities=("part",) + dismiss_entities=("part",), ), name="ds_report_mean", run_without_submitting=True, @@ -168,19 +191,43 @@ def init_func_report_wf(name="func_report_wf"): base_directory=reportlets_dir, desc="stdev", datatype="figures", - dismiss_entities=("part",) + dismiss_entities=("part",), ), name="ds_report_stdev", run_without_submitting=True, iterfield=["in_file", "source_file"], ) + ds_report_background = pe.MapNode( + DerivativesDataSink( + base_directory=reportlets_dir, + desc="background", + datatype="figures", + dismiss_entities=("part",), + ), + name="ds_report_background", + run_without_submitting=True, + iterfield=["in_file", "source_file"], + ) + + ds_report_zoomed = pe.MapNode( + DerivativesDataSink( + base_directory=reportlets_dir, + desc="zoomed", + datatype="figures", + dismiss_entities=("part",), + ), + name="ds_report_zoomed", + run_without_submitting=True, + iterfield=["in_file", "source_file"], + ) + ds_report_carpet = pe.MapNode( DerivativesDataSink( base_directory=reportlets_dir, desc="carpet", datatype="figures", - dismiss_entities=("part",) + dismiss_entities=("part",), ), name="ds_report_carpet", run_without_submitting=True, @@ -194,9 +241,16 @@ def init_func_report_wf(name="func_report_wf"): (inputnode, mosaic_stddev, [("in_stddev", "in_file")]), (inputnode, ds_report_mean, [("name_source", "source_file")]), (inputnode, ds_report_stdev, [("name_source", "source_file")]), + (inputnode, ds_report_background, [("name_source", "source_file")]), + (inputnode, ds_report_zoomed, [("name_source", "source_file")]), (inputnode, ds_report_carpet, [("name_source", "source_file")]), + (inputnode, mosaic_zoom, [("epi_mean", "in_file"), + ("brainmask", "bbox_mask_file")]), + (inputnode, mosaic_noise, [("epi_mean", "in_file")]), (mosaic_mean, ds_report_mean, [("out_file", "in_file")]), (mosaic_stddev, ds_report_stdev, [("out_file", "in_file")]), + (mosaic_noise, ds_report_background, [("out_file", "in_file")]), + (mosaic_zoom, ds_report_zoomed, [("out_file", "in_file")]), (bigplot, ds_report_carpet, [("out_file", "in_file")]), ]) # fmt: on @@ -216,7 +270,7 @@ def init_func_report_wf(name="func_report_wf"): base_directory=reportlets_dir, desc="spikes", datatype="figures", - dismiss_entities=("part",) + dismiss_entities=("part",), ), name="ds_report_spikes", run_without_submitting=True, @@ -239,29 +293,6 @@ def init_func_report_wf(name="func_report_wf"): from niworkflows.utils.connections import pop_file as _pop from nireports.interfaces import PlotContours - mosaic_zoom = pe.MapNode( - PlotMosaic( - cmap="Greys_r", - ), - name="PlotMosaicZoomed", - iterfield=["in_file"], - ) - - mosaic_noise = pe.MapNode( - PlotMosaic( - only_noise=True, - cmap="viridis_r", - ), - name="PlotMosaicNoise", - iterfield=["in_file"] - ) - - if config.workflow.species.lower() in ("rat", "mouse"): - mosaic_mean.inputs.view = ["coronal", "axial"] - mosaic_stddev.inputs.view = ["coronal", "axial"] - mosaic_zoom.inputs.view = ["coronal", "axial"] - mosaic_noise.inputs.view = ["coronal", "axial"] - plot_bmask = pe.Node( PlotContours( display_mode="y" if config.workflow.species.lower() in ("rat", "mouse") else "z", @@ -273,30 +304,6 @@ def init_func_report_wf(name="func_report_wf"): name="PlotBrainmask", ) - ds_report_zoomed = pe.MapNode( - DerivativesDataSink( - base_directory=reportlets_dir, - desc="zoomed", - datatype="figures", - dismiss_entities=("part",) - ), - name="ds_report_zoomed", - run_without_submitting=True, - iterfield=["in_file", "source_file"], - ) - - ds_report_background = pe.MapNode( - DerivativesDataSink( - base_directory=reportlets_dir, - desc="background", - datatype="figures", - dismiss_entities=("part",) - ), - name="ds_report_background", - run_without_submitting=True, - iterfield=["in_file", "source_file"], - ) - ds_report_bmask = pe.Node( DerivativesDataSink( base_directory=reportlets_dir, @@ -325,14 +332,7 @@ def init_func_report_wf(name="func_report_wf"): ("name_source", "source_file")]), (inputnode, plot_bmask, [(("epi_mean", _pop), "in_file"), ("brainmask", "in_contours")]), - (inputnode, mosaic_zoom, [("epi_mean", "in_file"), - ("brainmask", "bbox_mask_file")]), - (inputnode, mosaic_noise, [("epi_mean", "in_file")]), - (inputnode, ds_report_zoomed, [("name_source", "source_file")]), - (inputnode, ds_report_background, [("name_source", "source_file")]), (inputnode, ds_report_bmask, [("name_source", "source_file")]), - (mosaic_zoom, ds_report_zoomed, [("out_file", "in_file")]), - (mosaic_noise, ds_report_background, [("out_file", "in_file")]), (plot_bmask, ds_report_bmask, [(("out_file", _pop), "in_file")]), ]) # fmt: on