|
STIR 6.5.0
|
Reader for PETSIRD listmode data supporting variable geometry. More...
#include "stir/listmode/CListModeDataPETSIRD.h"
Public Member Functions | |
| CListModeDataPETSIRD (const std::string &listmode_filename, bool use_hdf5) | |
| Construct reader. | |
| virtual shared_ptr< CListRecord > | get_empty_record_sptr () const override |
| Get a pointer to an empty record. | |
| Succeeded | get_next_record (CListRecord &record_of_general_type) const override |
| Gets the next record in the listmode sequence. | |
| SavedPosition | save_get_position () override |
| Save the current reading position. | |
| void | reopen_and_prime () |
| Reopens the underlying reader and primes it at the first event block. | |
| Succeeded | seek_to_event_block_index (std::size_t target_event_block_index) const |
| Succeeded | set_get_position (const SavedPosition &pos) override |
| Set the position for reading to a previously saved point. | |
| virtual bool | has_delayeds () const override |
| Return if the file stores delayed events as well (as opposed to prompts). | |
| Succeeded | reset () override |
| Call this function if you want to re-start reading at the beginning. | |
| const std::vector< float > & | get_singles_per_bucket () const |
| double | get_singles_time_start () const |
| double | get_singles_time_stop () const |
Protected Member Functions | |
| virtual Succeeded | open_lm_file () const override |
Protected Attributes | |
| shared_ptr< petsird::PETSIRDReaderBase > | current_lm_data_ptr |
Reader for PETSIRD listmode data supporting variable geometry.
Infering the scanner geometry makes a lot of assumptions about what PET is. In particular, it assumes:
However, now I do the following:
If listmode reconstruction is done, the map is regenerated on-the-fly.
| stir::CListModeDataPETSIRD::CListModeDataPETSIRD | ( | const std::string & | listmode_filename, |
| bool | use_hdf5 ) |
Construct reader.
| listmode_filename | Path to PETSIRD listmode file. |
| use_hdf5 | If true, use HDF5 reader; otherwise use binary reader. |
References CListModeDataPETSIRD(), stir::ProjDataInfo::construct_proj_data_info(), stir::error(), and reset().
Referenced by CListModeDataPETSIRD().
|
overridevirtual |
Get a pointer to an empty record.
This is mainly/only useful to get a record of the correct type, that can then be passed to get_next_record().
Implements stir::CListModeData.
References stir::DataWithProjDataInfo::get_proj_data_info_sptr().
|
overridevirtual |
Gets the next record in the listmode sequence.
Implements stir::CListModeData.
References get_next_record().
Referenced by get_next_record().
|
overridevirtual |
Save the current reading position.
Note that the return value is not related to the number of events already read. In particular, you cannot do any arithmetic on it to skip a few events. This is different from e.g. std::streampos.
Implements stir::ListModeData.
| void stir::CListModeDataPETSIRD::reopen_and_prime | ( | ) |
Reopens the underlying reader and primes it at the first event block.
Calls error() (which throws) if the file cannot be opened, the header cannot be read, or no event time blocks are found in the file.
References stir::error().
Referenced by reset(), and set_get_position().
|
overridevirtual |
Set the position for reading to a previously saved point.
Implements stir::ListModeData.
References reopen_and_prime().
|
inlineoverridevirtual |
Return if the file stores delayed events as well (as opposed to prompts).
Implements stir::CListModeData.
|
overridevirtual |
Call this function if you want to re-start reading at the beginning.
Implements stir::ListModeData.
References reopen_and_prime().
Referenced by CListModeDataPETSIRD().