3 #ifndef __stir_IO_InterfileParametricDiscretisedDensityInputFileFormat_h__ 4 #define __stir_IO_InterfileParametricDiscretisedDensityInputFileFormat_h__ 39 const std::string get_name()
const override {
return "Interfile"; }
42 bool actual_can_read(
const FileSignature& signature, std::istream&)
const override 51 unique_ptr<data_type> ret;
54 error(
"failed to read an Interfile image from stream");
58 unique_ptr<data_type>
read_from_file(
const std::string& filename)
const override 63 error(
"failed to read an Interfile image from file \"%s\"", filename.c_str());
bool is_interfile_signature(const char *const signature)
Checks if the signature corresponds to the start of an interfile header.
Definition: interfile.cxx:75
A class to read/store the file signature.
Definition: FileSignature.h:34
This file declares various utility functions.
Declarations of functions which read/write Interfile data.
Declaration of stir::error()
const char * get_signature() const
get access to the signature
Definition: FileSignature.h:52
ParametricDiscretisedDensity< VoxelsOnCartesianGrid< KineticParameters< 2, float > > > * read_interfile_parametric_image(std::istream &input, const std::string &directory_for_data)
Read parametric image.
Definition: interfile.cxx:215
Definition of stir::is_null_ptr functions.
Declaration of class stir::ParametricDiscretisedDensity.
void error(const char *const s,...)
Print error with format string a la printf and throw exception.
Definition: error.cxx:42