X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fif2img.cpp;h=1aa8a39d49bf44c04520cbabcec0cbff1332bbf8;hp=a230974db30135b812917d6bb802d00f48372e24;hb=2f3d6e2580db607105bb072b13e4aff453ae4495;hpb=2d39e823ba389fc68e5317c422b55be006094252 diff --git a/src/if2img.cpp b/src/if2img.cpp index a230974..1aa8a39 100644 --- a/src/if2img.cpp +++ b/src/if2img.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: if2img.cpp,v 1.8 2000/06/22 10:17:28 kevin Exp $ +** $Id: if2img.cpp,v 1.9 2000/06/26 21:15:24 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 @@ -279,30 +279,15 @@ if2img_main (int argc, char *const argv[]) out_file = argv[optind+1]; else out_file = NULL; - pim = new ImageFile (in_file); + pim = new ImageFile (); ImageFile& im = *pim; - if (! im.fileRead()) { + if (! im.fileRead(in_file)) { sys_error (ERR_FATAL, "File %s does not exist", in_file); return (1); } - if (opt_labels) { - int nlabels = im.getNumLabels(); - - for (int i = 0; i < nlabels; i++) { - Array2dFileLabel label; - im.labelRead (label, i); - - if (label.getLabelType() == Array2dFileLabel::L_HISTORY) { - cout << "History: " << label.getLabelString() << endl; - cout << " calc time = " << label.getCalcTime() << " secs" << endl; - cout << " Timestamp = " << label.getDateString() << endl; - } else if (label.getLabelType() == Array2dFileLabel::L_USER) { - cout << "Note: " << label.getLabelString() << endl; - cout << " Timestamp = %s" << label.getDateString() << endl; - } - } - } + if (opt_labels) + im.printLabels(cout); if (opt_stats || (! (opt_set_max && opt_set_min))) { double minfound = HUGE_VAL, maxfound = -HUGE_VAL;