CASToR  3.0
Tomographic Reconstruction (PET/SPECT/CT)
Public Member Functions | Public Attributes | Private Attributes | List of all members
oMatrix Class Reference

Structure designed for basic matrices operations. More...

#include <oMatrix.hh>

Collaboration diagram for oMatrix:
Collaboration graph

Public Member Functions

 oMatrix ()
 oMatrix constructor. Initialize the member variables to their default values. More...
 
 ~oMatrix ()
 oMatrix destructor. Free memory of the oMatrix object. More...
 
 oMatrix (uint16_t nl, uint16_t nc)
 oMatrix constructor. Instanciate a matrix structure with the number of lines and colons provided in parameters More...
 
void Allocate (uint16_t nl, uint16_t nc)
 Instanciate a Matrix structure with the number of lines and colons provided in parameters. More...
 
int SetMatriceElt (uint16_t l, uint16_t c, HPFLTNB a_val)
 Set the matrix element corresponding to the argument indices with the provided value. More...
 
HPFLTNB GetMatriceElt (uint16_t l, uint16_t c)
 
HPFLTNB ** GetMtx ()
 
int Multiplication (oMatrix *ap_Mtx, oMatrix *ap_MtxResult)
 Multiply the member matrix with the matrix provided in 1st parameter Return the result in the matric provided in 2nd parameter. More...
 
int Transpose (oMatrix *a_MtxResult)
 Transpose the elements of the matrix. More...
 
int Inverse (oMatrix *ap_MtxResult)
 Inverse the matrix on which the function is called An error is returned if the matrix is not square, or if there is a nil component on the diagonal The resulting matrix object must be different than the input matrix. More...
 
int SetXRotMtx (HPFLTNB ang)
 Set a (3,3) X-axis rotation matrix using the provided angle. More...
 
int SetYRotMtx (HPFLTNB ang)
 Set a (3,3) Y-axis rotation matrix using the provided angle. More...
 
int SetZRotMtx (HPFLTNB ang)
 Set a (3,3) Z-axis rotation matrix using the provided angle. More...
 
void Describe ()
 Display the element of the matrix. More...
 

Public Attributes

uint16_t m_lin
 
uint16_t m_col
 

Private Attributes

HPFLTNB ** m2p_Mat
 

Detailed Description

Structure designed for basic matrices operations.

This structure is mostly used in scanner classes, for geometrical rotation purposes

Definition at line 41 of file oMatrix.hh.

Constructor & Destructor Documentation

◆ oMatrix() [1/2]

oMatrix::oMatrix ( )

oMatrix constructor. Initialize the member variables to their default values.

Definition at line 40 of file oMatrix.cc.

Here is the caller graph for this function:

◆ ~oMatrix()

oMatrix::~oMatrix ( )

oMatrix destructor. Free memory of the oMatrix object.

Definition at line 80 of file oMatrix.cc.

◆ oMatrix() [2/2]

oMatrix::oMatrix ( uint16_t  nl,
uint16_t  nc 
)

oMatrix constructor. Instanciate a matrix structure with the number of lines and colons provided in parameters

Parameters
nl: a number of lines
nc: a number of colons

Definition at line 60 of file oMatrix.cc.

Member Function Documentation

◆ Allocate()

void oMatrix::Allocate ( uint16_t  nl,
uint16_t  nc 
)

Instanciate a Matrix structure with the number of lines and colons provided in parameters.

Parameters
nla number of lines
nca number of colons

Definition at line 100 of file oMatrix.cc.

◆ Describe()

void oMatrix::Describe ( )

Display the element of the matrix.

Definition at line 472 of file oMatrix.cc.

Here is the caller graph for this function:

◆ GetMatriceElt()

HPFLTNB oMatrix::GetMatriceElt ( uint16_t  l,
uint16_t  c 
)
Parameters
la line index
ca colon index
Returns
the matrix element value corresponding to the argument indices provided in arguments.

Definition at line 165 of file oMatrix.cc.

Here is the caller graph for this function:

◆ GetMtx()

HPFLTNB ** oMatrix::GetMtx ( )
inline
Returns
pointer to the matrix array.

Definition at line 95 of file oMatrix.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Inverse()

int oMatrix::Inverse ( oMatrix ap_MtxResult)

Inverse the matrix on which the function is called An error is returned if the matrix is not square, or if there is a nil component on the diagonal The resulting matrix object must be different than the input matrix.

Parameters
ap_MtxResult: output matrix containing the inverse matrix
Returns
0 if success, positive value otherwise

Definition at line 285 of file oMatrix.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Multiplication()

int oMatrix::Multiplication ( oMatrix ap_Mtx,
oMatrix ap_MtxResult 
)

Multiply the member matrix with the matrix provided in 1st parameter Return the result in the matric provided in 2nd parameter.

Parameters
ap_Mtx: input matrix to multiply to the matrix from which the function is called
ap_MtxResult: output matrix containing the result of the multiplication
Returns
0 if success, positive value otherwise

Definition at line 184 of file oMatrix.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetMatriceElt()

int oMatrix::SetMatriceElt ( uint16_t  l,
uint16_t  c,
HPFLTNB  a_val 
)

Set the matrix element corresponding to the argument indices with the provided value.

Parameters
la line index
ca colon index
a_val: a value to initialize the matrix element with
Returns
0 if success, positive value otherwise

Definition at line 138 of file oMatrix.cc.

Here is the caller graph for this function:

◆ SetXRotMtx()

int oMatrix::SetXRotMtx ( HPFLTNB  ang)

Set a (3,3) X-axis rotation matrix using the provided angle.

Parameters
ang: angle in degree
Returns
0 if sucess, positive value otherwise

Definition at line 372 of file oMatrix.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetYRotMtx()

int oMatrix::SetYRotMtx ( HPFLTNB  ang)

Set a (3,3) Y-axis rotation matrix using the provided angle.

Parameters
ang: angle in degree
Returns
0 if sucess, positive value otherwise

Definition at line 406 of file oMatrix.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetZRotMtx()

int oMatrix::SetZRotMtx ( HPFLTNB  ang)

Set a (3,3) Z-axis rotation matrix using the provided angle.

Parameters
ang: angle in degree
Returns
0 if sucess, positive value otherwise

Definition at line 440 of file oMatrix.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Transpose()

int oMatrix::Transpose ( oMatrix a_MtxResult)

Transpose the elements of the matrix.

Parameters
ap_MtxResult: output matrix containing the result of the transposition
Returns
0 if success, positive value otherwise

Definition at line 228 of file oMatrix.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m2p_Mat

HPFLTNB** oMatrix::m2p_Mat
private

2D pointer containing the matrix elements. Default =NULL

Definition at line 159 of file oMatrix.hh.

◆ m_col

uint16_t oMatrix::m_col

Number of colons in the matrix. Default =0

Definition at line 157 of file oMatrix.hh.

◆ m_lin

uint16_t oMatrix::m_lin

Number of lines in the matrix. Default =0

Definition at line 156 of file oMatrix.hh.


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