CTL
0.6.1
Computed Tomography Library
|
Generic implementation of a gantry component. More...
#include <genericgantry.h>
Public Types | |
enum | { Type = 201 } |
![]() | |
enum | { Type = 200 } |
![]() | |
enum | { Type = 0 } |
![]() | |
enum | { Type = -1, UserType = 65536 } |
Static Public Member Functions | |
static QString | defaultName () |
static std::unique_ptr< GenericGantry > | fromOther (const AbstractGantry &other) |
![]() | |
static QString | defaultName () |
Protected Member Functions | |
mat::Location | nominalDetectorLocation () const override |
mat::Location | nominalSourceLocation () const override |
![]() | |
AbstractGantry (const QString &name) | |
AbstractGantry (const AbstractGantry &)=default | |
AbstractGantry (AbstractGantry &&)=default | |
AbstractGantry & | operator= (const AbstractGantry &)=default |
AbstractGantry & | operator= (AbstractGantry &&)=default |
![]() | |
SerializationInterface ()=default | |
SerializationInterface (const SerializationInterface &)=default | |
SerializationInterface (SerializationInterface &&)=default | |
SerializationInterface & | operator= (const SerializationInterface &)=default |
SerializationInterface & | operator= (SerializationInterface &&)=default |
Private Attributes | |
mat::Location | _detectorLocation |
Location of the detector component. | |
mat::Location | _sourceLocation |
Location of the source component. | |
Friends | |
template<class > | |
struct | SerializationHelper::RegisterWithSerializationHelper |
Additional Inherited Members | |
![]() | |
static QString | typeInfoString (const std::type_info &type) |
![]() | |
std::unique_ptr< ComponentType > | makeComponent (ConstructorArguments &&... arguments) |
std::unique_ptr< SystemComponent > | makeComponentFromJson (const QJsonObject &object, bool fallbackToGenericType) |
Generic implementation of a gantry component.
This class implements AbstractGantry with a straightforward parametrization of the locations of its detector and source component. In particular, this parametrization consists of the locations (in world coordinates) themselves. These are stored as private members. The abstract interface methods nominalDetectorLocation() and nominalSourceLocation() are implemented such that they simply return their corresponding private members.
Use the setter methods setDetectorLocation() or setSourceLocation() to change the locations of source and/or detector, respectively. For convenience, setter methods for isolated changes of the position or rotation component of these locations are provided.
CTL::GenericGantry::GenericGantry | ( | const QString & | name = defaultName() | ) |
Constructs a GenericGantry object named name.
CTL::GenericGantry::GenericGantry | ( | const mat::Location & | sourceLocation, |
const mat::Location & | detectorLocation, | ||
const QString & | name = defaultName() |
||
) |
Constructs a GenericGantry with the source placed at sourceLocation (note that this includes its position and rotation) and the detector mounted at detectorLocation.
For details on all coordinate systems: see detailed class description.
CTL::GenericGantry::GenericGantry | ( | const Vector3x1 & | sourcePosition, |
const Matrix3x3 & | sourceRotation, | ||
const Vector3x1 & | detectorPosition, | ||
const Matrix3x3 & | detectorRotation, | ||
const QString & | name = defaultName() |
||
) |
Constructs a GenericGantry with a source at sourcePosition (orientation given by sourceRotation) and the detector placed at detectorPosition (orientation given by detectorRotation).
For details on all coordinate systems: see detailed class description.
|
overridevirtual |
Constructs a copy of the object and returns a base class pointer to it.
Reimplemented from CTL::SystemComponent.
|
static |
Returns the default name for the component: "Generic gantry".
|
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::AbstractGantry.
|
overridevirtual |
Returns a formatted string with information about the object.
In addition to the information from the base class (GenericComponent), the info string contains the following details:
Reimplemented from CTL::AbstractGantry.
|
overrideprotectedvirtual |
Returns the nominal detector location. This ignores any (optional) detector displacement.
Override this method when sub-classing GenericGantry allows for customization of the parametrization of the components' locations.
Implements CTL::AbstractGantry.
|
overrideprotectedvirtual |
Returns the nominal source location. This ignores any (optional) source displacement.
Override this method when sub-classing GenericGantry allows for customization of the parametrization of the components' locations.
Implements CTL::AbstractGantry.
void CTL::GenericGantry::setDetectorLocation | ( | const mat::Location & | location | ) |
Sets the location (i.e. position and rotation) of the detector to location. Must not contain effects considered by the displacement.
void CTL::GenericGantry::setDetectorPosition | ( | const Vector3x1 & | detectorPosition | ) |
Convenience setter. Sets the position of the detector to detectorPosition.
void CTL::GenericGantry::setDetectorRotation | ( | const Matrix3x3 & | detectorRotation | ) |
Convenience setter. Sets the rotation of the detector to detectorRotation.
The rotation matrix describes the transformation from WCS to CTS.
void CTL::GenericGantry::setSourceLocation | ( | const mat::Location & | location | ) |
Sets the location (i.e. position and rotation) of the source to location. Must not contain effects considered by the displacement.
void CTL::GenericGantry::setSourcePosition | ( | const Vector3x1 & | sourcePosition | ) |
Convenience setter. Sets the position of the source to sourcePosition.
void CTL::GenericGantry::setSourceRotation | ( | const Matrix3x3 & | sourceRotation | ) |
Convenience setter. Sets the rotation of the source to sourceRotation.
The rotation matrix describes the transformation from the intrinsic source coordinate system to the WCS.
|
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::AbstractGantry.
|
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::AbstractGantry.