CTL
0.6.1
Computed Tomography Library
|
Specialized sub-class of AbstractDetector for detector systems with cylindrical arrangement of modules. More...
#include <cylindricaldetector.h>
Public Types | |
enum | { Type = 110 } |
![]() | |
enum | { Type = 100 } |
enum | SaturationModelType { Extinction, PhotonCount, Intensity, Undefined } |
typedef mat::Location | ModuleLocation |
![]() | |
enum | { Type = 0 } |
![]() | |
enum | { Type = -1, UserType = 65536 } |
Public Member Functions | |
int | type () const override |
QVector< ModuleLocation > | moduleLocations () const override |
Computes the locations, i.e. their relative position and orientation w.r.t. the center of the full detector, of all detector modules. More... | |
CylindricalDetector (const QSize &nbPixelPerModule, const QSizeF &pixelSize, uint nbDetectorModules, double angulationPerModule, double moduleSpacing, const QString &name=defaultName()) | |
SystemComponent * | clone () const override |
QString | info () const override |
void | fromVariant (const QVariant &variant) override |
QVariant | toVariant () const override |
double | angulationOfModule (uint module) const |
double | moduleSpacing () const |
double | coneAngle () const |
double | curvatureRadius () const |
double | fanAngle () const |
double | rowCoverage () const |
![]() | |
AbstractDetector (const QSize &nbPixelPerModule, const QSizeF &pixelSize, const QString &name) | |
void | setSaturationModel (AbstractDataModel *model, SaturationModelType type) |
void | setSaturationModel (std::unique_ptr< AbstractDataModel > model, SaturationModelType type) |
void | setSpectralResponseModel (AbstractDataModel *model) |
void | setSpectralResponseModel (std::unique_ptr< AbstractDataModel > model) |
uint | nbDetectorModules () const |
const QSize & | nbPixelPerModule () const |
const QSizeF & | pixelDimensions () const |
const QSizeF & | pixelSize () const |
ModuleLocation | moduleLocation (uint module) const |
const AbstractDataModel * | saturationModel () const |
const AbstractDataModel * | spectralResponseModel () const |
XYDataSeries | inputResponse (float from, float to, uint nbSamples) const |
XYDataSeries | spectralResponse (float from, float to, uint nbSamples) const |
SaturationModelType | saturationModelType () const |
double | skewAngle () const |
bool | hasSaturationModel () const |
bool | hasSpectralResponseModel () const |
QSizeF | moduleDimensions () const |
SingleViewData::Dimensions | viewDimensions () const |
std::unique_ptr< GenericDetector > | toGeneric () const |
![]() | |
int | type () const override |
SystemComponent (const QString &name=defaultName()) | |
virtual int | elementalType () const |
void | fromVariant (const QVariant &variant) override |
QVariant | toVariant () const override |
const QString & | name () const |
void | rename (QString name) |
![]() | |
virtual | ~SerializationInterface ()=default |
Static Public Member Functions | |
static CylindricalDetector | fromAngulationAndSpacing (const QSize &nbPixelPerModule, const QSizeF &pixelSize, uint nbDetectorModules, double angulationPerModule, double moduleSpacing, const QString &name=defaultName()) |
static CylindricalDetector | fromRadiusAndFanAngle (const QSize &nbPixelPerModule, const QSizeF &pixelSize, uint nbDetectorModules, double radius, double fanAngle, const QString &name=defaultName()) |
static QString | defaultName () |
![]() | |
static QString | defaultName () |
Protected Attributes | |
uint | _nbModules |
Number of individual (flat-panel) modules in the detector. | |
double | _angulationPerModule |
Angulation (in rad) between adjacent detector modules. | |
double | _moduleSpacing |
Gap between adjacent detector modules (zero if fitting tight). | |
![]() | |
QSize | _nbPixelPerModule |
Number of pixels in each detector module. | |
QSizeF | _pixelSize |
Size of individual pixels (in mm). | |
double | _skewAngle = 0.0 |
obliqueness angle (specifies non-orthogonality of pixels) | |
AbstractDataModelPtr | _spectralResponseModel |
Data model for spectral detector response. | |
AbstractDataModelPtr | _saturationModel |
Data model for saturation of measured values. | |
SaturationModelType | _saturationModelType = Undefined |
States whether saturation model refers to intensity or extinction values. | |
Private Member Functions | |
CylindricalDetector (const QString &name=defaultName()) | |
double | moduleWidth () const |
void | setAngulationFromFanAngle (uint nbModules, double fanAngle, double radius) |
void | setSpacingFromRadius (double radius) |
QVector< double > | moduleAngulations () const |
QVector< ModuleLocation > | moduleLocationsFlatApprox () const |
Computes the locations, i.e. their relative position and orientation w.r.t. the center of the full detector, of all detector modules based on a flat detector approximation. More... | |
Static Private Attributes | |
static constexpr auto | MIN_ANGUL = 1.0e-6 |
Friends | |
template<class > | |
struct | SerializationHelper::RegisterWithSerializationHelper |
Additional Inherited Members | |
![]() | |
AbstractDetector (const QString &name) | |
AbstractDetector (const AbstractDetector &)=default | |
AbstractDetector (AbstractDetector &&)=default | |
AbstractDetector & | operator= (const AbstractDetector &)=default |
AbstractDetector & | operator= (AbstractDetector &&)=default |
![]() | |
SerializationInterface ()=default | |
SerializationInterface (const SerializationInterface &)=default | |
SerializationInterface (SerializationInterface &&)=default | |
SerializationInterface & | operator= (const SerializationInterface &)=default |
SerializationInterface & | operator= (SerializationInterface &&)=default |
![]() | |
static QString | typeInfoString (const std::type_info &type) |
![]() | |
std::unique_ptr< AbstractDetector > | makeDetector (ConstructorArguments &&... arguments) |
![]() | |
std::unique_ptr< ComponentType > | makeComponent (ConstructorArguments &&... arguments) |
std::unique_ptr< SystemComponent > | makeComponentFromJson (const QJsonObject &object, bool fallbackToGenericType) |
Specialized sub-class of AbstractDetector for detector systems with cylindrical arrangement of modules.
This class implements a structure to describe cylindrical detector systems. The detector system consists of multiple flat panel modules that are organized in a linear fashion, i.e. the system can be described as one row of modules. In this geometry, all center points of the modules lay on a cylindrical surface. The geometry is specified by the angulation between adjacent modules and the (optional) spacing in between them.
CTL::CylindricalDetector::CylindricalDetector | ( | const QSize & | nbPixelPerModule, |
const QSizeF & | pixelSize, | ||
uint | nbDetectorModules, | ||
double | angulationPerModule, | ||
double | moduleSpacing, | ||
const QString & | name = defaultName() |
||
) |
Constructs a CylindricalDetector object that is composed of nbDetectorModules (flat-panel) detector modules, each of which with nbPixelPerModule pixels with physical dimensions pixelSize. The arrangement of the individual modules is constructed based on the angulationPerModule and moduleSpacing parameters.
|
private |
Constructs an empty (invalid) CylindricalDetector object.
To be used only in combination with deserialization by means of fromVariant().
double CTL::CylindricalDetector::angulationOfModule | ( | uint | module | ) | const |
Returns the angulation of module module (in radians) with respect to the center of the detector.
|
overridevirtual |
Constructs a copy of the object and returns a base class pointer to it.
Reimplemented from CTL::SystemComponent.
double CTL::CylindricalDetector::coneAngle | ( | ) | const |
Returns the cone angle of the detector.
The cone angle is computed under the assumption that a point source located at the distance of the curvature radius is used.
double CTL::CylindricalDetector::curvatureRadius | ( | ) | const |
Returns the curvature radius of the given detector arrangement.
This is computed as: \(r=d/\sqrt{2(1-\cos\alpha)}\) where \(r\) denotes the curvature radius and \(\alpha=\mathtt{\_angulationPerModule}\). The length \(d\) is computed as follows: \(d=\mathtt{\_moduleSpacing}+\mathtt{\_moduleWidth}\cdot\cos\left(\alpha/2\right)\).
Returns std::numeric_limits<double>::max() if the module angulation is zero (flat panel),
|
static |
Returns the default name for the component: "Cylindrical detector".
double CTL::CylindricalDetector::fanAngle | ( | ) | const |
Returns the total fan angle covered by the detector.
This contains the angle between all modules and the fan angle of one isolated module (two times half a module at the borders of the detector): \(\mathtt{fanAngle}=\left(\mathtt{nbModule}-1\right)\cdot\alpha+2\cdot\arctan(\mathtt{moduleWidth}/ (2\cdot\mathtt{radius})\)
|
static |
Factory method to construct a CylindricalDetector from the parameters angulationPerModule and moduleSpacing. This method simply calls the constructor.
|
static |
Factory method to construct a CylindricalDetector from the parameters radius and fanAngle instead of module spacing and angulation (as used in the constructor). Use this factory if you want to specify the detector system by its curvature radius and fan angle.
Module angulation and spacing are computed using setAngulationFromFanAngle() and setSpacingFromRadius(), respectively.
|
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::AbstractDetector.
|
overridevirtual |
Returns a formatted string with information about the object.
In addition to the information from the base classes (GenericDetector and GenericComponent), the info string contains the following details:
Reimplemented from CTL::AbstractDetector.
|
private |
Computes and returns a vector \(\vec{\varphi}\) with equidistributed angulation values.
For a given number of \(N\) modules (extracted using nbDetectorModules()) and an angulation \(\alpha\) between adjacent modules (angulationPerModule), this is yields: \( \vec{\varphi}=\begin{cases} \left(-(N-1)/2\cdot\alpha,-(N-2)/2\cdot\alpha,...,0,...,(N-2)/2\cdot\alpha,(N-1)/2\cdot\alpha \right) & N\,\textrm{odd}\\ \left(-(N-1)/2\cdot\alpha,-(N-2)/2\cdot\alpha,...,-1/2\cdot\alpha,1/2\cdot\alpha,...,(N-2)/2 \cdot\alpha,(N-1)/2\cdot\alpha\right) & N\,\textrm{even} \end{cases} \)
|
overridevirtual |
Computes the locations, i.e. their relative position and orientation w.r.t. the center of the full detector, of all detector modules.
Computation is based on the defining parameters radius
(extracted using curvatureRadius()) and _angulationPerModule
.
This will be delegated to the flat panel approximation if _angulationPerModule < MIN_ANGUL.
Implements CTL::AbstractDetector.
|
private |
Computes the locations, i.e. their relative position and orientation w.r.t. the center of the full detector, of all detector modules based on a flat detector approximation.
This will be used when the module angulation is smaller than MIN_ANGUL. In this approximation, all modules will be placed within one plane, with their centers aligned on the x-axis. The spacing between the modules will be the requested _moduleSpacing.
Note that other (informative) values of this instance, such as curvatureRadius() and angle coverages (fanAngle(), coneAngle()) will contain inconsistent information in this approximation case.
double CTL::CylindricalDetector::moduleSpacing | ( | ) | const |
Returns the spacing between individual modules in this instance. Spacing refers to the edge-to-edge distance between adjacent modules in x-direction.
|
private |
Returns the width (in mm) of an individual module. Computes as number of pixels times width of a pixel.
double CTL::CylindricalDetector::rowCoverage | ( | ) | const |
Returns the total coverage (in mm) by the rows of the detector. This is computed as number of rows times height of a module.
|
private |
Sets the module angulations based on the parameters nbModules, fanAngle, and radius.
To do so, the required angulation per module \(\alpha\) is computed as: \(\alpha=\left(\mathtt{fanAngle}-2\cdot\arctan(\mathtt{moduleWidth}/(2\cdot\mathtt{radius}) \right)/\left(\mathtt{nbModule}-1\right).\)
|
private |
Sets the module spacing based on the radius.
|
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::AbstractDetector.
|
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::AbstractDetector.