70 #ifndef __gVirtualXRayConfig_h 87 #ifndef __SpectrumRecord_h 164 unsigned int aMergeChannelFlag = 1);
275 unsigned int aNumberOfBands);
290 void setFiltration(
const std::vector<std::pair<unsigned int, RATIONAL_NUMBER> >& aSetOfFilters);
291 void addFilter(
const std::string& aMaterial,
const double& aThickness);
292 void addFilter(
unsigned int aMaterial,
const double& aThickness);
293 const std::vector<std::pair<unsigned int, RATIONAL_NUMBER> >&
getFiltration()
const;
342 #endif // __XRayBeam_h void setPhotonCountingBands(RATIONAL_NUMBER aMinEnergy, RATIONAL_NUMBER aMaxEnergy, unsigned int aNumberOfBands)
RATIONAL_NUMBER getVoltage() const
void setTubeAngle(const RATIONAL_NUMBER &anAngle)
unsigned int getNumberOfPhotonCountingBands()
void normalise()
Normalise the number of photons so that the total incident energy is 1.0.
RATIONAL_NUMBER getNumberOfPhotons()
Accessor on the total number of photons per pixel when Poisson noise is enable.
std::vector< std::pair< unsigned int, RATIONAL_NUMBER > > m_filtration
RATIONAL_NUMBER m_number_of_photons_per_pixel
void createSpectrumFromVoltage()
XRayBeam is a class to handle the X-Ray beam. The beam spectrum is discretised into energy channels...
const std::vector< std::pair< unsigned int, RATIONAL_NUMBER > > & getFiltration() const
SpectrumRecord is a class to handle a record of the X-Ray beam, i.e. an energy bin (number of photons...
void setmAs(const RATIONAL_NUMBER &an_mAs)
Class to manage X-Ray beams. The beam spectrum is discretised into energy channels.
void setVoltage(const RATIONAL_NUMBER &aVoltage)
bool usingXpecgen() const
std::string getInterpretor() const
bool usePoissonNoise() const
Check if Poisson noise for the energy fluence is enable or disable.
bool addChannel(const RATIONAL_NUMBER &aNumberOfPhotons, const RATIONAL_NUMBER &anIncidentEnergy)
Add an energy channel to the beam.
void enablePoissonNoise()
Enable Poisson noise for the energy fluence.
RATIONAL_NUMBER m_voltage
void initialise(const char *aFileName, const RATIONAL_NUMBER &aUnit, unsigned int aMergeChannelFlag=1)
Initialise the X-ray beam specturm with a polychromatic spectrum.
void sort()
Sort the spectrum in ascending energy.
void addFilter(const std::string &aMaterial, const double &aThickness)
RATIONAL_NUMBER getmAs() const
RATIONAL_NUMBER m_bin_total_energy_lower_threshold
std::vector< RATIONAL_NUMBER > m_photon_count_bands
void setNumberOfPhotons(RATIONAL_NUMBER aNumberOfPhotons)
Set the total number of photons per pixel when Poisson noise is enable.
RATIONAL_NUMBER getTubeAngle() const
std::vector< SpectrumRecord > m_beam_spectrum
Set of photon bins.
float RATIONAL_NUMBER
Type of data used to store real numbers.
void clear()
Remove all the energy channels from the beam and all its parameters.
void clearSpectrumOnly()
Remove all the energy channels from the beam.
void disablePoissonNoise()
Disable Poisson noise for the energy fluence.
RATIONAL_NUMBER getTotalEnergy()
Accessor on a total energy of the beam.
const std::vector< RATIONAL_NUMBER > & getPhotonCountingBands()
void mergePhotonCountingBands()
XRayBeam()
Default constructor.
const SpectrumRecord & getEnergyChannel(unsigned int anID)
Accessor on a given energy bin.
void setFiltration(const std::vector< std::pair< unsigned int, RATIONAL_NUMBER > > &aSetOfFilters)
Class to manage a record of the X-Ray beam, i.e. an energy bin (number of photons, energy of the photons in the bin).
void activatePhotonCountingBand(unsigned int aBand)
unsigned int getEnergyChannelNumber()
Accessor on the number of bins in the spectrum.
void setBinTotalEnergyCutoff(const RATIONAL_NUMBER &aThreshold)
Set a threshold to discard energy bins with a tiny amount of energy.
bool m_need_to_update_tube_spectrum
RATIONAL_NUMBER m_tube_angle_in_degrees
std::vector< std::vector< SpectrumRecord > > m_beam_spectrum_for_photon_count_detector
Set of photon bins.