X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fif-2.cpp;h=51fc23d97b5f08b1cf6cfec08c850af138667301;hp=6b9532be2d5d451cfc7de3925c107a903c9ad9c7;hb=4b16507e92bb80b09575b28bed66810e33d2681f;hpb=59ff52843f44bec1ecd1ad36625cdda305cc7ef8 diff --git a/src/if-2.cpp b/src/if-2.cpp index 6b9532b..51fc23d 100644 --- a/src/if-2.cpp +++ b/src/if-2.cpp @@ -1,31 +1,15 @@ /***************************************************************************** -** This is part of the CTSim program -** Copyright (C) 1983-2000 Kevin Rosenberg -** -** $Id: if-2.cpp,v 1.1 2000/06/07 07:43:19 kevin Exp $ -** $Log: if-2.cpp,v $ -** Revision 1.1 2000/06/07 07:43:19 kevin -** Converted to IF data files and C++ -** -** Revision 1.1 2000/06/07 02:29:05 kevin -** Initial C++ versions -** -** Revision 1.5 2000/05/24 22:50:04 kevin -** Added support for new SGP library +** FILE IDENTIFICATION ** -** Revision 1.4 2000/05/16 04:33:59 kevin -** Improved option processing -** -** Revision 1.3 2000/05/11 01:06:30 kevin -** Changed sprintf to snprintf -** -** Revision 1.2 2000/05/08 20:02:32 kevin -** ANSI C changes -** -** Revision 1.1.1.1 2000/04/28 13:02:44 kevin -** Initial CVS import for first public release +** Name: if-2.cpp +** Purpose: Manipulate two image files +** Programmer: Kevin Rosenberg +** Date Started: May 2000 ** +** This is part of the CTSim program +** Copyright (C) 1983-2000 Kevin Rosenberg ** +** $Id: if-2.cpp,v 1.3 2000/06/09 11:03:08 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 @@ -147,7 +131,7 @@ sdf2_main (int argc, char *const argv[]) ImageFile& im_in1 = *pim_in1; ImageFile& im_in2 = *pim_in2; - if (! im_in1.adf.fileRead() || ! im_in2.adf.fileRead()) { + if (! im_in1.fileRead() || ! im_in2.fileRead()) { sys_error (ERR_WARNING, "Error reading an image"); return (1); } @@ -164,7 +148,7 @@ sdf2_main (int argc, char *const argv[]) pim_out = new ImageFile (out_file, im_in1.nx(), im_in1.ny()); ImageFile& im_out = *pim_out; - if (! im_out.adf.fileCreate()) { + if (! im_out.fileCreate()) { sys_error (ERR_WARNING, "Could not open output file %s", out_file); return (1); } @@ -218,12 +202,12 @@ sdf2_main (int argc, char *const argv[]) fprintf(stdout, "Average Error = %f\n", abs_error); } - im_out.adf.arrayDataWrite(); - im_out.adf.labelsCopy (im_in1.adf, "if-2 file 1: "); - im_out.adf.labelsCopy (im_in2.adf, "if-2 file 2: "); - im_out.adf.labelAdd (Array2dFileLabel::L_HISTORY, strOperation.c_str()); + im_out.arrayDataWrite(); + im_out.labelsCopy (im_in1, "if-2 file 1: "); + im_out.labelsCopy (im_in2, "if-2 file 2: "); + im_out.labelAdd (Array2dFileLabel::L_HISTORY, strOperation.c_str()); - im_out.adf.fileClose(); + im_out.fileClose(); return (0); }