CTL
0.6.1
Computed Tomography Library
|
Specialized sub-class of AbstractGantry to represent systems using a C-arm mounting for source and detector. More...
#include <carmgantry.h>
Public Types | |
enum | { Type = 210 } |
![]() | |
enum | { Type = 200 } |
![]() | |
enum | { Type = 0 } |
![]() | |
enum | { Type = -1, UserType = 65536 } |
Public Member Functions | |
int | type () const override |
CarmGantry (double cArmSpan=1000.0, const QString &name=defaultName()) | |
SystemComponent * | clone () const override |
QString | info () const override |
void | fromVariant (const QVariant &variant) override |
QVariant | toVariant () const override |
const mat::Location & | location () const |
double | cArmSpan () const |
void | setLocation (const mat::Location &location) |
void | setCarmSpan (double span) |
![]() | |
mat::Location | sourceLocation () const |
mat::Location | detectorLocation () const |
const mat::Location & | detectorDisplacement () const |
const mat::Location & | gantryDisplacement () const |
const mat::Location & | sourceDisplacement () const |
void | setDetectorDisplacement (const mat::Location &displacement) |
void | setGantryDisplacement (const mat::Location &displacement) |
void | setSourceDisplacement (const mat::Location &displacement) |
Vector3x1 | sourcePosition () const |
Matrix3x3 | sourceRotation () const |
Vector3x1 | detectorPosition () const |
Matrix3x3 | detectorRotation () const |
void | setDetectorDisplacementAngles (double rollAngle, double tiltAngle, double twistAngle) |
void | setDetectorDisplacementPosition (const Vector3x1 &position) |
void | setDetectorDisplacementPosition (double x, double y, double z) |
void | setGantryDisplacementPosition (const Vector3x1 &position) |
void | setGantryDisplacementPosition (double x, double y, double z) |
void | setSourceDisplacementPosition (const Vector3x1 &position) |
void | setSourceDisplacementPosition (double x, double y, double z) |
std::unique_ptr< GenericGantry > | 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 QString | defaultName () |
![]() | |
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 |
Protected Attributes | |
double | _cArmSpan |
Span of the C-arm, i.e. distance between source and detector (in mm). | |
mat::Location | _location |
Location of the source (rotation is oriented towards detector). | |
Private Member Functions | |
mat::Location | detectorLocationCA () const |
Vector3x1 | detectorPositionCA () const |
Matrix3x3 | detectorRotationCA () const |
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) |
Specialized sub-class of AbstractGantry to represent systems using a C-arm mounting for source and detector.
The CarmGantry class provides a convenient means to describe a system geometry in which detector and source have a fixed mechanical connection, as it is typical in C-arm mounted CT systems. To fully describe the configuration, the location of the source (i.e. position and rotation, see also AbstractGantry) needs to be given as well as the distance between source and detector.
It is assumed that source and detector are aligned on the optical axis, i.e. a ray from the source that goes through the isocenter hits the center of the detector. (Use the displacement concept if you want to consider misalignments. See AbstractGantry documentation for details on displacement).
CTL::CarmGantry::CarmGantry | ( | double | cArmSpan = 1000.0 , |
const QString & | name = defaultName() |
||
) |
Constructs a CarmGantry with a C-arm span (i.e. source-to-detector distance) of cArmSpan and name. If not explicitly specified, the C-arm span defaults to 1000 mm.
double CTL::CarmGantry::cArmSpan | ( | ) | const |
Returns the span of the C-arm, i.e. the distance between source and detector (in mm).
|
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: "C-arm gantry".
|
private |
Convenience method. Returns the current detector location (i.e. position and location).
Same as mat::Location(detectorPositionCA(), detectorRotationCA()).
|
private |
Computes the detector position based on the location of the source and the C-arm span, based on the assumption that all components are aligned on the optical axis.
\( t_{\textrm{det}}^{\textrm{nominal}}=t_{\textrm{C-arm}}-R_{\textrm{C-arm}} \cdot\left[\begin{array}{c}0\\0\\-\mathtt{cArmSpan}\end{array}\right], \)
where \(t_{\textrm{C-arm}}\) and \(R_{\textrm{C-arm}}\) are the position and rotation of the C-arm that have been specified by setLocation().
|
private |
Returns the current detector rotation (i.e. transformation matrix from world to CT coordinates).
In this configuration, this is the same as the transposed source rotation matrix, i.e.: location().rotation.transposed().
\( R_{\textrm{det}}^{\textrm{nominal}}=R_{\textrm{C-arm}}^{T}, \)
where \(R_{\textrm{C-arm}}\) denotes the rotation of the C-arm that has been specified by setLocation().
|
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 classes (GenericGantry and GenericComponent), the info string contains the following details:
Reimplemented from CTL::AbstractGantry.
const mat::Location & CTL::CarmGantry::location | ( | ) | const |
Returns the current location of the gantry, i.e. the position (in world coordinates) of the source and its rotation.
|
overrideprotectedvirtual |
Returns the nominal detector location. This ignores any (optional) detector displacement.
Overrides the base class method and computes the detector location based on the C-arm parametrization (i.e. source location and C-arm span).
Implements CTL::AbstractGantry.
|
overrideprotectedvirtual |
Returns the nominal source location. This ignores any (optional) source displacement.
Overrides the base class method and returns the source location like specified as part of the C-arm parametrization (i.e. source location and C-arm span).
Implements CTL::AbstractGantry.
void CTL::CarmGantry::setCarmSpan | ( | double | span | ) |
Sets the span of the C-arm, i.e. the distance between source and detector (in mm), to span.
void CTL::CarmGantry::setLocation | ( | const mat::Location & | location | ) |
Sets the location of the gantry to location. This contains the position (in world coordinates) of the source and its rotation.
|
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.