X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fifinfo.cpp;h=321fc5c5890a2fefe6e4b5a3bda926cbefb1804c;hb=949b7c917af311cd38f911bc5d0af36f524a6086;hp=f6c8da7f789f530d23fea79dfe02111aa119689d;hpb=08f34bf3ba14d4f436f4d2ef0ee5af1d6eb266ac;p=ctsim.git diff --git a/src/ifinfo.cpp b/src/ifinfo.cpp index f6c8da7..321fc5c 100644 --- a/src/ifinfo.cpp +++ b/src/ifinfo.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ifinfo.cpp,v 1.10 2000/06/25 17:32:24 kevin Exp $ +** $Id: ifinfo.cpp,v 1.12 2000/06/27 10:48:11 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 @@ -129,14 +129,14 @@ ifinfo_main (int argc, char *const argv[]) in_file = argv[optind]; - im = new ImageFile (in_file.c_str()); - if (! im->fileRead ()) { + im = new ImageFile (); + if (! im->fileRead (in_file.c_str())) { sys_error (ERR_WARNING, "Unable to read file %s", in_file.c_str()); return (1); } if (in2_file != "") { - im2 = new ImageFile(in2_file.c_str()); - if (! im2->fileRead ()) { + im2 = new ImageFile(); + if (! im2->fileRead (in2_file.c_str())) { sys_error (ERR_WARNING, "Unable to read file %s", in2_file.c_str()); return (1); } @@ -145,22 +145,23 @@ ifinfo_main (int argc, char *const argv[]) if (opt_stats) cout << "Image size: (" << im->nx() << "," << im->ny() << ")" << endl << endl; + if (im2) + cout << "Image 1: " << im->getFilename() << endl; + if (opt_labels) im->printLabels (cout); if (opt_stats) { - if (im2) - cout << "Image 1" << endl; - im->printStatistics (cout); if (im2) { cout << endl; + cout << "Image 2: " << im2->getFilename() << endl; + if (opt_labels) im2->printLabels(cout); - cout << "Image 2" << endl; im2->printStatistics (cout); cout << endl;