STIR 6.4.0
stir::InputStreamWithRecordsFromUPENNbin Class Reference

Class for reading binary listmode files from the PENNPet Explorer scanner. More...

#include "stir/IO/InputStreamWithRecordsFromUPENNbin.h"

Inheritance diagram for stir::InputStreamWithRecordsFromUPENNbin:

Public Member Functions

virtual Succeeded create_output_file (const std::string ofilename)
 
virtual Succeeded set_up ()
 Must be called before calling for the first event.
 
virtual std::string method_info () const
 gives method information
 
virtual Succeeded get_next_record (CListRecordPENN &record)
 
virtual Succeeded reset ()
 go back to starting position
 
virtual SavedPosition save_get_position ()
 
virtual Succeeded set_get_position (const SavedPosition &)
 
std::streambuf & get_stream ()
 
const PET::ListFileHeader * get_file_header () const
 
virtual void set_current_record ()
 
virtual void set_new_record (const bool &d, const short int &_dt, const unsigned short int &_xa, const unsigned short int &_xb, const unsigned short int &_za, const unsigned short int &_zb, const unsigned short int &_ea, const unsigned short int &_eb)
 
- Public Member Functions inherited from stir::RegisteredParsingObject< InputStreamWithRecordsFromUPENNbin, InputStreamWithRecordsFromUPENN, InputStreamWithRecordsFromUPENN >
std::string get_registered_name () const override
 Returns Derived::registered_name.
 
std::string parameter_info () override
 Returns a string with all parameters and their values, in a form suitable for parsing again.
 
std::string get_registered_name () const override
 Returns Derived::registered_name.
 
std::string parameter_info () override
 Returns a string with all parameters and their values, in a form suitable for parsing again.
 
- Public Member Functions inherited from stir::InputStreamWithRecordsFromUPENN
unsigned long int get_total_number_of_events (CListRecordPENN &record)
 
std::vector< std::streampos > get_saved_get_positions () const
 
void set_saved_get_positions (const std::vector< std::streampos > &)
 
std::streambuf & get_stream ()
 
- Public Member Functions inherited from stir::ParsingObject
 ParsingObject (const ParsingObject &)
 
ParsingObjectoperator= (const ParsingObject &)
 
bool parse (std::istream &f)
 
bool parse (const char *const filename)
 
void ask_parameters ()
 

Static Public Attributes

static const char *const registered_name = "UPENN_binary_listmode"
 

Protected Member Functions

virtual void set_defaults ()
 Set defaults before parsing.
 
virtual void initialise_keymap ()
 Initialise all keywords.
 
virtual bool post_processing ()
 This will be called at the end of the parsing.
 
virtual void set_key_values ()
 This will be called before parsing or parameter_info is called.
 

Additional Inherited Members

- Public Types inherited from stir::InputStreamWithRecordsFromUPENN
typedef std::vector< longlongint >::size_type SavedPosition
 
- Static Public Member Functions inherited from stir::RegisteredParsingObject< InputStreamWithRecordsFromUPENNbin, InputStreamWithRecordsFromUPENN, InputStreamWithRecordsFromUPENN >
static InputStreamWithRecordsFromUPENNread_from_stream (std::istream *)
 Construct a new object (of type Derived) by parsing the istream.
 
static InputStreamWithRecordsFromUPENNread_from_stream (std::istream *)
 Construct a new object (of type Derived) by parsing the istream.
 
- Static Public Member Functions inherited from stir::RegisteredObject< InputStreamWithRecordsFromUPENN >
static InputStreamWithRecordsFromUPENNread_registered_object (std::istream *in, const std::string &registered_name)
 Construct a new object (of a type derived from Root, its actual type determined by the registered_name parameter) by parsing the istream.
 
static InputStreamWithRecordsFromUPENNask_type_and_parameters ()
 ask the user for the type, and then calls read_registered_object(0, type)
 
static void list_registered_names (std::ostream &stream)
 List all possible registered names to the stream.
 
- Protected Types inherited from stir::RegisteredObject< InputStreamWithRecordsFromUPENN >
typedef InputStreamWithRecordsFromUPENN *(* RootFactory) (std::istream *)
 The type of a root factory is a function, taking an istream* as argument, and returning a Root*.
 
typedef FactoryRegistry< std::string, RootFactory, interfile_lessRegistryType
 The type of the registry.
 
- Static Protected Member Functions inherited from stir::RegisteredObject< InputStreamWithRecordsFromUPENN >
static RegistryTyperegistry ()
 Static function returning the registry.
 
- Protected Attributes inherited from stir::InputStreamWithRecordsFromUPENN
std::string filename
 
std::streampos starting_stream_position
 
std::vector< std::streampos > saved_get_positions
 
const uint8_t * current_record
 
int eventSize = 0
 
int low_energy_window = 0
 
int up_energy_window = 1000
 
int timeout = 0
 
long unsigned int N
 Total number of events.
 
long unsigned int abrupt_counter
 Stop after a predefined number of records, regardless of their type.
 
bool has_output = false
 This is a flag about a low lever function that replicates a listmode file preserving control records that are skipped in normal operations.
 
bool abrupt_stop
 This is a lower counter to abruptly stop the listmode file.
 
int minE_chan
 Minimum energy channel.
 
int maxE_chan
 Maximum energy channel.
 
bool keep_prompt
 In some processes it might be better to filter prompts and delayeds early.
 
bool keep_delayed
 In some processes it might be better to filter prompts and delayeds early.
 
KeyParser parser
 

Detailed Description

Class for reading binary listmode files from the PENNPet Explorer scanner.

Member Function Documentation

◆ create_output_file()

Succeeded stir::InputStreamWithRecordsFromUPENNbin::create_output_file ( const std::string ofilename)
inlinevirtual

◆ set_up()

Succeeded stir::InputStreamWithRecordsFromUPENNbin::set_up ( )
virtual

Must be called before calling for the first event.

Reimplemented from stir::InputStreamWithRecordsFromUPENN.

References stir::error(), and set_up().

Referenced by set_up().

◆ get_next_record()

Succeeded stir::InputStreamWithRecordsFromUPENNbin::get_next_record ( CListRecordPENN & record)
virtual

◆ reset()

Succeeded stir::InputStreamWithRecordsFromUPENNbin::reset ( )
virtual

◆ save_get_position()

InputStreamWithRecordsFromUPENNbin::SavedPosition stir::InputStreamWithRecordsFromUPENNbin::save_get_position ( )
virtual

◆ set_get_position()

Succeeded stir::InputStreamWithRecordsFromUPENNbin::set_get_position ( const SavedPosition & )
virtual

◆ set_current_record()

void stir::InputStreamWithRecordsFromUPENNbin::set_current_record ( )
virtual

◆ set_new_record()

void stir::InputStreamWithRecordsFromUPENNbin::set_new_record ( const bool & d,
const short int & _dt,
const unsigned short int & _xa,
const unsigned short int & _xb,
const unsigned short int & _za,
const unsigned short int & _zb,
const unsigned short int & _ea,
const unsigned short int & _eb )
virtual

◆ set_defaults()

void stir::InputStreamWithRecordsFromUPENNbin::set_defaults ( )
protectedvirtual

Set defaults before parsing.

Reimplemented from stir::InputStreamWithRecordsFromUPENN.

References stir::InputStreamWithRecordsFromUPENN::set_defaults(), and set_defaults().

Referenced by set_defaults().

◆ initialise_keymap()

void stir::InputStreamWithRecordsFromUPENNbin::initialise_keymap ( )
protectedvirtual

◆ post_processing()

bool stir::InputStreamWithRecordsFromUPENNbin::post_processing ( )
protectedvirtual

This will be called at the end of the parsing.

Returns
false if everything OK, true if not

Reimplemented from stir::InputStreamWithRecordsFromUPENN.

References stir::InputStreamWithRecordsFromUPENN::post_processing(), and post_processing().

Referenced by post_processing().


The documentation for this class was generated from the following files: