3#ifndef __stir_IO_InterfileImageInputFileFormat_h__
4#define __stir_IO_InterfileImageInputFileFormat_h__
38 const std::string get_name()
const override {
return "Interfile"; }
41 bool actual_can_read(
const FileSignature& signature, std::istream& input)
const override
52 error(
"failed to read an Interfile image from stream");
56 unique_ptr<data_type>
read_from_file(
const std::string& filename)
const override
61 error(
"failed to read an Interfile image from file \"%s\"", filename.c_str());
defines the stir::DiscretisedDensity class
defines the stir::VoxelsOnCartesianGrid class
A class to read/store the file signature.
Definition FileSignature.h:35
const char * get_signature() const
get access to the signature
Definition FileSignature.h:52
Declaration of stir::error()
bool is_interfile_signature(const char *const signature)
Checks if the signature corresponds to the start of an interfile header.
Definition interfile.cxx:77
VoxelsOnCartesianGrid< float > * read_interfile_image(std::istream &input, const std::string &directory_for_data="")
This reads the first 3d image in an Interfile header file, given as a stream.
Definition interfile.cxx:126
void error(const char *const s,...)
Print error with format string a la printf and throw exception.
Definition error.cxx:42
Declarations of functions which read/write Interfile data.
Definition of stir::is_null_ptr functions.
This file declares various utility functions.