STIR
6.2.0
|
Base-class for file-formats for reading. More...
#include "stir/IO/InputFileFormat.h"
Public Types | |
typedef DataT | data_type |
Public Member Functions | |
virtual bool | can_read (const FileSignature &signature, std::istream &input) const |
virtual bool | can_read (const FileSignature &signature, const std::string &filename) const |
virtual unique_ptr< DataT > | read_from_file (std::istream &input) const =0 |
read data from a stream More... | |
virtual unique_ptr< DataT > | read_from_file (const std::string &filename) const |
read data from a filename More... | |
virtual const std::string | get_name () const =0 |
Protected Member Functions | |
virtual bool | actual_can_read (const FileSignature &signature, std::istream &input) const =0 |
Base-class for file-formats for reading.
Preliminary
should be able to open for input-output maybe
there is overlap between function having filenames or istreams. This is a bit of a mess. Also, some file formats we might only have an API for using C-style FILE.
|
pure virtual |
read data from a stream
This function should throw an exception if the read fails.
Implemented in stir::SAFIRCListmodeInputFileFormat< EventDataType >, stir::ecat::ecat7::ECAT966ListmodeInputFileFormat, stir::ecat::ecat7::ECAT962ListmodeInputFileFormat, stir::ITKImageInputFileFormat< STIRImageType >, stir::ecat::ecat7::ECAT7ImageInputFileFormat, stir::MultiParametricDiscretisedDensityInputFileFormat, stir::MultiDynamicDiscretisedDensityInputFileFormat, stir::ecat::ECAT8_32bitListmodeInputFileFormat, stir::ecat::ecat7::ECAT7DynamicDiscretisedDensityInputFileFormat, stir::ecat::ecat6::ECAT6ImageInputFileFormat, stir::GE::RDF_HDF5::GEHDF5ListmodeInputFileFormat, stir::ROOTListmodeInputFileFormat, stir::InterfileDynamicDiscretisedDensityInputFileFormat, stir::InterfileParametricDiscretisedDensityInputFileFormat, stir::InterfileImageInputFileFormat, and stir::PENNListmodeInputFileFormat.
Referenced by stir::read_from_file().
|
inlinevirtual |
read data from a filename
This function should throw an exception if the read fails.
Default implementation used open_read_binary
and read_from_file(std::istream&)
.
Reimplemented in stir::SAFIRCListmodeInputFileFormat< EventDataType >, stir::ecat::ecat7::ECAT966ListmodeInputFileFormat, stir::ecat::ecat7::ECAT962ListmodeInputFileFormat, stir::MultiParametricDiscretisedDensityInputFileFormat, stir::MultiDynamicDiscretisedDensityInputFileFormat, stir::ecat::ecat7::ECAT7ImageInputFileFormat, stir::ITKImageInputFileFormat< STIRImageType >, stir::ecat::ECAT8_32bitListmodeInputFileFormat, stir::InterfileDynamicDiscretisedDensityInputFileFormat, stir::InterfileParametricDiscretisedDensityInputFileFormat, stir::ecat::ecat6::ECAT6ImageInputFileFormat, stir::InterfileImageInputFileFormat, stir::ROOTListmodeInputFileFormat, stir::ecat::ecat7::ECAT7DynamicDiscretisedDensityInputFileFormat, stir::PENNListmodeInputFileFormat, and stir::GE::RDF_HDF5::GEHDF5ListmodeInputFileFormat.