CTL
0.6.1
Computed Tomography Library
|
The SimpleCTSystem class is a specialized sub-class of CTSystem for simple systems (i.e. with a single gantry, detector and source). More...
#include <simplectsystem.h>
Public Member Functions | |
SimpleCTSystem (const AbstractDetector &detector, const AbstractGantry &gantry, const AbstractSource &source) | |
SimpleCTSystem (AbstractDetector &&detector, AbstractGantry &&gantry, AbstractSource &&source) | |
Q_DECL_DEPRECATED_X ("Function has been renamed. " "Please consider the new spelling 'fromCTSystem'.") static SimpleCTSystem fromCTsystem(const CTSystem &system | |
Q_DECL_DEPRECATED_X ("Function has been renamed. " "Please consider the new spelling 'fromCTSystem'.") static SimpleCTSystem fromCTsystem(CTSystem &&system | |
CTSystem * | clone () const &override |
CTSystem * | clone () &&override |
AbstractDetector * | detector () const |
AbstractGantry * | gantry () const |
AbstractSource * | source () const |
void | replaceDetector (AbstractDetector *newDetector) |
void | replaceDetector (std::unique_ptr< AbstractDetector > newDetector) |
void | replaceGantry (AbstractGantry *newGantry) |
void | replaceGantry (std::unique_ptr< AbstractGantry > newGantry) |
void | replaceSource (AbstractSource *newSource) |
void | replaceSource (std::unique_ptr< AbstractSource > newSource) |
void | addBeamModifier (AbstractBeamModifier *modifier) |
void | addBeamModifier (std::unique_ptr< AbstractBeamModifier > modifier) |
float | photonsPerPixelMean () const |
float | photonsPerPixel (uint module) const |
std::vector< float > | photonsPerPixel () const |
void | removeBeamModifiers () |
Removes all beam modifiers in this system. | |
![]() | |
CTSystem (QString name=defaultName()) | |
CTSystem (const CTSystem &other) | |
CTSystem (CTSystem &&other)=default | |
CTSystem & | operator= (CTSystem &&other)=default |
CTSystem & | operator= (const CTSystem &other) |
virtual | ~CTSystem () override=default |
virtual QString | info () const |
virtual QString | overview () const |
void | fromVariant (const QVariant &variant) override |
QVariant | toVariant () const override |
std::vector< AbstractDetector * > | detectors () const |
std::vector< AbstractGantry * > | gantries () const |
std::vector< AbstractSource * > | sources () const |
std::vector< AbstractBeamModifier * > | modifiers () const |
const std::vector< ComponentPtr > & | components () const |
const QString & | name () const |
uint | nbComponents () const |
void | addComponent (ComponentPtr component) |
void | addComponent (SystemComponent *component) |
void | clear () |
bool | isEmpty () const |
bool | isValid () const |
bool | isSimple () const |
void | rename (QString name) |
void | removeComponent (SystemComponent *component) |
CTSystem & | operator<< (ComponentPtr component) |
CTSystem & | operator<< (SystemComponent *component) |
![]() | |
virtual int | type () const |
virtual | ~SerializationInterface ()=default |
Static Public Member Functions | |
static SimpleCTSystem | fromCTSystem (const CTSystem &system, bool *ok=nullptr) |
static SimpleCTSystem | fromCTSystem (CTSystem &&system, bool *ok=nullptr) |
![]() | |
static QString | defaultName () |
Public Attributes | |
bool * | ok = nullptr) |
Protected Member Functions | |
SimpleCTSystem ()=default | |
SimpleCTSystem (const CTSystem &) | |
SimpleCTSystem (CTSystem &&system) | |
![]() | |
SerializationInterface ()=default | |
SerializationInterface (const SerializationInterface &)=default | |
SerializationInterface (SerializationInterface &&)=default | |
SerializationInterface & | operator= (const SerializationInterface &)=default |
SerializationInterface & | operator= (SerializationInterface &&)=default |
Private Member Functions | |
void | addComponent (ComponentPtr component) |
void | addComponent (SystemComponent *component) |
void | clear () |
void | removeComponent (SystemComponent *component) |
CTSystem & | operator<< (ComponentPtr component) |
CTSystem & | operator<< (SystemComponent *component) |
Additional Inherited Members | |
![]() | |
typedef std::unique_ptr< SystemComponent > | ComponentPtr |
Alias for unique pointer to SystemComponent. | |
![]() | |
enum | { Type = -1, UserType = 65536 } |
The SimpleCTSystem class is a specialized sub-class of CTSystem for simple systems (i.e. with a single gantry, detector and source).
This class is a specialization of CTSystem to describe systems that have the simple configuration that involves only a single source and detector mounted on a single gantry component.
The CTL framework is based on geometry description that uses projection matrices. These can only fully describe the system geometry for this type of system configuration. Consequently, all further parts of the framework (e.g. geometry encoding, definition of acquisition setups) rely on the SimpleCTSystem class (and their sub-classes).
Instances of this class can be created from "regular" CTSystem objects using the factory method fromCTSystem(). This assures that the configuration of the system is simple. Alternatively, a constructor taking all three essential components can also be used. As it is required for SimpleCTSystem objects at all times to retain a simple configuration, adding further components using addComponent() (or removing components with removeComponent()) is no longer allowed. Instead, beam modifiers - these can be contained in an arbitrary number - can be added using addBeamModifier(). For convenience, each of the three essential components can, however, be replaced by another component of the appropriate type using the corresponding methods replaceDetector(), replaceGantry() and replaceSource().
CTL::SimpleCTSystem::SimpleCTSystem | ( | const AbstractDetector & | detector, |
const AbstractGantry & | gantry, | ||
const AbstractSource & | source | ||
) |
Constructs a SimpleCTSystem with the components detector, gantry and source.
CTL::SimpleCTSystem::SimpleCTSystem | ( | AbstractDetector && | detector, |
AbstractGantry && | gantry, | ||
AbstractSource && | source | ||
) |
Constructs a SimpleCTSystem with the components detector, gantry and source.
|
protecteddefault |
Default constructor. In protected domain and not intended for external use.
|
protected |
Constructs a SimpleCTSystem object as a copy of the CTSystem system.
Note that this constructor does not check whether system can properly be "converted" into a SimpleCTSystem. This is acceptable here, since it is protected and is only called from the public factory method fromCTSystem(), which already makes sure that the system is simple (and thus, can be converted).
|
protected |
Move-constructs a SimpleCTSystem object from CTSystem system.
Note that this constructor does not check whether system can properly be "converted" into a SimpleCTSystem. This is acceptable here, since it is protected and is only called from the public factory method fromCTSystem(), which already makes sure that the system is simple (and thus, can be converted).
void CTL::SimpleCTSystem::addBeamModifier | ( | AbstractBeamModifier * | modifier | ) |
Adds the AbstractBeamModifier modifier to the system. This instance takes ownership of modifier.
void CTL::SimpleCTSystem::addBeamModifier | ( | std::unique_ptr< AbstractBeamModifier > | modifier | ) |
Adds the AbstractBeamModifier modifier to the system.
|
private |
Adds component to the system. Does nothing if component is null
.
|
private |
Adds component to the system. This CTSystem instance takes ownership of component.
Does nothing if component is null
.
|
private |
Removes all components from the system.
|
overridevirtual |
Constructs a copy of the system and returns a base-class pointer to the new object.
Reimplemented from CTL::CTSystem.
|
overridevirtual |
Constructs a new CTSystem object and moves the content of this instance into the new object. Returns a base class pointer to the new instance.
Reimplemented from CTL::CTSystem.
AbstractDetector * CTL::SimpleCTSystem::detector | ( | ) | const |
Returns a pointer to the detector component in the system. This does not transfer ownership.
|
static |
Constructs and returns a SimpleCTSystem object from the CTSystem system. Returns an empty object if system is not simple (isEmpty() of the returned object will return true). If ok is nonnull *ok will be set to true if the conversion to a SimpleCTSystem was successful, i.e. system is simple, otherwise *ok will be set to false. If ok is a nullptr and the system is not simple, an exception will be thrown.
|
static |
Overload of SimpleCTSystem::fromCTSystem(const CTSystem& system, bool* ok) that binds to a system passed as a rvalue. An exception will be thrown if system is not simple and ok is a nullptr.
AbstractGantry * CTL::SimpleCTSystem::gantry | ( | ) | const |
Returns a pointer to the gantry component in the system. This does not transfer ownership.
|
private |
Operator style alternative to add component to the system. This CTSystem instance takes ownership of component.
Similar to addComponent() but also returns a reference to this instance.
|
private |
Operator style alternative to add component to the system.
Similar to addComponent() but also returns a reference to this instance.
float CTL::SimpleCTSystem::photonsPerPixel | ( | uint | module | ) | const |
Returns the average number of photons that incide on a detector pixel in module module.
std::vector< float > CTL::SimpleCTSystem::photonsPerPixel | ( | ) | const |
Returns the average numbers of photons that incide on a detector pixel for all modules.
float CTL::SimpleCTSystem::photonsPerPixelMean | ( | ) | const |
Returns the number of photons that incide on a detector pixel averaged over all detector modules.
|
private |
Removes the component component from the system.
void CTL::SimpleCTSystem::replaceDetector | ( | AbstractDetector * | newDetector | ) |
Replaces the detector component of this instance by newDetector. The old detector object is destroyed. This instance takes ownership of newDetector.
Does nothing if a nullptr is passed.
void CTL::SimpleCTSystem::replaceDetector | ( | std::unique_ptr< AbstractDetector > | newDetector | ) |
Replaces the detector component of this instance by newDetector. The old detector object is destroyed. This instance takes ownership of newDetector.
Does nothing if a nullptr is passed.
void CTL::SimpleCTSystem::replaceGantry | ( | AbstractGantry * | newGantry | ) |
Replaces the gantry component of this instance by newGantry. The old gantry object is destroyed. This instance takes ownership of newGantry.
Does nothing if a nullptr is passed.
void CTL::SimpleCTSystem::replaceGantry | ( | std::unique_ptr< AbstractGantry > | newGantry | ) |
Replaces the gantry component of this instance by newGantry. The old gantry object is destroyed. This instance takes ownership of newGantry.
Does nothing if a nullptr is passed.
void CTL::SimpleCTSystem::replaceSource | ( | AbstractSource * | newSource | ) |
Replaces the source component of this instance by newSource. The old source object is destroyed. This instance takes ownership of newSource.
Does nothing if a nullptr is passed.
void CTL::SimpleCTSystem::replaceSource | ( | std::unique_ptr< AbstractSource > | newSource | ) |
Replaces the source component of this instance by newSource. The old source object is destroyed. This instance takes ownership of newSource.
Does nothing if a nullptr is passed.
AbstractSource * CTL::SimpleCTSystem::source | ( | ) | const |
Returns a pointer to the source component in the system. This does not transfer ownership.