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

Wavelet.cpp

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 #include <Wavelet.h>
00023 #include <stdio.h>
00024 #include <fstream>
00025 #include <string.h>
00026 
00027 using namespace std;
00028 
00029 #define REAL_POSTFIX ".real"
00030 #define IMAG_POSTFIX ".imag"
00031 
00032 Wavelet::Wavelet(char *fn_prefix)
00039 {
00040 
00041     char         *real_fn ; 
00042     char         *imag_fn ; 
00043     unsigned int r_fn_len ; 
00044     unsigned int i_fn_len ; 
00045 
00046     InitOk = true ;
00047 
00048     r_fn_len = strlen(fn_prefix) + strlen(REAL_POSTFIX) + 1 ; 
00049     i_fn_len = strlen(fn_prefix) + strlen(IMAG_POSTFIX) + 1 ; 
00050 
00051     real_fn = new char[r_fn_len] ;
00052     imag_fn = new char[i_fn_len] ;
00053     if(real_fn==NULL || imag_fn==NULL) InitOk = false ;
00054     else{
00055         sprintf(real_fn,"%s"REAL_POSTFIX,fn_prefix) ; 
00056         sprintf(imag_fn,"%s"IMAG_POSTFIX,fn_prefix) ; 
00057 
00058         real_kernel = new CMatrix(real_fn) ;
00059         imag_kernel = new CMatrix(imag_fn) ;
00060 
00061         if(!real_kernel->initialised_ok() ||
00062            !imag_kernel->initialised_ok() ){
00063             InitOk = false ;
00064         }
00065     }
00066 } 
00067 
00068 bool Wavelet::initialised_ok() 
00069 {
00070     return InitOk ;
00071 }

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