r520: no message
[ctsim.git] / tools / phm2pj.cpp
index f32f5c57cb7422c4273a6a940242dda9483464f6..687c2906ca1fc3b82355c16f84d1f0a99b0f19d6 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: phm2pj.cpp,v 1.24 2001/02/08 06:25:07 kevin Exp $
+**  $Id: phm2pj.cpp,v 1.25 2001/02/11 04:56:38 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
@@ -51,7 +51,7 @@ static struct option phm2pj_options[] =
   {0, 0, 0, 0}
 };
 
-static const char* g_szIdStr = "$Id: phm2pj.cpp,v 1.24 2001/02/08 06:25:07 kevin Exp $";
+static const char* g_szIdStr = "$Id: phm2pj.cpp,v 1.25 2001/02/11 04:56:38 kevin Exp $";
 
 
 void 
@@ -72,7 +72,7 @@ phm2pj_usage (const char *program)
   std::cout << "     --desc           Description of raysum\n";
   std::cout << "     --nray           Number of rays per detector (default = 1)\n";
   std::cout << "     --rotangle       Degrees to rotate view through (multiple of PI)\n";
-  std::cout << "                      (default = 1)\n";
+  std::cout << "                      (default = select appropriate for geometry)\n";
   std::cout << "     --geometry       Geometry of scanning\n";
   std::cout << "        parallel      Parallel scan beams (default)\n";
   std::cout << "        equilinear    Equilinear divergent scan beams\n";
@@ -118,7 +118,7 @@ phm2pj_main (int argc, char* const argv[])
   int opt_trace = Trace::TRACE_NONE;
   int opt_verbose = 0;
   int opt_debug = 0;
-  double opt_rotangle = 1;
+  double opt_rotangle = -1;
   char* endptr = NULL;
   char* endstr;
 
@@ -251,6 +251,13 @@ phm2pj_main (int argc, char* const argv[])
       return (1);
     }
 
+    if (opt_rotangle < 0) {
+      if (optGeometryName.compare ("parallel") == 0)
+        opt_rotangle = 1;
+      else
+        opt_rotangle = 2;
+    }
+
     std::ostringstream desc;
     desc << "phm2pj: NDet=" << opt_ndet << ", Nview=" << opt_nview << ", NRay=" << opt_nray << ", RotAngle=" << opt_rotangle << ", Geometry=" << optGeometryName << ", ";
     if (optPhmFileName.length()) {