** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: phm2pj.cpp,v 1.11 2000/08/27 20:32:55 kevin Exp $
+** $Id: phm2pj.cpp,v 1.15 2000/11/24 12:04:44 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
{0, 0, 0, 0}
};
-static const char* g_szIdStr = "$Id: phm2pj.cpp,v 1.11 2000/08/27 20:32:55 kevin Exp $";
+static const char* g_szIdStr = "$Id: phm2pj.cpp,v 1.15 2000/11/24 12:04:44 kevin Exp $";
void
cout << " --nray Number of rays per detector (default = 1)\n";
cout << " --rotangle Degrees to rotate view through (multiple of PI)\n";
cout << " (default = 1)\n";
+ cout << " --geometry Geometry of scanning\n";
+ cout << " parallel Parallel scan beams (1st generation)\n";
+ cout << " equilinear Equilinear divergent scan beams\n";
+ cout << " equiangular Equiangular divergent scan beams\n";
cout << " --focal-length Focal length ratio (ratio to radius of phantom)\n";
cout << " (default = 1)\n";
cout << " --field-of-view Field of view (ratio to diameter of phantom square)\n";
string optGeometryName = Scanner::convertGeometryIDToName(Scanner::GEOMETRY_PARALLEL);
char *opt_outfile = NULL;
string opt_desc;
+ string optPhmName;
string optPhmFileName;
int opt_ndet;
int opt_nview;
double dOptFocalLength = 1.;
double dOptFieldOfView = 1.;
int opt_trace = Trace::TRACE_NONE;
- string optPhmName (Phantom::convertPhantomIDToName(Phantom::PHM_HERMAN));
int opt_verbose = 0;
int opt_debug = 0;
double opt_rotangle = 1;
}
ostringstream desc;
- desc << "phm2pj: NDet=" << opt_ndet << ", Nview=" << opt_nview << ", NRay=" << opt_nray << ", RotAngle=" << opt_rotangle << ", ";
+ desc << "phm2pj: NDet=" << opt_ndet << ", Nview=" << opt_nview << ", NRay=" << opt_nray << ", RotAngle=" << opt_rotangle << ", Geometry=" << optGeometryName << ", ";
if (optPhmFileName.length()) {
desc << "PhantomFile=" << optPhmFileName;
} else if (optPhmName != "") {
if (mpiWorld.getRank() == 0)
pjGlobal.initFromScanner (scanner);
- if (opt_verbose)
- pjGlobal.printScanInfo();
+ if (opt_verbose) {
+ ostringstream os;
+ pjGlobal.printScanInfo(os);
+ cout << os.str();
+ }
Projections pjLocal (scanner);
pjLocal.setNView (mpiWorld.getMyLocalWorkUnits());
if (opt_verbose) {
phm.print();
cout << endl;
- pjGlobal.printScanInfo();
- cout << endl;
+ ostringstream os;
+ pjGlobal.printScanInfo (os);
+ cout << os.str() << endl;
cout << " Remark: " << pjGlobal.remark() << endl;
cout << "Run time: " << pjGlobal.calcTime() << " seconds\n";
}