CTL
0.6.1
Computed Tomography Library
|
The XrayLaserSpectrumModel class is a data model to represent monoenergetic X-ray spectra. More...
#include <xrayspectrummodels.h>
Public Types | |
enum | { Type = 40 } |
![]() | |
enum | { Type = 0 } |
![]() | |
enum | { Type = -1, UserType = 65536 } |
Public Member Functions | |
int | type () const override |
float | valueAt (float position) const override |
Returns the value sampled from the model at the given position. More... | |
float | binIntegral (float position, float binWidth) const override |
Returns the integral over model values in the interval [position - 0.5 * binWidth, position + 0.5 * binWidth]. More... | |
XrayLaserSpectrumModel * | clone () const override |
XrayLaserSpectrumModel () | |
Constructs an XrayLaserSpectrumModel. | |
XrayLaserSpectrumModel (float energy) | |
Constructs an XrayLaserSpectrumModel and sets its energy parameter to energy. | |
![]() | |
void | setParameter (const QVariant ¶meter) override |
Sets the energy parameter to parameter. More... | |
QVariant | parameter () const override |
![]() | |
float | meanValue (float position, float binWidth) const |
![]() | |
void | fromVariant (const QVariant &variant) override |
QVariant | toVariant () const override |
bool | isIntegrable () const |
void | setName (const QString &name) |
const QString & | name () const |
![]() | |
virtual | ~SerializationInterface ()=default |
Friends | |
template<class > | |
struct | SerializationHelper::RegisterWithSerializationHelper |
Additional Inherited Members | |
![]() | |
AbstractIntegrableDataModel (const AbstractIntegrableDataModel &)=default | |
AbstractIntegrableDataModel (AbstractIntegrableDataModel &&)=default | |
AbstractIntegrableDataModel & | operator= (const AbstractIntegrableDataModel &)=default |
AbstractIntegrableDataModel & | operator= (AbstractIntegrableDataModel &&)=default |
![]() | |
AbstractDataModel (const AbstractDataModel &)=default | |
AbstractDataModel (AbstractDataModel &&)=default | |
AbstractDataModel & | operator= (const AbstractDataModel &)=default |
AbstractDataModel & | operator= (AbstractDataModel &&)=default |
![]() | |
SerializationInterface ()=default | |
SerializationInterface (const SerializationInterface &)=default | |
SerializationInterface (SerializationInterface &&)=default | |
SerializationInterface & | operator= (const SerializationInterface &)=default |
SerializationInterface & | operator= (SerializationInterface &&)=default |
![]() | |
float | _energy = 0.0f |
Control parameter of device setting (usually tube voltage). | |
![]() | |
DataModelPtr | |
Template alias name for CopyableUniquePtr<ModelType> to a suitable ModelType. | |
AbstractDataModelPtr | |
Alias name for DataModelPtr<AbstractDataModel>. More... | |
std::unique_ptr< ModelType > | makeDataModel (ConstructorArguments &&... arguments) |
using DataModelPtr | CopyableUniquePtr |
Alias name for CopyableUniquePtr<ModelType> to a suitable ModelType. | |
The XrayLaserSpectrumModel class is a data model to represent monoenergetic X-ray spectra.
This data model provides a simple means to represent a pure monoenergetic spectrum, i.e. with a contribution only at one single well-defined photon energy.
To enable this particular behavior, it implements AbstractXraySpectrumModel in a way that its binIntegral() method returns 1.0 only if the bin contains the current energy parameter of this instance. All other bin integrals are always zero. In theory, valueAt() should represent a Dirac delta distrubution here; however, for simplicity it returns 1.0 at the position that is identical to the current energy parameter and zero elsewhere.
This spectrum model is used by the XrayLaser component class.
Example:
|
overridevirtual |
Returns the integral over model values in the interval [position - 0.5 * binWidth, position + 0.5 * binWidth].
If the model output to input parameter \( x \) is given by \( f(x) \), this method computes and returns:
\( \begin{align*} \int_{position-\frac{binWidth}{2}}^{position+\frac{binWidth}{2}} f(x) \,dx \end{align*} \)
Implements CTL::AbstractIntegrableDataModel.
|
overridevirtual |
Creates a copy of this instance and returns a base class pointer to the new object.
Implements CTL::AbstractXraySpectrumModel.
|
inlineoverridevirtual |
Returns the type id of this instance.
Reimplemented from CTL::AbstractDataModel.
|
overridevirtual |
Returns the value sampled from the model at the given position.
In theory, valueAt() should represent a Dirac delta distrubution here; however, for simplicity it returns 1.0 at the position that is identical to the current energy parameter and zero elsewhere.
Example:
Implements CTL::AbstractDataModel.