X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fif-1.cpp;h=3150cf9e6044c9a94a8f09f5b4bb19915b17647e;hb=f4a23943110823118f35756dd41fbd6707f04511;hp=8d2330c9cec89809f46752dc3cfe69fb973104d5;hpb=59ff52843f44bec1ecd1ad36625cdda305cc7ef8;p=ctsim.git diff --git a/src/if-1.cpp b/src/if-1.cpp index 8d2330c..3150cf9 100644 --- a/src/if-1.cpp +++ b/src/if-1.cpp @@ -1,37 +1,15 @@ /***************************************************************************** -** This is part of the CTSim program -** Copyright (C) 1983-2000 Kevin Rosenberg -** -** $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 -** -** Revision 1.6 2000/05/24 22:50:04 kevin -** Added support for new SGP library +** FILE IDENTIFICATION ** -** Revision 1.5 2000/05/16 04:33:59 kevin -** Improved option processing -** -** Revision 1.4 2000/05/09 14:52:27 kevin -** added sqr and sqrt functions -** -** Revision 1.3 2000/05/08 20:02:32 kevin -** ANSI C changes -** -** Revision 1.2 2000/05/03 08:49:50 kevin -** Code cleanup -** -** Revision 1.1.1.1 2000/04/28 13:02:44 kevin -** Initial CVS import for first public release +** Name: if-1.cpp +** Purpose: Manipulate a single image file +** Programmer: Kevin Rosenberg +** Date Started: Aug 1984 ** +** This is part of the CTSim program +** Copyright (C) 1983-2000 Kevin Rosenberg ** +** $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 @@ -71,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"); @@ -158,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(); @@ -198,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);