ImFusion SDK 4.3
ConeBeamGeometry Class Reference

#include <ImFusion/CT/Legacy/ConeBeamGeometry.h>

Legacy cone-beam geometry representation. More...

+ Inheritance diagram for ConeBeamGeometry:

Detailed Description

Legacy cone-beam geometry representation.

Provides backward compatibility for cone-beam geometric parameters and transformations.

Public Types

enum  MatrixSerializationFormat {
  OpenCV = 0 , OpenGL = 1 , AllIsoMatrices = 2 , Ini = 3 ,
  All = 4
}
 Matrix formats to be used for serialization. More...
 

Public Member Functions

 ConeBeamGeometry ()
 Constructor which initializes all parameters with zero.
 
void setIsoMatrix (const mat4 &m)
 Set the rigid transformation matrix of the iso-center coordinates.
 
mat4 isoMatrix () const
 Return the rigid transformation matrix of the iso-center coordinates.
 
void setIsoOffset (const vec3 &offset)
 Convenience method to change the 3D iso-center offset.
 
vec3 isoOffset () const
 Convenience method returning the 3D iso-center offset.
 
mat4 modelMatrix (int frame, int numFrames) const
 Return the model-view matrix component of a projection only.
 
mat4 matrix (int frame, int numFrames) const
 Return the complete projection matrix of a frame.
 
mat4 matrixWorldToNormalizedImage (int frame, int numFrames) const
 Return the complete projection matrix of a frame.
 
void matricesToMotion ()
 Convert individual model-view matrices to per-frame motion parameters.
 
mat4 relativeDetectorToIso (int frame, int numFrames, const mat4 &matrix) const
 Transfer a relative motion matrix from detector to iso-center coordinates.
 
mat4 isoToRelativeDetector (int frame, int numFrames, const mat4 &matrix) const
 Transfer a relative motion matrix from detector to iso-center coordinates.
 
vec2 perpSourceProjectionToDetector () const
 2D detector coordinate of the perpendicular projection of the source coordinate onto the detector plane
 
int redundantFrame (int frame) const
 Return a frame number which has projection overlap with the given one, or -1 otherwise.
 
bool loadMatrices (const std::string &filename, int width, int height, MatrixSerializationFormat format=MatrixSerializationFormat::OpenCV)
 Load matrices from specified file with the desired matrix format. useMatrices flag is not set automatically.
 
bool saveMatrices (const std::string &folderOut, int numFrames, int width, int height, const std::string &filename="", MatrixSerializationFormat format=MatrixSerializationFormat::OpenCV)
 Save the matrices per frame in the OpenCV/OpenGL projection format, the individual iso-matrices per frame, or the matrices in all of these formats together.
 
void configure (const Properties *p) override
 Load parameters from properties.
 
void configuration (Properties *p) const override
 Store parameters into properties.
 
- Public Member Functions inherited from Configurable
virtual void configureDefaults ()
 Retrieve the properties of this object, replaces values with their defaults and sets it again.
 
void registerParameter (ParameterBase *param)
 Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration().
 
void unregisterParameter (const ParameterBase *param)
 Remove the given Parameter or SubProperty from the list of registered parameters.
 
 Configurable (const Configurable &rhs)
 
 Configurable (Configurable &&rhs) noexcept
 
Configurableoperator= (const Configurable &)
 
Configurableoperator= (Configurable &&) noexcept
 

Static Public Member Functions

static int numPars ()
 Return the number of parameters with which the geometry is described.
 
static const char * parName (int which)
 Return description of a parameter.
 

Public Attributes

double sourceDetDistance = 0.0
 Source to center of detector distance (in mm)
 
double sourcePatDistance = 0.0
 Source to patient distance (in mm)
 
double detSizeX = 0.0
 Width of the detector (in mm)
 
double detSizeY = 0.0
 Height of the detector (in mm)
 
double detOffsetX = 0.0
 Horizontal detector offset in mm.
 
double detRotation = 0.0
 Detector rotation in degrees.
 
double detShearX = 0.0
 Detector shear in X.
 
double detShearY = 0.0
 Detector shear in Y.
 
double reconSize = 0.0
 Size of the reconstruction in mm (all dimensions equal)
 
double reconOffsetX = 0.0
 X Offset of the reconstruction volume in mm (default 0)
 
double reconOffsetY = 0.0
 Y Offset of the reconstruction volume in mm (default 0)
 
double reconOffsetZ = 0.0
 Y Offset of the reconstruction volume in mm (default 0)
 
double reconRotX = 0.0
 X Rotation of the recon volume in degrees.
 
double reconRotY = 0.0
 Y Rotation of the recon volume in degrees.
 
double angleStart = 0.0
 Rotation angle of the first frame in degrees.
 
double angleRange = 0.0
 Entire rotation range in degrees.
 
double angleTilt = 0.0
 Vertical tilt in degrees.
 
std::vector< mat4 > prMat
 Individual projection matrices.
 
std::vector< mat4 > mvMat
 Individual modelview matrices.
 
std::vector< mat4 > isoMat
 Individual iso matrices.
 
bool useMatrices
 Denotes whether the individual matrices shall be used.
 
std::vector< double > jitter
 Additional per-frame jitter parameters.
 
std::vector< double > angles
 Individual rotation angles per frame.
 
std::vector< vec3 > offsets
 Individual iso-center offset per frame.
 
vec3 isoMatRotCtr
 Optional rotation center of global iso-matrix.
 
ConeBeamFramePars framePars
 Per-frame additional motion.
 
bool enableFramePars
 If true framePars will be considered.
 
bool useFanBeam = false
 This is a fanBeam projection along the z-direction. Careful: not all methods support this!!
 
- Public Attributes inherited from Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
 

Static Protected Attributes

static const char * m_parNames [17]
 Parameter description strings.
 

Additional Inherited Members

- Protected Attributes inherited from Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Member Enumeration Documentation

◆ MatrixSerializationFormat

Matrix formats to be used for serialization.

Enumerator
OpenCV 

OpenCV projection matrix (3x4 matrix)

OpenGL 

OpenGL projection matrix (4x4 matrix)

AllIsoMatrices 

Individual iso-matrices including the shared iso-matrix of the cone-beam geometry.

Ini 

Ini geometry format.

All 

Includes OpenCV, OpenGL, and AllIsoMatrices formats.

Member Function Documentation

◆ matrix()

mat4 matrix ( int frame,
int numFrames ) const

Return the complete projection matrix of a frame.

The projection matrix is in OpenGL convention, i.e. World to normalized (OpenGL) image coordinates ([-1,1] and -1,-1 corresponds to the bottom-left corner of the image)

◆ matrixWorldToNormalizedImage()

mat4 matrixWorldToNormalizedImage ( int frame,
int numFrames ) const

Return the complete projection matrix of a frame.

The projection matrix from matrix() but with the y-axis being flipped as we use a top-left system for our images Same is true for our texture coordinates in OpenGL. By default our origin in texture coordinates is at the top-left corner

◆ perpSourceProjectionToDetector()

vec2 perpSourceProjectionToDetector ( ) const

2D detector coordinate of the perpendicular projection of the source coordinate onto the detector plane

Note
Represented in GL texture coordinates, i.e. (0.5, 0.5) corresponds to the center of the detector

◆ configure()

void configure ( const Properties * p)
overridevirtual

Load parameters from properties.

Reimplemented from Configurable.

◆ configuration()

void configuration ( Properties * p) const
overridevirtual

Store parameters into properties.

Reimplemented from Configurable.


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close