**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
- abs_error /= (im_in1.nx() * im_in1.ny());
- cout << "Average Error: " << abs_error << endl;
+ double d, r, e;
+ im_in1.comparativeStatistics (im_in2, d, r, e);
+ cout << "d=" << d << ", r=" << r << ", e=" << e << endl;
im_out.labelsCopy (im_in1, "if-2 file 1: ");
im_out.labelsCopy (im_in2, "if-2 file 2: ");
im_out.labelAdd (Array2dFileLabel::L_HISTORY, strOperation.c_str());
im_out.labelsCopy (im_in1, "if-2 file 1: ");
im_out.labelsCopy (im_in2, "if-2 file 2: ");
im_out.labelAdd (Array2dFileLabel::L_HISTORY, strOperation.c_str());
- return (if2_main(argc, argv));
+ int retval = 1;
+
+ try {
+ retval = if2_main(argc, argv);
+ } catch (exception e) {
+ cerr << "Exception: " << e.what() << endl;
+ } catch (...) {
+ cerr << "Unknown exception" << endl;
+ }
+
+ return (retval);