This function calls fslroi
fslroi(
file,
xmin = 0,
xsize = -1,
ymin = 0,
ysize = -1,
zmin = 0,
zsize = -1,
tmin = NULL,
tsize = NULL,
outfile = NULL,
retimg = TRUE,
reorient = FALSE,
intern = FALSE,
verbose = TRUE,
...
)
fsl_roi(..., outfile = tempfile(fileext = ".nii.gz"), retimg = FALSE)
fslroi_time(file, tmin = NULL, tsize = NULL, ...)
(character) image to be manipulated
Minimum index for x-dimension
Size of ROI in x-dimension
Minimum index for y-dimension
Size of ROI in y-dimension
Minimum index for z-dimension
Size of ROI in z-dimension
Minimum index for t-dimension
Size of ROI in t-dimension
(character) resultant image name (optional)
(logical) return image of class nifti
(logical) If retimg, should file be reoriented when read in?
Passed to readnii
.
(logical) to be passed to system
(logical) print out command before running
additional arguments passed to readnii
.
If retimg
then object of class nifti. Otherwise,
Result from system command, depends if intern is TRUE
or
FALSE
.
Indexing (in both time and space) starts with 0 not 1! Inputting -1 for a size will set it to the full image extent for that dimension.