xcp_d.utils.ingestion module

Functions to support ingestion of non-BIDS preprocessing derivatives.

xcp_d.utils.ingestion.copy_file(src, dst)[source]

Copy a file from source to dest.

source and dest must be file-like objects, i.e. any object with a read or write method, like for example StringIO.

xcp_d.utils.ingestion.extract_mean_signal(mask, nifti, work_dir)[source]

Extract mean signal within mask from NIFTI.

xcp_d.utils.ingestion.plot_bbreg(fixed_image, moving_image, contour, out_file='report.svg')[source]

Plot bbref_fig_fmriprep results.

xcp_d.utils.ingestion.write_json(data, outfile)[source]

Write dictionary to JSON file.