X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fphm2if.cpp;h=afac8162d2ebe0fa0e4eaae64b52b67c8a3e150a;hb=6435258bbafabf9a4ce4445edfd97f771318eb6d;hp=91d052107d6ad648acac62334e4d073998a12148;hpb=08f34bf3ba14d4f436f4d2ef0ee5af1d6eb266ac;p=ctsim.git diff --git a/src/phm2if.cpp b/src/phm2if.cpp index 91d0521..afac816 100644 --- a/src/phm2if.cpp +++ b/src/phm2if.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: phm2if.cpp,v 1.14 2000/06/25 17:32:24 kevin Exp $ +** $Id: phm2if.cpp,v 1.16 2000/07/04 22:21:01 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 @@ -152,7 +152,7 @@ phm2if_main (int argc, char* argv[]) opt_debug = 1; break; case O_TRACE: - if ((opt_trace = opt_set_trace(optarg)) < 0) { + if ((opt_trace = convertTraceNameToID(optarg)) == TRACE_INVALID) { phm2if_usage(argv[0]); return (1); } @@ -236,7 +236,7 @@ phm2if_main (int argc, char* argv[]) } ostringstream oss; - oss << "nx=" << opt_nx << ", ny=" << opt_ny << ", nsample=" << opt_nsample << ", "; + oss << "phm2if: nx=" << opt_nx << ", ny=" << opt_ny << ", nsample=" << opt_nsample << ", "; if (opt_phmFileName != "") oss << "phantom=" << opt_phmFileName; else if (optPhmName != "") @@ -296,13 +296,11 @@ phm2if_main (int argc, char* argv[]) phm.createFromPhantom (optPhmName.c_str()); if (mpiWorld.getRank() == 0) { - imGlobal = new ImageFile (opt_outfile, opt_nx, opt_ny); - imGlobal->fileCreate(); + imGlobal = new ImageFile (opt_nx, opt_ny); } imLocal = new ImageFile (opt_nx, opt_ny); #else - imGlobal = new ImageFile (opt_outfile, opt_nx, opt_ny); - imGlobal->fileCreate (); + imGlobal = new ImageFile (opt_nx, opt_ny); #endif ImageFileArray v; @@ -348,10 +346,9 @@ phm2if_main (int argc, char* argv[]) if (mpiWorld.getRank() == 0) #endif { - imGlobal->arrayDataWrite (); double calctime = timerProgram.timerEnd (); imGlobal->labelAdd (Array2dFileLabel::L_HISTORY, opt_desc.c_str(), calctime); - imGlobal->fileClose (); + imGlobal->fileWrite (opt_outfile); if (opt_verbose) cout << "Time to rasterized phantom: " << calctime << " seconds" << endl;