18 #ifndef __stir_GatedDiscretisedDensity_H__ 19 #define __stir_GatedDiscretisedDensity_H__ 51 _time_gate_definitions = time_gate_definitions;
61 _time_gate_definitions = time_gate_definitions;
63 for (
unsigned int gate_num = 0; gate_num < time_gate_definitions.
get_num_gates(); ++gate_num)
64 this->_densities[gate_num].reset(density_sptr->get_empty_discretised_density());
71 _densities.resize(gated_density.get_num_gates());
72 _time_gate_definitions=gated_density.get_time_gate_definitions();
73 for (
unsigned int gate_num=0; gate_num<time_gate_definitions.
get_num_gates(); ++gate_num)
74 this->_densities[gate_num] = (gated_density.get_densities[0])->get_empty_discretised_density();
92 _time_gate_definitions = time_gate_definitions;
100 const std::vector<shared_ptr<DiscretisedDensity<3, float>>>& get_densities()
const;
106 return this->get_density(gate_num);
113 return this->get_density(gate_num);
119 this->_time_gate_definitions = time_gate_definitions;
124 unsigned get_num_gates()
const 128 void fill_with_zero();
134 Succeeded write_to_files(
const std::string& filename)
const;
135 Succeeded write_to_files(
const std::string& filename,
const std::string& suffix)
const;
140 std::vector<shared_ptr<DiscretisedDensity<3, float>>> _densities;
145 #endif //__stir_GatedDiscretisedDensity_H__ GatedDiscretisedDensity(const TimeGateDefinitions &time_gate_definitions, const shared_ptr< DiscretisedDensity< 3, float >> &density_sptr)
Construct an empty GatedDiscretisedDensity based on a shared_ptr<DiscretisedDensity<3,float> >
Definition: GatedDiscretisedDensity.h:57
Declaration of class stir::TimeGateDefinitions.
unsigned int get_num_time_gates() const
Get number of gates.
Definition: TimeGateDefinitions.cxx:54
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast (or corresponding b...
defines the stir::DiscretisedDensity class
unique_ptr< DataT > read_from_file(const FileSignature &signature, FileT file)
Function that reads data from file using the default InputFileFormatRegistry, using the provided File...
Definition: read_from_file.h:46
unsigned int get_num_gates() const
Get number of gates.
Definition: TimeGateDefinitions.cxx:48
Class used for storing time gate durations.
Definition: TimeGateDefinitions.h:42
Class of multiple image gates.
Definition: GatedDiscretisedDensity.h:34
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43