** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: if-2.cpp,v 1.5 2000/08/03 09:57:29 kevin Exp $
+** $Id: if-2.cpp,v 1.6 2000/12/16 07:28:25 kevin Exp $
**
** 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
{0, 0, 0, 0}
};
-static const char* g_szIdStr = "$Id: if-2.cpp,v 1.5 2000/08/03 09:57:29 kevin Exp $";
+static const char* g_szIdStr = "$Id: if-2.cpp,v 1.6 2000/12/16 07:28:25 kevin Exp $";
void
if2_usage (const char *program)
{
- cout << "usage: " << fileBasename(program) << " infile1 infile2 outfile [OPTIONS]" << endl;
- cout << "Perform functions on two input image files" << endl;
- cout << endl;
- cout << " infile1 Name of first input IF file" << endl;
- cout << " infile2 Name of second input IF file" << endl;
- cout << " outfile Name of output IF file" << endl;
- cout << " --add Add images" << endl;
- cout << " --sub Subtract image 2 from image 1" << endl;
- cout << " --mul Multiply images" << endl;
- cout << " --comp Compare images" << endl;
- cout << " --column-plot n Plot column\n";
- cout << " --row-plot n Plot row\n";
- cout << " --verbose Verbose modem" << endl;
- cout << " --version Print version" << endl;
- cout << " --help Print this help message" << endl;
+ std::cout << "usage: " << fileBasename(program) << " infile1 infile2 outfile [OPTIONS]\n";
+ std::cout << "Perform functions on two input image files\n";
+ std::cout << std::endl;
+ std::cout << " infile1 Name of first input IF file\n";
+ std::cout << " infile2 Name of second input IF file\n";
+ std::cout << " outfile Name of output IF file\n";
+ std::cout << " --add Add images\n";
+ std::cout << " --sub Subtract image 2 from image 1\n";
+ std::cout << " --mul Multiply images\n";
+ std::cout << " --comp Compare images\n";
+ std::cout << " --column-plot n Plot column\n";
+ std::cout << " --row-plot n Plot row\n";
+ std::cout << " --verbose Verbose modem\n";
+ std::cout << " --version Print version\n";
+ std::cout << " --help Print this help message\n";
}
int
ImageFile* pim_in1;
ImageFile* pim_in2;
ImageFile* pim_out = NULL;
- string in_file1;
- string in_file2;
- string out_file;
+ std::string in_file1;
+ std::string in_file2;
+ std::string out_file;
int opt_verbose = 0;
int opt_add = 0;
int opt_sub = 0;
break;
case O_VERSION:
#ifdef VERSION
- cout << "Version " << VERSION << endl << g_szIdStr << endl;
+ std::cout << "Version " << VERSION << std::endl << g_szIdStr << std::endl;
#else
- cout << "Unknown version number" << endl;
+ std::cout << "Unknown version number\n";
#endif
return (0);
case O_HELP:
vout = pim_out->getArray();
}
- string strOperation;
+ std::string strOperation;
int nx = im_in1.nx();
int ny = im_in1.ny();
int nx2 = im_in2.nx();
if (opt_comp) {
double d, r, e;
im_in1.comparativeStatistics (im_in2, d, r, e);
- cout << "d=" << d << ", r=" << r << ", e=" << e << endl;
+ std::cout << "d=" << d << ", r=" << r << ", e=" << e << std::endl;
}
if (opt_columnPlot > 0) {
if (opt_columnPlot >= nx || opt_columnPlot >= nx2) {
ezplot.addCurve (plot_xaxis, v1[opt_columnPlot], im_in1.ny());
ezplot.addCurve (plot_xaxis, v2[opt_columnPlot], im_in2.ny());
ezplot.plot();
- cout << "Press enter to continue" << flush;
+ std::cout << "Press enter to continue" << flush;
cio_kb_getc();
#endif
}
ezplot.addCurve (plot_xaxis, v1Row, im_in1.nx());
ezplot.addCurve (plot_xaxis, v2Row, im_in2.nx());
ezplot.plot();
- cout << "Press enter to continue" << flush;
+ std::cout << "Press enter to continue" << flush;
cio_kb_getc();
#endif
}
try {
retval = if2_main(argc, argv);
} catch (exception e) {
- cerr << "Exception: " << e.what() << endl;
+ cerr << "Exception: " << e.what() << std::endl;
} catch (...) {
- cerr << "Unknown exception" << endl;
+ cerr << "Unknown exception\n";
}
return (retval);