[Wavelet-commit] Wavelet/test image.cc,1.4,1.5
Status: Beta
Brought to you by:
herbert
From: Herbert M. D. <he...@us...> - 2007-05-22 14:55:50
|
Update of /cvsroot/wavelet/Wavelet/test In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22191/test Modified Files: image.cc Log Message: Fixed polymorphic-exception problem which popped up while using g++ 4.x... Index: image.cc =================================================================== RCS file: /cvsroot/wavelet/Wavelet/test/image.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** image.cc 10 Aug 2005 09:35:23 -0000 1.4 --- image.cc 22 May 2007 14:55:45 -0000 1.5 *************** *** 31,39 **** Image *img1 = NEW (StillImage ()); ! /* * Out directory should not exist! */ ! try { img1->write ("/nogo/out.pgm"); --- 31,39 ---- Image *img1 = NEW (StillImage ()); ! /* * Out directory should not exist! */ ! try { img1->write ("/nogo/out.pgm"); *************** *** 45,49 **** assert (strstr (error.what (), "writing") != NULL); } ! try { img1->read ("/nogo/in.pgm"); --- 45,49 ---- assert (strstr (error.what (), "writing") != NULL); } ! try { img1->read ("/nogo/in.pgm"); *************** *** 56,60 **** } ! try { img1->write ("out.pxm"); --- 56,60 ---- } ! try { img1->write ("out.pxm"); *************** *** 66,70 **** assert (strstr (error.what (), "unknown") != NULL); } ! try { img1->read ("/nogo/in.ra"); --- 66,70 ---- assert (strstr (error.what (), "unknown") != NULL); } ! try { img1->read ("/nogo/in.ra"); *************** *** 77,81 **** } ! try { img1->read ("image.pgm"); --- 77,81 ---- } ! try { img1->read ("image.pgm"); *************** *** 88,92 **** assert (img1->size () == 16); ! for (int i = 0; i < img1->size (); i++) { --- 88,92 ---- assert (img1->size () == 16); ! for (int i = 0; i < img1->size (); i++) { *************** *** 104,108 **** } cout << "OK?" << endl; ! for (int col = 0; col < img1->cols (); col++) { --- 104,108 ---- } cout << "OK?" << endl; ! for (int col = 0; col < img1->cols (); col++) { *************** *** 114,122 **** } } ! Image *img2 = NEW (StillImage ()); ! ! try { img2->read ("image.pgm"); --- 114,122 ---- } } ! Image *img2 = NEW (StillImage ()); ! ! try { img2->read ("image.pgm"); *************** *** 138,142 **** #ifdef PFI ! try { img2->write ("image.pfi", fn_raw); --- 138,142 ---- #ifdef PFI ! try { img2->write ("image.pfi", fn_raw); *************** *** 155,159 **** assert (img1->equals (*img2)); ! try { img2->read ("image.pfi", fn_raw, 4, 4); --- 155,159 ---- assert (img1->equals (*img2)); ! try { img2->read ("image.pfi", fn_raw, 4, 4); *************** *** 172,176 **** assert (img1->equals (*img2)); ! try { img2->write ("image.pfi"); --- 172,176 ---- assert (img1->equals (*img2)); ! try { img2->write ("image.pfi"); *************** *** 182,186 **** } ! try { img2->read ("image.pfi"); --- 182,186 ---- } ! try { img2->read ("image.pfi"); *************** *** 207,211 **** assert (fabs (img1->at (i) - (coeff)i) < DBL_EPSILON); } ! #endif dump (img1); --- 207,211 ---- assert (fabs (img1->at (i) - (coeff)i) < DBL_EPSILON); } ! #endif dump (img1); *************** *** 234,238 **** img2 = NEW (StillImage (2, 8)); ! try { --- 234,238 ---- img2 = NEW (StillImage (2, 8)); ! try { *************** *** 251,255 **** cout.setf (ios::fixed, ios::floatfield); ! cout << "Inner product two identical images: " << std::setw (2) << img1->iproduct (*img2) << endl; --- 251,255 ---- cout.setf (ios::fixed, ios::floatfield); ! cout << "Inner product two identical images: " << std::setw (2) << img1->iproduct (*img2) << endl; *************** *** 265,274 **** assert (fabs (img1->iproduct (*img2)) < COEFF_EPSILON); ! ! cout << "Inner product two orthogonal images: " << std::setw (2) << img1->iproduct (*img2) << endl; cout.setf (FMT0, ios::floatfield); ! DELETE (img1); DELETE (img2); --- 265,274 ---- assert (fabs (img1->iproduct (*img2)) < COEFF_EPSILON); ! ! cout << "Inner product two orthogonal images: " << std::setw (2) << img1->iproduct (*img2) << endl; cout.setf (FMT0, ios::floatfield); ! DELETE (img1); DELETE (img2); *************** *** 289,294 **** for (int col = 0; col < rw.size (); col++) { ! cout << std::setprecision (1) << std::setw (4) << rw.at (col) ! /*<< "/" << std::setprecision (1) << std::setw (4) << img->at (row, col)*/ << ' '; --- 289,294 ---- for (int col = 0; col < rw.size (); col++) { ! cout << std::setprecision (1) << std::setw (4) << rw.at (col) ! /*<< "/" << std::setprecision (1) << std::setw (4) << img->at (row, col)*/ << ' '; |