CTL
0.6.1
Computed Tomography Library
|
The XrayLaser class represents source components that emit monoenergetic radiation. More...
#include <xraylaser.h>
Public Types | |
enum | { Type = 310 } |
![]() | |
enum | { Type = 300 } |
![]() | |
enum | { Type = 0 } |
![]() | |
enum | { Type = -1, UserType = 65536 } |
Public Member Functions | |
int | type () const override |
EnergyRange | nominalEnergyRange () const override |
Returns the energy range [in keV] of the radiation emitted by this instance. More... | |
XrayLaser (const QString &name) | |
XrayLaser (double energy, double output, const QString &name=defaultName()) | |
XrayLaser (const QSizeF &focalSpotSize=QSizeF(0.0, 0.0), const Vector3x1 &focalSpotPosition=Vector3x1(0.0), double energy=100.0, double output=1.0, const QString &name=defaultName()) | |
SystemComponent * | clone () const override |
QString | info () const override |
IntervalDataSeries | spectrum (uint nbSamples) const override |
Returns the (relative) emitted radiation spectrum sampled with nbSamples bins covering the energy range of [energyRange().start(), energyRange().end()] keV. More... | |
uint | spectrumDiscretizationHint () const override |
void | fromVariant (const QVariant &variant) override |
QVariant | toVariant () const override |
double | photonEnergy () const |
double | radiationOutput () const |
void | setPhotonEnergy (double energy) |
void | setRadiationOutput (double output) |
![]() | |
virtual void | setSpectrumModel (AbstractXraySpectrumModel *model) |
EnergyRange | energyRange () const |
float | meanEnergy () const |
double | photonFlux () const |
double | fluxModifier () const |
const QSizeF & | focalSpotSize () const |
const Vector3x1 & | focalSpotPosition () const |
const AbstractXraySpectrumModel * | spectrumModel () const |
void | setFluxModifier (double modifier) |
void | setFocalSpotSize (const QSizeF &size) |
void | setFocalSpotSize (double width, double height) |
void | setFocalSpotPosition (const Vector3x1 &position) |
void | setFocalSpotPosition (double x, double y, double z) |
void | setEnergyRangeRestriction (const EnergyRange &window) |
IntervalDataSeries | spectrum (EnergyRange range, uint nbSamples) const |
bool | hasSpectrumModel () const |
void | setSpectrumModel (std::unique_ptr< AbstractXraySpectrumModel > model) |
std::unique_ptr< GenericSource > | toGeneric () const |
![]() | |
SystemComponent (const QString &name=defaultName()) | |
virtual int | elementalType () const |
const QString & | name () const |
void | rename (QString name) |
![]() | |
virtual | ~SerializationInterface ()=default |
Static Public Member Functions | |
static QString | defaultName () |
![]() | |
static QString | defaultName () |
Protected Attributes | |
double | _energy |
Energy of the emitted photons (in keV). | |
double | _output |
Total emission output (in mWs). | |
![]() | |
QSizeF | _focalSpotSize = QSizeF(0.0, 0.0) |
Size of the focal spot (in mm). | |
Vector3x1 | _focalSpotPosition = Vector3x1(0.0) |
Position of the focal spot (relative to source center). | |
double | _fluxModifier = 1.0 |
Global (multiplicative) modifier for the photon flux. | |
DataModelPtr< AbstractXraySpectrumModel > | _spectrumModel |
Data model for the emitted radiation spectrum. | |
EnergyRange | _restrictedEnergyWindow = { 0.0f, 0.0f } |
Windowed energy range. | |
bool | _hasRestrictedEnergyWindow = false |
Private Member Functions | |
virtual void | setSpectrumModel (AbstractXraySpectrumModel *model) |
void | setSpectrumModel (std::unique_ptr< AbstractXraySpectrumModel > model) |
Friends | |
template<class > | |
struct | SerializationHelper::RegisterWithSerializationHelper |
Additional Inherited Members | |
![]() | |
static const uint | DEFAULT_SPECTRUM_RESOLUTION_HINT = 10 |
![]() | |
static QString | typeInfoString (const std::type_info &type) |
![]() | |
EnergyRange | |
Alias name for CTL::Range<float>. More... | |
![]() | |
std::unique_ptr< ComponentType > | makeComponent (ConstructorArguments &&... arguments) |
std::unique_ptr< SystemComponent > | makeComponentFromJson (const QJsonObject &object, bool fallbackToGenericType) |
The XrayLaser class represents source components that emit monoenergetic radiation.
CTL::XrayLaser::XrayLaser | ( | const QString & | name | ) |
Constructs an XrayLaser named name.
The focal spot size defaults to QSizeF(0.0,0.0) and the focal spot position is set to Vector3x1(0.0f). Sets the photon energy to 100 keV and the total emitted output to 1.0 mWs.
CTL::XrayLaser::XrayLaser | ( | double | energy, |
double | output, | ||
const QString & | name = defaultName() |
||
) |
Constructs an XrayLaser that emits photons with an energy of energy and a total emitted output of output [in mWs]. Also sets the component's name to name.
The focal spot size defaults to QSizeF(0.0,0.0) and the focal spot position is set to Vector3x1(0.0f).
CTL::XrayLaser::XrayLaser | ( | const QSizeF & | focalSpotSize = QSizeF(0.0, 0.0) , |
const Vector3x1 & | focalSpotPosition = Vector3x1(0.0) , |
||
double | energy = 100.0 , |
||
double | output = 1.0 , |
||
const QString & | name = defaultName() |
||
) |
Constructs an XrayLaser with a focal spot size of focalSpotSize and its focal spot positioned at focalSpotPosition. Sets the energy of emitted photons to energy [in keV] and the total emitted output to output [in mWs]. Also sets the component's name to name.
|
overridevirtual |
Constructs a copy of the object and returns a base class pointer to it.
Reimplemented from CTL::SystemComponent.
|
static |
Returns the default name for the component: "X-ray laser".
|
overridevirtual |
Interface to read all member variables from the QVariant variant.
Reimplement this method such that it reads all newly introduced content when sub-classing. A typical reimplementation in sub-classes might look like this:
Reimplemented from CTL::AbstractSource.
|
overridevirtual |
Returns a formatted string with information about the object.
In addition to the information from the base class (SystemComponent), the info string contains the following details:
Reimplemented from CTL::AbstractSource.
|
overridevirtual |
Returns the energy range [in keV] of the radiation emitted by this instance.
This returns an very small interval centered around the photon energy. In particular it returns [(1.0 - 1.0e-6) * photonEnergy, (1.0 + 1.0e-6) * photonEnergy].
Implements CTL::AbstractSource.
|
overrideprotectedvirtual |
Returns the nominal photon flux (photons/cm² in 1m distance).
This is computed as the quotient between the total emitted output and the energy of an individual photon.
Implements CTL::AbstractSource.
double CTL::XrayLaser::photonEnergy | ( | ) | const |
Returns the energy of emitted photons (in keV).
double CTL::XrayLaser::radiationOutput | ( | ) | const |
Returns the total emission output (in mWs). This refers to all radiation that is emitted to an area of 1cm² in a distance of 1m from the source.
void CTL::XrayLaser::setPhotonEnergy | ( | double | energy | ) |
Sets the energy of emitted photons to energy (in keV).
void CTL::XrayLaser::setRadiationOutput | ( | double | output | ) |
Sets the total radiation output emitted to an area of 1cm² in a distance of 1m to output (in mWs).
|
inlineprivate |
Sets the spectrum model to model.
|
inlineprivate |
Sets the spectrum model to model.
This instance manages ownership of model as a std::shared_ptr.
|
overridevirtual |
Returns the (relative) emitted radiation spectrum sampled with nbSamples bins covering the energy range of [energyRange().start(), energyRange().end()] keV.
Each energy bin in the returned data series is defined to represent the integral over the contribution to the total number of emitted photons of all energies within that particular bin. The individual contributions are extracted from the spectrum model of this component (see XrayLaserSpectrumModel).
The returned spectrum contains relative photon flux, i.e. the sum over all bins equals to one. To get quantitative energy-dependent photon flux values, multiply this (relative) spectrum with the photon flux constant (see photonFlux()).
Note that the recommended number of samples is one (see spectrumDiscretizationHint()). When using nbSamples > 1, the resulting spectrum may include two bins with a value of 0.5 or only a single bin with 1.0, depending on the numerics of the bin segregation.
Reimplemented from CTL::AbstractSource.
|
overridevirtual |
Returns a hint for a reasonable number of sampling points when querying a spectrum of the component. This always returns 1, since a single energy bin is sufficient to represent monochromatic radiation.
Reimplemented from CTL::AbstractSource.
|
overridevirtual |
Interface to store all member variables in a QVariant.
Stores the object's type-id.
Reimplement this method such that it stores all newly introduced object data when sub-classing. This needs to cover everything that is necessary to fully determine the state of an object. Best practice is to invoke the base class version of this method to take care of all content originating from underlying base classes.
A typical reimplementation in sub-classes might look like this:
Reimplemented from CTL::AbstractSource.
|
inlineoverridevirtual |
Returns the type-id of the serializable object. Used in deserialization to determine the proper object type.
Add derived classes to the enumeration using the CTL_TYPE_ID macro.
Reimplemented from CTL::AbstractSource.