CTL
0.6.1
Computed Tomography Library
|
The DetectorSaturationExtension class is an extension for forward projectors that considers over- and/or undersaturation effects of the detector. More...
#include <detectorsaturationextension.h>
Public Types | |
enum | { Type = 102 } |
![]() | |
enum | { Type = 100 } |
![]() | |
enum | { Type = 0 } |
![]() | |
enum | { Type = -1, UserType = 65536 } |
Public Member Functions | |
int | type () const override |
void | configure (const AcquisitionSetup &setup) override |
Configures the projector. More... | |
DetectorSaturationExtension (uint nbSpectralSamples) | |
bool | isLinear () const override |
void | setIntensitySampling (uint nbSamples) |
QVariant | toVariant () const override |
Stores the contents of this instance in a QVariant. More... | |
QVariant | parameter () const override |
void | setParameter (const QVariant ¶meter) override |
Sets the parameters of this instance based on the passed QVariant parameter. Parameters need to follow the naming convention as described in parameter(). More... | |
ProjectorExtension (AbstractProjector *projector=nullptr) | |
ProjectorExtension (std::unique_ptr< AbstractProjector > projector) | |
![]() | |
int | type () const override |
void | configure (const AcquisitionSetup &setup) override |
ProjectionData | project (const VolumeData &volume) override |
ProjectorExtension (AbstractProjector *projector=nullptr) | |
ProjectorExtension (std::unique_ptr< AbstractProjector > projector) | |
ProjectionData | projectComposite (const CompositeVolume &volume) override |
Provides the functionality to forward project CompositeVolume data. More... | |
ProjectionData | projectSparse (const SparseVoxelVolume &volume) override |
Provides the functionality to forward project SparseVoxelVolume data. More... | |
bool | isLinear () const override |
Returns true if the projection operation is linear. More... | |
virtual void | use (AbstractProjector *other) |
void | use (std::unique_ptr< AbstractProjector > other) |
void | fromVariant (const QVariant &variant) override |
Sets the contents of the object based on the QVariant variant. More... | |
QVariant | toVariant () const override |
Stores the contents of this instance in a QVariant. More... | |
AbstractProjector * | release () |
void | reset () |
![]() | |
AbstractProjector (const AbstractProjector &)=delete | |
AbstractProjector (AbstractProjector &&)=default | |
AbstractProjector & | operator= (const AbstractProjector &)=delete |
AbstractProjector & | operator= (AbstractProjector &&)=default |
~AbstractProjector () override=default | |
ProjectionData | configureAndProject (const AcquisitionSetup &setup, const VolumeData &volume) |
Performs a forward projection with a precedent configuration of the projector. More... | |
ProjectionData | configureAndProject (const AcquisitionSetup &setup, const CompositeVolume &volume) |
Performs a forward projection with a precedent configuration of the projector. More... | |
ProjectionData | configureAndProject (const AcquisitionSetup &setup, const SparseVoxelVolume &volume) |
Performs a forward projection with a precedent configuration of the projector. More... | |
virtual ProjectorNotifier * | notifier () |
Returns a pointer to the notifier of the projector. More... | |
void | connectNotifierToMessageHandler (bool includeProgress=false) |
Connects the notifier to the CTL's MessageHandler. More... | |
![]() | |
virtual | ~SerializationInterface ()=default |
Protected Member Functions | |
ProjectionData | extendedProject (const MetaProjector &nestedProjector) override |
![]() | |
SerializationInterface ()=default | |
SerializationInterface (const SerializationInterface &)=default | |
SerializationInterface (SerializationInterface &&)=default | |
SerializationInterface & | operator= (const SerializationInterface &)=default |
SerializationInterface & | operator= (SerializationInterface &&)=default |
Private Member Functions | |
void | processCounts (ProjectionData &projections) |
void | processExtinctions (ProjectionData &projections) |
void | processIntensities (ProjectionData &projections) |
Private Attributes | |
AcquisitionSetup | _setup |
A copy of the acquisition setup. | |
uint | _nbSamples { 0u } |
Number of samples used to extract spectrally resolved information. | |
Friends | |
template<class > | |
struct | SerializationHelper::RegisterWithSerializationHelper |
Additional Inherited Members | |
![]() | |
std::unique_ptr< ProjectorExtensionType > | makeExtension (AbstractProjector *projector=nullptr) |
std::unique_ptr< ProjectorExtensionType > | makeExtension (std::unique_ptr< AbstractProjector > projector) |
![]() | |
VolumeData | |
Alias name for CTL::SpectralVolumeData. More... | |
std::unique_ptr< ProjectorType > | makeProjector (ConstructorArguments &&... arguments) |
The DetectorSaturationExtension class is an extension for forward projectors that considers over- and/or undersaturation effects of the detector.
This extension performs a postprocessing on the projection data to consider over- and/or undersaturation effects of the detector. It will use the saturation model set to the detector component (see AbstractDetector::setSaturationModel()). Depending on the specification of the saturation model, the postprocessing will be applied in the domain of extinction values, intensities, or photon counts.
The following example shows how to extend a simple ray caster algorithm to consider detector (over- and under-) saturation:
|
explicit |
Constructs a DetectorSaturationExtension and sets the number of samples used when (internally) a spectrum needs to be sampled to nbSpectralSamples.
|
overridevirtual |
Configures the projector.
This method should be used to gather all necessary information to prepare the actual forward projection. This usually contains all geometry and system information, which can be retrieved from setup.
If you intend to call configure() and project() (or projectComposite()) directly after each other, you should use configureAndProject() instead.
Implements CTL::AbstractProjector.
|
overrideprotectedvirtual |
Performs the extension of the projection step by means of postprocessing the projection data created by nestedProjector. This allows for handling the cases of single and composite volumes in the same fashion.
Reimplemented from CTL::ProjectorExtension.
|
overridevirtual |
Returns false, because in general, detector saturation effects are non-linear.
Reimplemented from CTL::AbstractProjector.
|
overridevirtual |
Returns the parameters of this instance as QVariant.
This returns a QVariantMap with one key-value-pair: ("Intensity sampling points", _nbSamples), which represents the number of sampling points used when (internally) a spectrum needs to be sampled.
This method is used within toVariant() to serialize the object's settings.
Reimplemented from CTL::AbstractProjector.
|
private |
Applies the detector saturation model to projections in the photon count domain. Transformation of input extinction data from projections to counts is based on the incident photon count queried from the system (see SimpleCTSystem::photonsPerPixel()).
|
private |
Applies the detector saturation model to projections in the extinction domain.
|
private |
Applies the detector saturation model to projections in the intensity domain. Transformation of input extinction data from projections to intensities is based on the incident photon count queried from the system (see SimpleCTSystem::photonsPerPixel()) multiplied by the mean energy in the incident X-ray spectrum. Note that this is an approximation. Ideally, the final radiation spectrum reaching the detector would be considered instead.
|
explicit |
Constructs a ProjectorExtension object and sets the nested projector to projector. A good practice to create a ProjectorExtension on the heap is to use the make function makeExtension(std::unique_ptr<AbstractProjector> projector) which will interally use this constructor.
|
explicit |
Constructs a ProjectorExtension object and sets the nested projector to projector. The nested projector is internally used as a basis for computing forward projections. Note that the constructed object takes over the ownership of projector.
void CTL::DetectorSaturationExtension::setIntensitySampling | ( | uint | nbSamples | ) |
Sets the number of samples used when (internally) a spectrum needs to be sampled to nbSpectralSamples. This has no meaning if the saturation model set for the detector is specified in the extinction domain (because processing extinctions does not require computation of a spectrum at any point).
If nbSamples = 0, the sampling hint from the source component will be used (see AbstractSource::spectrumDiscretizationHint().
|
overridevirtual |
Sets the parameters of this instance based on the passed QVariant parameter. Parameters need to follow the naming convention as described in parameter().
This method is used within fromVariant() to deserialize the object's settings. Direct use of this method is discouraged; consider using dedicated setter methods instead.
Reimplemented from CTL::AbstractProjector.
|
overridevirtual |
Stores the contents of this instance in a QVariant.
Implementation of the serialization interface. Stores the object's type-id (from SerializationInterface::toVariant()).
This method uses parameter() to serialize class members.
Reimplemented from CTL::AbstractProjector.
|
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::AbstractProjector.