X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;ds=sidebyside;f=src%2Fifinfo.cpp;fp=src%2Fifinfo.cpp;h=136792db28bd586604bec92db0dc3bacdc1f064a;hb=59ff52843f44bec1ecd1ad36625cdda305cc7ef8;hp=000b255e29a6aa7f3ec04ab7223528c05402072e;hpb=2ab37d1cdf6caa543510f370cbeb3749d0d61fe0;p=ctsim.git diff --git a/src/ifinfo.cpp b/src/ifinfo.cpp index 000b255..136792d 100644 --- a/src/ifinfo.cpp +++ b/src/ifinfo.cpp @@ -2,8 +2,11 @@ ** 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 $ +** $Id: ifinfo.cpp,v 1.3 2000/06/07 07:43:19 kevin Exp $ ** $Log: ifinfo.cpp,v $ +** Revision 1.3 2000/06/07 07:43:19 kevin +** Converted to IF data files and C++ +** ** Revision 1.2 2000/06/07 03:50:27 kevin ** *** empty log message *** ** @@ -137,7 +140,10 @@ ifinfo_main (int argc, char *const argv[]) in_file = argv[optind]; im = new ImageFile (in_file); - im->adf.fileRead (); + if (! im->adf.fileRead ()) { + sys_error (ERR_WARNING, "Unable to read file %s", in_file); + return (1); + } if (opt_labels) { @@ -147,9 +153,9 @@ ifinfo_main (int argc, char *const argv[]) for (i = 0; i < nlabels; i++) { Array2dFileLabel label; - string str; - im->adf.labelRead (label, i); + + string str; label.getDateString (str); if (label.getLabelType() == Array2dFileLabel::L_HISTORY) { @@ -175,9 +181,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++) {