X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fif-1.cpp;h=8d2330c9cec89809f46752dc3cfe69fb973104d5;hp=b28ac181baad166d2cbf481ff4cc072d59694fa5;hb=59ff52843f44bec1ecd1ad36625cdda305cc7ef8;hpb=2ab37d1cdf6caa543510f370cbeb3749d0d61fe0 diff --git a/src/if-1.cpp b/src/if-1.cpp index b28ac18..8d2330c 100644 --- a/src/if-1.cpp +++ b/src/if-1.cpp @@ -2,8 +2,11 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: if-1.cpp,v 1.2 2000/06/07 03:50:27 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 *** ** @@ -156,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++) @@ -196,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 (); }