extract_roi
extract_roi#
- qx_utilities.bash.extract_roi(roifile, inputfile, outpath, outname)#
extract_roi
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.
Parameters
- --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
- <output_name>.csv
Matrix with one ROI per row and one column per frame in singleinputfile.
Examples
qunex roi_extract \ --roifile='<path_to_roifile>' \ --inputfile='<path_to_inputfile>' \ --outdir='<path_to_outdir>' \ --outname='<output_name>'