This function checks whether the output from dcm2nii runs correctly in that only one nifti file is returned if only one exists

check_dcm2nii(
  dcm2nii_output,
  include_json = TRUE,
  ignore_roi_if_multiple = FALSE
)

Arguments

dcm2nii_output

Output from dcm2nii command, must have nii_after element

include_json

Include JSON file if in the output?

ignore_roi_if_multiple

If multiple nifti files are found, ignore any that have the format if `ROI1.nii`, `ROI2.nii`, etc. See https://github.com/rordenlab/dcm2niix/issues/832

Value

Character vector of unique nifti filenames