CTL  0.6.1
Computed Tomography Library
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
CTL::FlatPanelDetector Class Reference

Specialized sub-class of AbstractDetector for flat panel detectors. More...

#include <flatpaneldetector.h>

Inheritance diagram for CTL::FlatPanelDetector:
Inheritance graph
[legend]
Collaboration diagram for CTL::FlatPanelDetector:
Collaboration graph
[legend]

Public Types

enum  { Type = 120 }
 
- Public Types inherited from CTL::AbstractDetector
enum  { Type = 100 }
 
enum  SaturationModelType { Extinction, PhotonCount, Intensity, Undefined }
 
typedef mat::Location ModuleLocation
 
- Public Types inherited from CTL::SystemComponent
enum  { Type = 0 }
 
- Public Types inherited from CTL::SerializationInterface
enum  { Type = -1, UserType = 65536 }
 

Public Member Functions

int type () const override
 
QVector< ModuleLocationmoduleLocations () const override
 
 FlatPanelDetector (const QSize &nbPixels, const QSizeF &pixelSize, const QString &name=defaultName())
 
SystemComponentclone () const override
 
QString info () const override
 
void fromVariant (const QVariant &variant) override
 
QVariant toVariant () const override
 
ModuleLocation location () const
 
const QSize & nbPixels () const
 
QSizeF panelDimensions () const
 
QSizeF panelSize () const
 
- Public Member Functions inherited from CTL::AbstractDetector
 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 AbstractDataModelsaturationModel () const
 
const AbstractDataModelspectralResponseModel () 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< GenericDetectortoGeneric () const
 
- Public Member Functions inherited from CTL::SystemComponent
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)
 
- Public Member Functions inherited from CTL::SerializationInterface
virtual ~SerializationInterface ()=default
 

Static Public Member Functions

static QString defaultName ()
 
- Static Public Member Functions inherited from CTL::SystemComponent
static QString defaultName ()
 

Friends

template<class >
struct SerializationHelper::RegisterWithSerializationHelper
 

Additional Inherited Members

- Protected Member Functions inherited from CTL::AbstractDetector
 AbstractDetector (const QString &name)
 
 AbstractDetector (const AbstractDetector &)=default
 
 AbstractDetector (AbstractDetector &&)=default
 
AbstractDetectoroperator= (const AbstractDetector &)=default
 
AbstractDetectoroperator= (AbstractDetector &&)=default
 
- Protected Member Functions inherited from CTL::SerializationInterface
 SerializationInterface ()=default
 
 SerializationInterface (const SerializationInterface &)=default
 
 SerializationInterface (SerializationInterface &&)=default
 
SerializationInterfaceoperator= (const SerializationInterface &)=default
 
SerializationInterfaceoperator= (SerializationInterface &&)=default
 
- Static Protected Member Functions inherited from CTL::SystemComponent
static QString typeInfoString (const std::type_info &type)
 
- Protected Attributes inherited from CTL::AbstractDetector
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.
 

Detailed Description

Specialized sub-class of AbstractDetector for flat panel detectors.

Contrary to the AbstractDetector class, this class is intended to hold only a single detector module.

Constructor & Destructor Documentation

◆ FlatPanelDetector()

CTL::FlatPanelDetector::FlatPanelDetector ( const QSize &  nbPixels,
const QSizeF &  pixelSize,
const QString &  name = defaultName() 
)

Constructs a FlatPanelDetector with nbPixels pixels which have a dimension specified by pixelSize.

See also
GenericDetector::GenericDetector().

Member Function Documentation

◆ clone()

SystemComponent * CTL::FlatPanelDetector::clone ( ) const
overridevirtual

Constructs a copy of the object and returns a base class pointer to it.

Reimplemented from CTL::SystemComponent.

◆ defaultName()

QString CTL::FlatPanelDetector::defaultName ( )
static

Returns the default name for the component: "Flat panel detector".

◆ fromVariant()

void CTL::FlatPanelDetector::fromVariant ( const QVariant &  variant)
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:

DirectBaseClass::fromVariant(variant);
// assuming our class has a member "double _myMemberVariable"
_myMemberVariable = variant.toMap().value("my member variable").toDouble();

Reimplemented from CTL::AbstractDetector.

◆ info()

QString CTL::FlatPanelDetector::info ( ) const
overridevirtual

Returns a formatted string with information about the object.

Reimplemented from CTL::AbstractDetector.

◆ location()

AbstractDetector::ModuleLocation CTL::FlatPanelDetector::location ( ) const

Returns the location of the detector module.

Convenience method: same as moduleLocations().first().

◆ moduleLocations()

QVector< AbstractDetector::ModuleLocation > CTL::FlatPanelDetector::moduleLocations ( ) const
overridevirtual

Returns the location (i.e. position and rotation) of all individual detector modules with respect to the (physical) center of the detector. These locations are considered in addition to the global positioning of the detector (managed by AbstractGantry).

Implement this method in derived classes to compute the locations of individual modules based on the specific parametrization of that particular sub-class.

Implements CTL::AbstractDetector.

◆ nbPixels()

const QSize & CTL::FlatPanelDetector::nbPixels ( ) const

Returns the number of pixels in the detector module.

Convenience method: same as nbPixelPerModule().

◆ panelDimensions()

QSizeF CTL::FlatPanelDetector::panelDimensions ( ) const

This function has been deprecated. Use panelSize() instead.

◆ panelSize()

QSizeF CTL::FlatPanelDetector::panelSize ( ) const

Returns the physical dimensions of the flat panel module (i.e. [width, height] in mm).

◆ toVariant()

QVariant CTL::FlatPanelDetector::toVariant ( ) const
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:

QVariantMap ret = DirectBaseClass::toVariant().toMap();
ret.insert("my member variable", _myMemberVariable);
return ret;

Reimplemented from CTL::AbstractDetector.

◆ type()

int CTL::FlatPanelDetector::type ( ) const
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.


The documentation for this class was generated from the following files: