NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Public Member Functions | List of all members
niftk::FixedLengthFileReader< T, S > Class Template Reference

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...
 

Detailed Description

template<typename T, vcl_size_t S>
class niftk::FixedLengthFileReader< T, S >

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

Constructor & Destructor Documentation

template<typename T , vcl_size_t S>
niftk::FixedLengthFileReader< T, S >::FixedLengthFileReader ( const std::string fileName,
const bool &  strict = true 
)

Constructor reads the data.

Parameters
fileNamepath to file
strictif true the file must contain the exact number of values, if false, will read the first S values out of a potentially larger file.
template<typename T , vcl_size_t S>
virtual niftk::FixedLengthFileReader< T, S >::~FixedLengthFileReader ( )
virtual

Member Function Documentation

template<typename T , vcl_size_t S>
std::vector<T> niftk::FixedLengthFileReader< T, S >::GetData ( ) const

retrieves a copy of the data.


The documentation for this class was generated from the following file: