VivoQuant
Loading...
Searching...
No Matches
Public Slots | Public Member Functions | Protected Slots | List of all members
MatrixManipulationDialog Class Reference

Object to interact with Matrix Manipulation Tool when it is active. More...

#include <MatrixManipulationDialog.h>

Public Slots

void loadMatrixFromFile (string filename)
 Function to load an ITK transformation (.tfm) or a XML transformation (.xml) into current matrix.
 
void saveMatrixToFile (string filename)
 Function to save the current matrix as a transformation: ITK transformation (.tfm) or a XML transformation (.xml)
 
void fillIdentity ()
 Function to set the current matrix to the identity matrix.
 
void transpose ()
 Function to apply transpose operation to the current matrix.
 
void inverse ()
 Function to apply inverse operation to the current matrix.
 
void sumBy (double value)
 Function to apply sum operation to the current matrix.
 
void multiplyBy (double value)
 Function to apply multiply operation to the current matrix.
 
void swap ()
 Function to swap Matrix A with Matrix B.
 
void clear ()
 Function to clear the current matrix by filling it with zeros.
 
void concatenate ()
 Function to concatenate Matrix A and Matrix B using post-multiplication (A * B) and put the result in Matrix A. Matrix B will be set to the identity matrix.
 
void round ()
 Function to round values in the current matrix to six decimal places.
 
void sumMatrix ()
 Function to apply sum operation of Matrix A with Matrix B and set the result in Matrix A.
 
void setMatrixFocus (int idx)
 Function to set the focus on a matrix.
 
void enableMatrixCalculation (bool toEnable)
 Function to enable calculations between two matrices.
 
void mergeTransform ()
 Function to combine an affine transformation matrix in Matrix A with one in Matrix B by multiplying their rotation and scaling transformations together and adding their translations, putting the result in Matrix A and the identity matrix in Matrix B.
 

Public Member Functions

double getMatrixAt (int idx, int i, int j)
 Function to get a single value from a matrix.
 
void setMatrixAt (int idx, int i, int j, double val)
 Function to set a single value to a matrix.
 
void set3DMode ()
 Sets the dialog to use 3D matrix.
 
void set2DMode ()
 Sets the dialog to use 2D matrix.
 

Protected Slots

void focusOnMatrixA ()
 Function to set the focus on Matrix A.
 
void focusOnMatrixB ()
 Function to set the focus on Matrix B.
 

Detailed Description

Object to interact with Matrix Manipulation Tool when it is active.

This object can be used to apply matrix operations when the Matrix Manipulation Tool window is loaded.

See also ScriptMaster::matrixManipulationTool() to obtain this object and MainWin::matrixManipulationTool() to enter the Matrix Manipulation Tool.

Member Function Documentation

◆ enableMatrixCalculation

void enableMatrixCalculation ( bool  toEnable)
slot

Function to enable calculations between two matrices.

Parameters
toEnableTrue value indicates calculations are enabled.

◆ getMatrixAt()

double getMatrixAt ( int  idx,
int  i,
int  j 
)

Function to get a single value from a matrix.

Parameters
idxIndex of the matrix to get a value from (0 = Matrix A, 1 = Matrix B)
iRow index
jColumn index
Returns
The value [i, j] of corresponding matrix.

◆ loadMatrixFromFile

void loadMatrixFromFile ( string  filename)
slot

Function to load an ITK transformation (.tfm) or a XML transformation (.xml) into current matrix.

Parameters
filenameFilename of ITK transformation (.tfm) or a XML transformation (.xml) file to load

◆ multiplyBy

void multiplyBy ( double  value)
slot

Function to apply multiply operation to the current matrix.

Parameters
valueValue that every cell will be multiplied by

◆ saveMatrixToFile

void saveMatrixToFile ( string  filename)
slot

Function to save the current matrix as a transformation: ITK transformation (.tfm) or a XML transformation (.xml)

Parameters
filenameFilename of ITK transformation (.tfm) or a XML transformation (.xml) file to save

◆ setMatrixAt()

void setMatrixAt ( int  idx,
int  i,
int  j,
double  val 
)

Function to set a single value to a matrix.

Parameters
idxIndex of the matrix to set a value to (0 = Matrix A, 1 = Matrix B)
iRow index
jColumn index
valValue to set in [i, j] of corresponding matrix

◆ setMatrixFocus

void setMatrixFocus ( int  idx)
slot

Function to set the focus on a matrix.

Parameters
idxIndex of the matrix to set the focus on (0 = Matrix A, 1 = Matrix B)

◆ sumBy

void sumBy ( double  value)
slot

Function to apply sum operation to the current matrix.

Parameters
valueValue that will be added to every cell