r96: *** empty log message ***
[ctsim.git] / src / ctrec.cpp
index c9c3ead1f20c3ec1df854945278d9d27b9fd888c..586f2b65744dbf41863ca77667c2a6bfd01fa6c2 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ctrec.cpp,v 1.8 2000/06/13 16:20:31 kevin Exp $
+**  $Id: ctrec.cpp,v 1.9 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
@@ -106,7 +106,7 @@ ctrec_main (int argc, char * argv[])
   ImageFile *imGlobal = NULL;
   RAYSUM *rsGlobal = NULL;
   char *rs_name, *im_filename = NULL;
-  char remark[MAXREMARK];
+  string remark;
   char filt_name[80];
   char *endptr;
   int opt_verbose = 0;
@@ -211,8 +211,9 @@ ctrec_main (int argc, char * argv[])
     else
       snprintf (filt_name, sizeof(filt_name), "%s", name_of_filter (opt_filter));
   
-    snprintf (remark, sizeof(remark), "Reconstruct: %dx%d, %s, %s, %s",
-            nx, ny, filt_name, name_of_interpolation (opt_interp), name_of_backproj(opt_backproj));
+    ostringstream label;
+    label << "Reconstruct: " << nx << "x" << ny << ", " << filt_name << ", " << name_of_interpolation (opt_interp) << ", " << name_of_backproj(opt_backproj);
+    remark = label.str();
   
     if (opt_verbose)
       cout << "Remark: " << remark << endl;
@@ -304,8 +305,8 @@ ctrec_main (int argc, char * argv[])
       raysum_close (rsGlobal);
       double calctime = timerProgram.timerEnd();
       imGlobal->arrayDataWrite ();
-      imGlobal->labelAdd (Array2dFileLabel::L_HISTORY, rsGlobal->remark, rsGlobal->calctime);
-      imGlobal->labelAdd (Array2dFileLabel::L_HISTORY, remark, calctime);
+      imGlobal->labelAdd (Array2dFileLabel::L_HISTORY, rsGlobal->remark.c_str(), rsGlobal->calctime);
+      imGlobal->labelAdd (Array2dFileLabel::L_HISTORY, remark.c_str(), calctime);
       imGlobal->fileClose ();
       if (opt_verbose)
        cout << "Run time: " << calctime << " seconds" << endl;