1 #ifndef __stir_IO_ECAT966ListmodeInputFileFormat_h__ 2 #define __stir_IO_ECAT966ListmodeInputFileFormat_h__ 27 #include <boost/format.hpp> 29 #ifndef HAVE_LLN_MATRIX 30 # error HAVE_LLN_MATRIX not define: you need the lln ecat library. 53 virtual const std::string get_name()
const {
return "ECAT966"; }
58 return this->actual_can_read(signature, input);
68 std::ifstream singles_file(singles_filename.c_str(), std::ios::binary);
69 char buffer[
sizeof(Main_header)];
70 Main_header singles_main_header;
71 singles_file.read(buffer,
sizeof(singles_main_header));
74 unmap_main_header(buffer, &singles_main_header);
75 shared_ptr<Scanner> scanner_sptr;
77 if (scanner_sptr->get_type() == Scanner::E966)
87 warning(
"can_read for ECAT966 listmode data with istream not implemented %s:%d. Sorry", __FILE__, __LINE__);
102 error(
"read_from_file for ECAT966 listmode data with istream not implemented %s:%d. Sorry", __FILE__, __LINE__);
103 return unique_ptr<data_type>();
114 if (pos != std::string::npos && pos > 2 && filename.substr(pos - 2, 2) ==
"_1")
118 const std::string filename_prefix = filename.substr(0, pos);
119 info(boost::format(
"Reading ECAT listmode file with prefix %1%") % filename_prefix);
A class to read/store the file signature.
Definition: FileSignature.h:34
Declaration of class stir::CListModeDataECAT.
This file declares various utility functions.
Declaration of routines which convert CTI things into our building blocks and vice versa...
A class that reads the listmode data for ECAT scanners.
Definition: CListModeDataECAT.h:48
void info(const STRING &string, const int verbosity_level=1)
Use this function for writing informational messages.
Definition: info.h:51
Declaration of stir::error()
const char * get_signature() const
get access to the signature
Definition: FileSignature.h:52
void warning(const char *const s,...)
Print warning with format string a la printf.
Definition: warning.cxx:41
Declaration of stir::info()
string::size_type find_pos_of_extension(const string &file_in_directory_name)
find the position of the '.' of the extension
Definition: utilities.cxx:185
void error(const char *const s,...)
Print error with format string a la printf and throw exception.
Definition: error.cxx:42
void find_scanner(shared_ptr< Scanner > &scanner_ptr, const Main_header &mhead)
determine scanner type from the main_header
Definition: stir_ecat7.cxx:184
Classes for listmode events for the ECAT 966 (aka Exact 3d)