STIR
6.2.0
|
Class used for storing time gate durations. More...
#include "stir/TimeGateDefinitions.h"
Public Member Functions | |
TimeGateDefinitions () | |
Default constructor: no time gates at all. | |
TimeGateDefinitions (const std::vector< unsigned int > &gate_num_vector, const std::vector< double > &duration_vector) | |
TimeGateDefinitions (const std::vector< std::pair< unsigned int, double >> &gate_sequence) | |
TimeGateDefinitions (const std::string &gdef_filename) | |
void | read_gdef_file (const std::string &gdef_filename) |
Read the gate definitions from a file. More... | |
unsigned int | get_num_gates () const |
Get number of gates. | |
unsigned int | get_num_time_gates () const |
Get number of gates. | |
get info for a gate | |
double | get_gate_duration (unsigned int num) const |
unsigned int | get_gate_num (unsigned int num) const |
Class used for storing time gate durations.
Times are supposed to be relative to the scan start time.
Currently this class can read gate info from an ECAT6, ECAT7 and a 'gate definition' file. See the documentation for the constructor.
Will probably be superseded by Study classes.
void stir::TimeGateDefinitions::read_gdef_file | ( | const std::string & | gdef_filename | ) |
Read the gate definitions from a file.
The filename can point to a simple ASCII text file. The format is a number of lines, each existing of 2 numbers
gate_num duration_in_secs
This duration is a double number.
This class in fact allows an extension of the above. Setting gate_num_of_this_duration to 0 allows skipping a time period of the corresponding duration_in_secs.
References stir::error(), and stir::warning().
Referenced by stir::GatedDiscretisedDensity::set_density_sptr().