SliceO_Buffer::Matrx_Get_...

 

SliceO_Buffer::Matrix_Get_X

SliceO_Buffer::Matrix_Get_Y

SliceO_Buffer::Matrix_Get_Dim

 

These methods return the "X", "Y" and "Dim" values used to create the data matrix.

 

 

Syntax

 

unsigned short  Matrix_Get_X(

          void

) ;

 

unsigned short  Matrix_Get_Y(

          void

) ;

 

unsigned short  Matrix_Get_Dim(

          void

) ;

 

 

Parameters

 

This method does not have a parameter.

 

 

Return value

 

These methods return the "X", "Y" and "Dim" values used to create the data matrix.

 

 

Remarks

 

 

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 3:

                                        val = ((unsigned int **) mat)[j][i] ;

                                        break ;

                              }

}

 

See also

 

Matrix_Get

Matrix_Copy

Matrix_Clear

Matrix_Delete