r121: *** empty log message ***
[ctsim.git] / src / phm2if.cpp
index 91d052107d6ad648acac62334e4d073998a12148..a6a7e260aa50ac75fe7ae9a00204c839c5d0ae3d 100644 (file)
@@ -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.15 2000/06/26 21:15:24 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
@@ -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;