R/check_outfile.R
check_outfile.Rd
This function checks if an output filename is not NULL in conjunction whether the user would like to return an image
check_outfile(outfile, retimg, fileext = ".nii.gz")
output filename or NULL
Should an image be returned
a non-empty character vector giving the file extension
Filename of output file or a temporary filename