qx_utilities.bash.extract_roi(roifile, inputfile, outpath, outname)#


This function calls img_roi_extract.m and extracts data from an input file for every ROI in a given template file. The function needs a matching file type for the ROI input and the data input (i.e. both NIFTI or CIFTI). It assumes that the template ROI file indicates each ROI in a single volume via unique scalar values.


--roifile (str):

Path ROI file (either a NIFTI or a CIFTI with distinct scalar values per ROI).

--inputfile (str):

Path to input file to be read that is of the same type as --roifile (i.e. CIFTI or NIFTI).

--outpath (str):

New or existing directory to save outputs in.

--outname (str):

Output file base-name (to be appended with 'ROIn').

Output files


Matrix with one ROI per row and one column per frame in singleinputfile.


qunex roi_extract \
    --roifile='<path_to_roifile>' \
    --inputfile='<path_to_inputfile>' \
    --outdir='<path_to_outdir>' \