Closed yinkaiming1987 closed 8 years ago
r = fslmaths(file = "data.img", outfile = "output.img", opts = "-odt short", opts_after_outfile = TRUE)
NB: if FSLOUTPUTTYPE=NIFTI;
, then the file will not have .img
on the end but rather .nii
. You need to change that using
options(fsl.outputtype = "NIFTI_PAIR")
if you want hdr/img pairs (I do not recommend this).
Also, you cannot currently perform an fslmaths
operation while invoking odt
and opts_after_outfile=TRUE
as the other options must be before the output for fslmaths
Dear John,
I was trying to run fslmaths input output -odt short in fslr R package, as below:
FSLDIR='/usr'; PATH=${FSLDIR}/bin:${PATH};export PATH FSLDIR; FSLOUTPUTTYPE=NIFTI; export FSLOUTPUTTYPE; ${FSLDIR}/bin/fsl5.0-fslmaths "/home/kaimingyin/Desktop/data.img" -odt short "/tmp/RtmpceSI2O/file2244322574e3";
Error in command line: unknown option "-odt"
It reports error as above, do you know how to fix it?
Also, should I run the ourput in one of the below ways like:
Thanks, Kaiming