general_create_roi
general_create_roi#
- qx_mri.general.general_create_roi(targetf, roi, mask, options)#
general_create_roi(targetf, roi, mask, options)
Creates an image file with regions of interest masks(s) based on the provided ROI specification. This is a wrapper function that calls nimage.img_prep_roi method. Please refer to the documentation of the latter for more details.
- Parameters:
- -- targetf: (str)
Path to the target image file that should be created. The path can include the full file name including the extension. If the extension is not provided or does not match the file format, the function will create the appropriate extension. The default extension for volume images is '.nii.gz' and for cifti images '.dlabel.nii'.
- -- roi: (str or nimage object):
See nimage.img_prep_roi documentation for details.
- --mask (str, integer, or nimage object, default ''):
See nimage.img_prep_roi documentation for details.
- --options (str, default
'check:warning|volumes:|maps:|rois:|roinames:|standardize:no|threshold:'
): See nimage.img_prep_roi documentation for details.
Output:
- img
A nimage object with an roi structure array defining the ROI. See nimage.img_prep_roi documentation for details.