CTL  0.6.1
Computed Tomography Library
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
CTL::CarmGantry Class Reference

Specialized sub-class of AbstractGantry to represent systems using a C-arm mounting for source and detector. More...

#include <carmgantry.h>

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

Public Types

enum  { Type = 210 }
 
- Public Types inherited from CTL::AbstractGantry
enum  { Type = 200 }
 
- 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
 
 CarmGantry (double cArmSpan=1000.0, const QString &name=defaultName())
 
SystemComponentclone () const override
 
QString info () const override
 
void fromVariant (const QVariant &variant) override
 
QVariant toVariant () const override
 
const mat::Locationlocation () const
 
double cArmSpan () const
 
void setLocation (const mat::Location &location)
 
void setCarmSpan (double span)
 
- Public Member Functions inherited from CTL::AbstractGantry
mat::Location sourceLocation () const
 
mat::Location detectorLocation () const
 
const mat::LocationdetectorDisplacement () const
 
const mat::LocationgantryDisplacement () const
 
const mat::LocationsourceDisplacement () 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< GenericGantrytoGeneric () 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 ()
 

Protected Member Functions

mat::Location nominalDetectorLocation () const override
 
mat::Location nominalSourceLocation () const override
 
- Protected Member Functions inherited from CTL::AbstractGantry
 AbstractGantry (const QString &name)
 
 AbstractGantry (const AbstractGantry &)=default
 
 AbstractGantry (AbstractGantry &&)=default
 
AbstractGantryoperator= (const AbstractGantry &)=default
 
AbstractGantryoperator= (AbstractGantry &&)=default
 
- Protected Member Functions inherited from CTL::SerializationInterface
 SerializationInterface ()=default
 
 SerializationInterface (const SerializationInterface &)=default
 
 SerializationInterface (SerializationInterface &&)=default
 
SerializationInterfaceoperator= (const SerializationInterface &)=default
 
SerializationInterfaceoperator= (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 Protected Member Functions inherited from CTL::SystemComponent
static QString typeInfoString (const std::type_info &type)
 

Detailed Description

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).

Constructor & Destructor Documentation

◆ CarmGantry()

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.

Member Function Documentation

◆ cArmSpan()

double CTL::CarmGantry::cArmSpan ( ) const

Returns the span of the C-arm, i.e. the distance between source and detector (in mm).

◆ clone()

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

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

Reimplemented from CTL::SystemComponent.

◆ defaultName()

QString CTL::CarmGantry::defaultName ( )
static

Returns the default name for the component: "C-arm gantry".

◆ detectorLocationCA()

mat::Location CTL::CarmGantry::detectorLocationCA ( ) const
private

Convenience method. Returns the current detector location (i.e. position and location).

Same as mat::Location(detectorPositionCA(), detectorRotationCA()).

◆ detectorPositionCA()

Vector3x1 CTL::CarmGantry::detectorPositionCA ( ) const
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().

◆ detectorRotationCA()

Matrix3x3 CTL::CarmGantry::detectorRotationCA ( ) const
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().

◆ fromVariant()

void CTL::CarmGantry::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::AbstractGantry.

◆ info()

QString CTL::CarmGantry::info ( ) const
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:

  • C-arm span,
  • (nominal) Source location.

Reimplemented from CTL::AbstractGantry.

◆ location()

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.

◆ nominalDetectorLocation()

mat::Location CTL::CarmGantry::nominalDetectorLocation ( ) const
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.

◆ nominalSourceLocation()

mat::Location CTL::CarmGantry::nominalSourceLocation ( ) const
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).

See also
location().

Implements CTL::AbstractGantry.

◆ setCarmSpan()

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.

◆ setLocation()

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.

◆ toVariant()

QVariant CTL::CarmGantry::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::AbstractGantry.

◆ type()

int CTL::CarmGantry::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::AbstractGantry.


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