X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fifinfo.cpp;h=a78a08590df816af79986423710b677515e3b4cf;hp=000b255e29a6aa7f3ec04ab7223528c05402072e;hb=4b16507e92bb80b09575b28bed66810e33d2681f;hpb=92a7e95f339442d5d87f0febcae338306e1c6edd diff --git a/src/ifinfo.cpp b/src/ifinfo.cpp index 000b255..a78a085 100644 --- a/src/ifinfo.cpp +++ b/src/ifinfo.cpp @@ -1,25 +1,15 @@ /***************************************************************************** -** This is part of the CTSim program -** Copyright (C) 1983-2000 Kevin Rosenberg -** -** $Id: ifinfo.cpp,v 1.2 2000/06/07 03:50:27 kevin Exp $ -** $Log: ifinfo.cpp,v $ -** Revision 1.2 2000/06/07 03:50:27 kevin -** *** empty log message *** -** -** Revision 1.1 2000/06/07 02:29:05 kevin -** Initial C++ versions -** -** Revision 1.3 2000/05/16 04:33:59 kevin -** Improved option processing +** FILE IDENTIFICATION ** -** Revision 1.2 2000/05/08 20:02:32 kevin -** ANSI C changes -** -** Revision 1.1.1.1 2000/04/28 13:02:44 kevin -** Initial CVS import for first public release +** Name: ifinfo.cpp +** Purpose: Display information about an image file +** Programmer: Kevin Rosenberg +** Date Started: April 2000 ** +** This is part of the CTSim program +** Copyright (C) 1983-2000 Kevin Rosenberg ** +** $Id: ifinfo.cpp,v 1.5 2000/06/09 11:03:08 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 @@ -137,19 +127,22 @@ ifinfo_main (int argc, char *const argv[]) in_file = argv[optind]; im = new ImageFile (in_file); - im->adf.fileRead (); + if (! im->fileRead ()) { + sys_error (ERR_WARNING, "Unable to read file %s", in_file); + return (1); + } if (opt_labels) { - int nlabels = im->adf.getNumLabels(); + int nlabels = im->getNumLabels(); int i; for (i = 0; i < nlabels; i++) { Array2dFileLabel label; - string str; + im->labelRead (label, i); - im->adf.labelRead (label, i); + string str; label.getDateString (str); if (label.getLabelType() == Array2dFileLabel::L_HISTORY) { @@ -175,9 +168,9 @@ ifinfo_main (int argc, char *const argv[]) int ix, iy; maxbin = nbin - 1; - ImageFileArray v = im->adf.getArray(); - int nx = im->adf.nx(); - int ny = im->adf.ny(); + ImageFileArray v = im->getArray(); + int nx = im->nx(); + int ny = im->ny(); for (ix = 0; ix < nx; ix++) {