Parses and validates the header and returns everything needed to
read the payload. The caller is responsible for closing con.
# S3 method for mrtrix.payload
open(filepath, max_tracks = Inf)named list with entries con, header, offset,
dsize, endian, values_per_point, gzipped,
is_tck and expected_groups.
character string, path to the file.
numeric, the maximum number of tracks that will be read. Used to decide whether an up-front allocation check makes sense.