Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

CMatrix.h

Go to the documentation of this file.
00001 /*************************************************************************
00008  *
00009  * Source code for Real Time Image Library (libRTImage) 
00010  *
00011  * Leeds Vision Group give permission for this code to be copied, modified 
00012  * and distributed within the University of Leeds subject to the following
00013  * conditions:-
00014  *
00015  * - The code is not to be used for commercial gain.
00016  * - The code and use thereof will be attributed to the authors where
00017  *   appropriate (including demonstrations which rely on it's use).
00018  * - All modified, distributions of the source files will retain this header.
00019  *
00020  ****************************************************************************/
00021 
00022 #ifndef CMATRIX_H
00023 #define CMATRIX_H
00024 
00025 class CMatrix
00030 {
00031 private:
00032             unsigned int    r ;        
00033             unsigned int    c ;        
00034             unsigned int    size ;     
00035             bool            InitOk ;   
00036 public:
00037             float           *data ;    
00038 
00040             CMatrix(unsigned int rows, unsigned int columns) ;
00041 
00043             CMatrix(char *filename) ;
00044 
00046             CMatrix(char *filename, unsigned int rows, unsigned int columns) ; 
00047 
00048             void            set_element(unsigned int row,
00049                                         unsigned int col,
00050                                         double       val) ;
00051             float           get_element(unsigned int row,
00052                                         unsigned int col) ;
00053             unsigned int    get_no_rows() ;
00054             unsigned int    get_no_columns() ;
00055             bool            save(char *filename) ;
00056             bool            save_raw(char *filename) ;
00057             float           calc_max_kernel_val() ;
00058             float           calc_min_kernel_val() ;
00059             bool            initialised_ok() ;
00060 };
00061 
00062 #endif

Generated at Fri Aug 13 17:29:20 2004 for libRTImage by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001