fsl.data.vest
This module contains a handful of functions for working with VEST files.
Returns |
|
Assumes that the given file is a VEST LUT file, and attempts to load it. |
|
Loads numeric data from a VEST file, returning it as a |
|
Generates VEST-formatted text for the given |
- fsl.data.vest.looksLikeVestLutFile(path)[source]
Returns
True
if the givenpath
looks like a VEST LUT file,False
otherwise.
- fsl.data.vest.loadVestLutFile(path, normalise=True)[source]
Assumes that the given file is a VEST LUT file, and attempts to load it.
Returns a
numpy.float32
array of shape(n, 3)
, wheren
is the number of colours in the file.If
normalise=True
(the default), the colour values are normalised to the range0-1
.
- fsl.data.vest.loadVestFile(path, ignoreHeader=True)[source]
Loads numeric data from a VEST file, returning it as a
numpy
array.- Parameters:
ignoreHeader – if
True
(the default), the matrix shape specified in the VEST header information is ignored, and the shape inferred from the data. Otherwise, if the number of rows/columns specified in the VEST header information does not match the matrix shape, aValueError
is raised.- Returns:
a
numpy
array containing the matrix data in the VEST file.