read.dti.trk.header: Read the header of a TrackVis TRK file.
Description
Reads and parses the 1000 byte header of a TRK file without
touching the track data. This is cheap even for huge tractograms and can be
used to inspect a file before deciding whether to read its tracks.
named list, the header. It contains all fields of the TRK header as
described at http://trackvis.org/docs/?subsect=fileformat, plus
vox2ras (the matrix stored in the file) and, if
shift_origin is TRUE, vox2ras_corrected.
Arguments
filepath
character string, path to a file in TRK format. Gzip-compressed
files (typically named .trk.gz) are supported, the compression is
detected from the file content, not from the file name.
shift_origin
logical, whether to compute the corrected vox2ras
matrix, see read.dti.trk.