r96: *** empty log message ***
[ctsim.git] / src / rs2if.cpp
index becedaeee69928a97d53d2f75cc17fb3ea5bcaa8..d82ee0997bd241447a825abea7788f77159fe2ac 100644 (file)
@@ -1,22 +1,15 @@
 /*****************************************************************************
-**  This is part of the CTSim program
-**  Copyright (C) 1983-2000 Kevin Rosenberg
-**
-**  $Id: rs2if.cpp,v 1.1 2000/06/07 02:29:05 kevin Exp $
-**  $Log: rs2if.cpp,v $
-**  Revision 1.1  2000/06/07 02:29:05  kevin
-**  Initial C++ versions
-**
-**  Revision 1.3  2000/05/16 04:33:59  kevin
-**  Improved option processing
+** FILE IDENTIFICATION
 **
-**  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:          rs2if.cpp
+**   Purpose:       Convert an projection data file to an image file
+**   Programmer:    Kevin Rosenberg
+**   Date Started:  April 2000
 **
+**  This is part of the CTSim program
+**  Copyright (C) 1983-2000 Kevin Rosenberg
 **
+**  $Id: rs2if.cpp,v 1.6 2000/06/15 19:07:10 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
@@ -56,7 +49,7 @@ static struct option my_options[] =
 void 
 rs2if_usage (const char *program)
 {
-  fprintf(stdout, "usage: %s in-rs-file out-if-file [OPTIONS]\n", kbasename(program));
+  fprintf(stdout, "usage: %s in-rs-file out-if-file [OPTIONS]\n", fileBasename(program));
   fprintf(stdout, "This program converts a raysum file to a IF file\n");
   fprintf(stdout, "\n");
   fprintf(stdout, "   --verbose   Verbose mode\n");
@@ -124,13 +117,13 @@ rs2if_main (const int argc, char *const argv[])
     {
       printf ("Number of detectors: %d\n", rs->ndet);
       printf ("    Number of views: %d\n", rs->nview);
-      printf ("             Remark: %s\n", rs->remark);
+      printf ("             Remark: %s\n", rs->remark.c_str());
     }
   
   im = new ImageFile (im_name, rs->ndet, rs->nview);
   
   detarray = detarray_alloc (rs->ndet);
-  ImageFileArray v = im->adf.getArray();
+  ImageFileArray v = im->getArray();
 
   for (iy = 0; iy < rs->nview; iy++)
     {
@@ -143,11 +136,11 @@ rs2if_main (const int argc, char *const argv[])
   detarray_free (detarray);
   raysum_close (rs);
 
-  im->adf.fileCreate ();
-  im->adf.arrayDataWrite ();
-  im->adf.labelAdd (Array2dFileLabel::L_HISTORY, rs->remark, rs->calctime);
-  im->adf.labelAdd (Array2dFileLabel::L_HISTORY, "Conversion from .rs to .idf");
-  im->adf.fileClose ();
+  im->fileCreate ();
+  im->arrayDataWrite ();
+  im->labelAdd (Array2dFileLabel::L_HISTORY, rs->remark.c_str(), rs->calctime);
+  im->labelAdd (Array2dFileLabel::L_HISTORY, "Conversion from .rs to .idf");
+  im->fileClose ();
   
   return(0);
 }