![]() |
ImFusion SDK 4.3
|
#include <ImFusion/CT/Legacy/ConeBeamFramePars.h>
Stores and handles individual per-frame transformation parameters. More...
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) | |
| ConeBeamFramePars & | operator= (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 ®, int stream) |
| Set a temporal delay and the registration matrix. | |
| const TrackingSequence * | tracking (int sequence) const |
| Read-only access to the tracking sequence. | |
| TrackingSequence * | tracking (int sequence) |
| Access to the tracking sequence. | |
| int | trackingCount () const |
| void | clearTracking () |
| Clear all tracking sequences. | |
Jaw split angle | |
| void | setSplitCenter (const vec3 ¢er) |
| 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. | |
| void setMotionTag | ( | int | frame, |
| bool | value ) |
Set or clear the motion tag of a frame
| std::vector< int > motionFrames | ( | ) | const |
Return a vector of all motion tagged frames, i.e.
the list of frames for which motion(frame) == true
| void setDetMatrix | ( | int | frame, |
| const mat4 & | mat ) |
Specifies transformation 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.
This method also updates the internal boolean vector m of motion frames.
| void setIsoMatrix | ( | int | frame, |
| const mat4 & | mat ) |
Set an iso-matrix for the block-based optimization scheme
| void load | ( | ) |
Attempt to load per-frame information from text files in current directory
| 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.
| 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.
| 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.
|
inline |
Set the center of the split transformation