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
Trueif the givenpathlooks like a VEST LUT file,Falseotherwise.
-
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.float32array of shape(n, 3), wherenis 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
numpyarray.- 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, aValueErroris raised.- Returns
a
numpyarray containing the matrix data in the VEST file.