This method return a pointer to the data matrix. The matrix is organized as an array of Y pointers to arrays of X values. Each value is of Dim bytes.
Syntax
void ** Matrix_Get(
void
) ;
Parameters
This method does not have a parameter.
Return value
This method return a pointer to the data matrix.
Remarks
You also need to get the X, Y and Dim values for the matrix.
Requirements
Header:
sliceO_include.hpp
Library:
sliceO_Structures.lib
Example
Accessing the data matrix:
|
SliceO_Buffer *buf_test = frame->User_Get( 165 ) ;
if ( buf_test ) {
unsigned int val ;
unsigned short x = buf_test->Matrix_Get_X() ;
unsigned short Y = buf_test->Matrix_Get_X() ;
unsigned short dim = buf_test->Matrix_Get_X() ;
void ** mat = buf_test->Matrix_Get() ;
for ( int j=0; j < y; j++ )
for ( int i=0; i < y; i++ )
switch (dim) {
case 1:
val = ((unsigned char **) mat)[j][i] ;
break ;
case 2:
val = ((unsigned short **) mat)[j][i] ;
break ;
case 4:
val = ((unsigned int **) mat)[j][i] ;
break ;
}
}
|
|
See also
Matrix_Get_X
Matrix_Get_Y
Matrix_Get_Dim
Matrix_Copy
Matrix_Clear
Matrix_Delete