X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fif-1.cpp;h=8d2330c9cec89809f46752dc3cfe69fb973104d5;hb=59ff52843f44bec1ecd1ad36625cdda305cc7ef8;hp=16e3b82ce46daac6dbf87f30d05a5769e4a89cab;hpb=f173363bba9997045e5ec825e64d6253ec4da235;p=ctsim.git diff --git a/src/if-1.cpp b/src/if-1.cpp index 16e3b82..8d2330c 100644 --- a/src/if-1.cpp +++ b/src/if-1.cpp @@ -2,8 +2,14 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: if-1.cpp,v 1.1 2000/06/07 02:29:05 kevin Exp $ +** $Id: if-1.cpp,v 1.3 2000/06/07 07:43:19 kevin Exp $ ** $Log: if-1.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 *** +** ** Revision 1.1 2000/06/07 02:29:05 kevin ** Initial C++ versions ** @@ -153,13 +159,13 @@ if1_main (int argc, char *const argv[]) im_in = new ImageFile (in_file); im_in->adf.fileRead (); - int nx = im_in->adf.nx; - int ny = im_in->adf.ny; + int nx = im_in->nx(); + int ny = im_in->ny(); im_out = new ImageFile (out_file, nx, ny); im_out->adf.fileCreate (); - ImageFileArray vIn = im_in->adf.getArray(); - ImageFileArray vOut = im_out->adf.getArray(); + ImageFileArray vIn = im_in->getArray(); + ImageFileArray vOut = im_out->getArray(); if (opt_invert) { for (ix = 0; ix < nx; ix++) @@ -193,11 +199,7 @@ if1_main (int argc, char *const argv[]) } im_out->adf.arrayDataWrite (); - for (int i = 0; i < im_in->adf.getNumLabels(); i++) { - Array2dFileLabel l; - im_in->adf.labelRead (l, i); - im_out->adf.labelAdd (l); - } + im_out->adf.labelsCopy (im_in->adf); im_out->adf.labelAdd (Array2dFileLabel::L_HISTORY, histString.c_str()); im_out->adf.fileClose (); }