ImFusion SDK 4.3
ConeBeamFramePars Class Reference

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

Stores and handles individual per-frame transformation parameters. More...

Detailed Description

Stores and handles individual per-frame transformation parameters.

Motion for a frame is composed of: (a) motion from a tracking sequence (b) additional iso matrices. The additional iso parameters are set either (i) manually on a per-frame basis or (iii) by setting appropriate "iso parameters" or "detector parameters".

Public Member Functions

 ConeBeamFramePars (const ConeBeamFramePars &other)
 
ConeBeamFrameParsoperator= (const ConeBeamFramePars &other)
 
bool useIsoMatrix ()
 
void setUseIsoMatrix (bool val)
 

Motion tags

Every frame is given a boolean "motion tag" that specifies whether or not a transformation is present.

void setMotionTag (int frame, bool value)
 
void resizeMotion (int size)
 Resize the motion tag array to desired size.
 
void clearMotion ()
 Clear all motion tagged frames, i.e. sets the array of motion tags to [].
 
bool hasMotion (int frame) const
 Return whether a frame has motion, defaults to false for missing values.
 
std::vector< int > motionFrames () const
 Return a vector of all motion tagged frames, i.e.
 
bool hasAnyMotion () const
 Return whether there are motion tagged frames at all.
 

Motion in the detector coordinate system

void setDetMatrix (int frame, const mat4 &mat)
 
void setDetPars (int frame, const double *pars, int n=6)
 Set the rigid or affine parameters for a frame in detector coordinates.
 
void setDetPar (int frame, int par, double val)
 Set a single parameter for a frame in detector coordinates.
 
void resize (int n)
 Resize the detector parameter array upfront to accomodate a certain number of frames.
 
mat4 detMatrix (int frame) const
 Returns the relative matrix for a frame in detector coordinates.
 
int detMatrixAll (std::vector< int > &idxOut, std::vector< mat4 > &matOut)
 Returns all matrices with motion in detector coordinates with their frame indices.
 
void detPars (int frame, double *parsOut, int n=6) const
 Copies the selected relative parameters of a frame into a vector.
 
void setAffineMode (bool flag)
 Enable or disable affine parameters (non-uniform scaling and shearing)
 
bool affineMode () const
 Return if affine mode is enabled.
 

Motion in the iso-center coordinate system

void setIsoMatrix (int frame, const mat4 &mat)
 
void addIsoMatrix (int frame, const mat4 &absMat, bool combine=false, const mat4 *relMat=0)
 Add a transformation in iso-coordinates starting from a specific frame.
 
void removeIsoMatrix (int frame)
 Remove an iso-matrix and its relative effect on all later projections.
 
void setIsoReferenceZone (int start, int size)
 Set a zone of frames where no relative iso-matrices are applied.
 
void setIsoPars (int n, const double *pars)
 Set concatenated parameters for transformations in iso-coordinates.
 
int defineBlocks (int minBlockSize)
 Define blocks of frames without motion for self-calibration.
 
void clearIso ()
 Clear all iso matrices.
 
mat4 isoMatrix (int frame) const
 Returns the full relative matrix for a frame in iso-coordinates.
 
mat4 isoMat (int frame) const
 Getter for m_isoMat.
 
int isoMatrixCount () const
 Returns the number of relative matrices in iso-coordinates.
 
int isoMatrixAll (std::vector< mat4 > &matOut, std::vector< int > &idxOut) const
 Returns vector of all iso-matrices and corresponding indices.
 
void isoMatrixParsAll (double *parsOut) const
 Space for six times the number of matrices double values is required.
 

Manipulation affecting multiple coordinate systems

void load ()
 
void save ()
 Save per-frame information to text files in current directory.
 
void clear ()
 Clear all the relative motion.
 

Support for a tracking sequence

void setTrackingSequence (TrackingSequence *ts, int stream, int offset)
 
void setTrackingTimestamps (const std::vector< double > &ts)
 Set X-Ray image timestamps to use with the tracking sequence.
 
void setTrackingDelayAndRegistration (double delay, const mat4 &reg, int stream)
 Set a temporal delay and the registration matrix.
 
const TrackingSequencetracking (int sequence) const
 Read-only access to the tracking sequence.
 
TrackingSequencetracking (int sequence)
 Access to the tracking sequence.
 
int trackingCount () const
 
void clearTracking ()
 Clear all tracking sequences.
 

Jaw split angle

void setSplitCenter (const vec3 &center)
 
void setSplitAngle (int frame, double value)
 Set the split angle for a frame.
 
double splitAngle (int frame) const
 Return the split angle for a frame.
 
mat4 detMatrix2 (int frame) const
 Returns the matrix for secondary (split) motion in detector coordinates.
 

Member Function Documentation

◆ setMotionTag()

void setMotionTag ( int frame,
bool value )

Set or clear the motion tag of a frame

◆ motionFrames()

std::vector< int > motionFrames ( ) const

Return a vector of all motion tagged frames, i.e.

the list of frames for which motion(frame) == true

◆ setDetMatrix()

void setDetMatrix ( int frame,
const mat4 & mat )

Specifies transformation for a frame in detector coordinates

◆ detMatrixAll()

int detMatrixAll ( std::vector< int > & idxOut,
std::vector< mat4 > & matOut )

Returns all matrices with motion in detector coordinates with their frame indices.

This method also updates the internal boolean vector m of motion frames.

◆ setIsoMatrix()

void setIsoMatrix ( int frame,
const mat4 & mat )

Set an iso-matrix for the block-based optimization scheme

◆ load()

void load ( )

Attempt to load per-frame information from text files in current directory

◆ setTrackingSequence()

void setTrackingSequence ( TrackingSequence * ts,
int stream,
int offset )

Set a tracking sequence, transferring ownership. The isoMatrix method will also multiply a transformation from this tracking sequence. The clear and clearIso methods won't delete the sequence, call this method with a zero pointer instead to delete an existing tracking sequence.

◆ setTrackingTimestamps()

void setTrackingTimestamps ( const std::vector< double > & ts)

Set X-Ray image timestamps to use with the tracking sequence.

These should be the timestamps from the ConeBeamData container; if the supplied tracking sequences has timestamps as well, synchronization is properly performed.

◆ setTrackingDelayAndRegistration()

void setTrackingDelayAndRegistration ( double delay,
const mat4 & reg,
int stream )

Set a temporal delay and the registration matrix.

When this method is called, the delay and matrix are used to assure the first frame has a relative transformation of identity, hence both a calibration and registration matrix are derived from the information provided here.

◆ setSplitCenter()

void setSplitCenter ( const vec3 & center)
inline

Set the center of the split transformation


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