X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fctrec.cpp;fp=src%2Fctrec.cpp;h=586f2b65744dbf41863ca77667c2a6bfd01fa6c2;hp=c9c3ead1f20c3ec1df854945278d9d27b9fd888c;hb=b5857e74e5735455b5ef11cbea5044ae7b2e8a0d;hpb=4ff5096195e60f80c985d5762d74329406ffa21a diff --git a/src/ctrec.cpp b/src/ctrec.cpp index c9c3ead..586f2b6 100644 --- a/src/ctrec.cpp +++ b/src/ctrec.cpp @@ -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;