r94: finished c++ conversions
[ctsim.git] / src / if-1.cpp
index bfdd9ddfd65bc9304fa0490894f7e883269773fa..3150cf9e6044c9a94a8f09f5b4bb19915b17647e 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: if-1.cpp,v 1.4 2000/06/08 16:43:10 kevin Exp $
+**  $Id: if-1.cpp,v 1.6 2000/06/13 16:20:31 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
@@ -49,7 +49,7 @@ static struct option my_options[] =
 void 
 if1_usage (const char *program)
 {
-  fprintf(stdout, "if1_usage: %s infile outfile [OPTIONS]\n", kbasename(program));
+  fprintf(stdout, "if1_usage: %s infile outfile [OPTIONS]\n", fileBasename(program));
   fprintf(stdout, "Generate a IF file from a IF file\n");
   fprintf(stdout, "\n");
   fprintf(stdout, "     --invert   Invert image\n");
@@ -136,11 +136,11 @@ if1_main (int argc, char *const argv[])
     int ix, iy;
 
     im_in = new ImageFile (in_file);
-    im_in->adf.fileRead ();
+    im_in->fileRead ();
     int nx = im_in->nx();
     int ny = im_in->ny();
     im_out = new ImageFile (out_file, nx, ny);
-    im_out->adf.fileCreate ();
+    im_out->fileCreate ();
 
     ImageFileArray vIn = im_in->getArray();
     ImageFileArray vOut = im_out->getArray();
@@ -176,10 +176,10 @@ if1_main (int argc, char *const argv[])
       histString = "Sqrt transformation";
     }
 
-    im_out->adf.arrayDataWrite ();
-    im_out->adf.labelsCopy (im_in->adf);
-    im_out->adf.labelAdd (Array2dFileLabel::L_HISTORY, histString.c_str());
-    im_out->adf.fileClose ();
+    im_out->arrayDataWrite ();
+    im_out->labelsCopy (*im_in);
+    im_out->labelAdd (Array2dFileLabel::L_HISTORY, histString.c_str());
+    im_out->fileClose ();
   }
 
   return (0);