Compute the bounding box of all tract coordinates in a file.
Source:R/dti_tracks_utils.R
dti.track.bbox.RdStreams through the tract file and returns the bounding box of all coordinates, without keeping the coordinates in memory. This is useful to determine the axis limits for plotting a large tractogram.
Arguments
- filepath
character string, path to the
TCKorTSFfile to read. Gzip-compressed files (i.e.,.tck.gz) are supported and the compression is detected from the file content, not the file name.- chunk_values
integer, the number of payload values to read per chunk. Advanced tuning parameter, see
read.dti.tck.
Value
numeric vector of length 6,
c(xmin, xmax, ymin, ymax, zmin, zmax), or NULL if the file
contains no coordinates. The coordinates are in the coordinate system used
by the file, see the note in read.dti.trk.