STIR
6.2.0
|
Class for reading SAFIR coincidence listmode data. More...
#include "stir/IO/SAFIRCListmodeInputFileFormat.h"
Public Member Functions | |
const std::string | get_name () const override |
bool | can_read (const FileSignature &signature, std::istream &input) const override |
Checks in binary data file for correct signature. | |
bool | can_read (const FileSignature &signature, const std::string &filename) const override |
Checks in binary data file for correct signature (can be either "SAFIR CListModeData", "NeuroLF CListModeData" or "MUPET
CListModeData"). | |
std::unique_ptr< data_type > | read_from_file (std::istream &input) const override |
read data from a stream More... | |
std::unique_ptr< data_type > | read_from_file (const std::string &filename) const override |
read data from a filename More... | |
Public Member Functions inherited from stir::ParsingObject | |
ParsingObject (const ParsingObject &) | |
ParsingObject & | operator= (const ParsingObject &) |
void | ask_parameters () |
virtual std::string | parameter_info () |
bool | parse (std::istream &f) |
bool | parse (const char *const filename) |
Protected Types | |
typedef ParsingObject | base_type |
Protected Member Functions | |
bool | actual_can_read (const FileSignature &signature, std::istream &input) const override |
void | initialise_keymap () override |
Initialise all keywords. | |
void | set_defaults () override |
Set defaults before parsing. | |
bool | actual_do_parsing (const std::string &filename) const |
bool | post_processing () override |
This will be called at the end of the parsing. More... | |
Protected Member Functions inherited from stir::ParsingObject | |
virtual void | set_key_values () |
This will be called before parsing or parameter_info is called. More... | |
Protected Attributes | |
std::string | listmode_filename |
std::string | crystal_map_filename |
std::string | template_proj_data_filename |
double | lor_randomization_sigma |
Protected Attributes inherited from stir::ParsingObject | |
KeyParser | parser |
Additional Inherited Members | |
Public Types inherited from stir::InputFileFormat< ListModeData > | |
typedef ListModeData | data_type |
Class for reading SAFIR coincidence listmode data.
It reads a parameter file, which refers to
If the map is not defined, the scanner detectors will be used. Otherwise, the nearest LOR of the scanner will be selected for each event.
An example of such a parameter file would be
The first 32 bytes of the binary file are interpreted as file signature and matched against the strings "MUPET CListModeData\0", "SAFIR CListModeData\0" and "NeuroLF CListModeData\0". If either is successfull, the class claims it can read the file format. The rest of the file is read as records as specified as template parameter, e.g. CListRecordSAFIR.
|
inlineoverridevirtual |
read data from a stream
This function should throw an exception if the read fails.
Implements stir::InputFileFormat< ListModeData >.
References stir::error().
|
inlineoverridevirtual |
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 from stir::InputFileFormat< ListModeData >.
References stir::info().
|
inlineoverrideprotectedvirtual |
This will be called at the end of the parsing.
Reimplemented from stir::ParsingObject.