NifTK
16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
|
Reads a fixed number S of type T from a file. More...
Public Member Functions | |
FixedLengthFileReader (const std::string &fileName, const bool &strict=true) | |
Constructor reads the data. More... | |
virtual | ~FixedLengthFileReader () |
std::vector< T > | GetData () const |
retrieves a copy of the data. More... | |
Reads a fixed number S of type T from a file.
This class provided to provide consistent file access for reading files of a common type. All errors are reported as niftk::IOException
niftk::FixedLengthFileReader< T, S >::FixedLengthFileReader | ( | const std::string & | fileName, |
const bool & | strict = true |
||
) |
Constructor reads the data.
fileName | path to file |
strict | if true the file must contain the exact number of values, if false, will read the first S values out of a potentially larger file. |
|
virtual |
std::vector<T> niftk::FixedLengthFileReader< T, S >::GetData | ( | ) | const |
retrieves a copy of the data.