X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tools%2Fphm2pj.cpp;h=a2b30216b7645624143b23b93ae662ace4f44b3c;hb=980bef9b95bef1ab728634181a5672088fd47066;hp=c465210f48ad51d9eddaa5ee4ff8faf6a437fdba;hpb=27a474e0622ebb7229fd5705552021f63d8f932d;p=ctsim.git diff --git a/tools/phm2pj.cpp b/tools/phm2pj.cpp index c465210..a2b3021 100644 --- a/tools/phm2pj.cpp +++ b/tools/phm2pj.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: phm2pj.cpp,v 1.2 2000/07/20 11:17:31 kevin Exp $ +** $Id: phm2pj.cpp,v 1.6 2000/07/31 14:48:35 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 @@ -88,7 +88,7 @@ int phm2pj_main (int argc, char* argv[]) { Phantom phm; - string optGeometryName = Scanner::GEOMETRY_PARALLEL_STR; + string optGeometryName = Scanner::convertGeometryIDToName(Scanner::GEOMETRY_PARALLEL); char *opt_outfile = NULL; string opt_desc; string optPhmFileName; @@ -96,7 +96,7 @@ phm2pj_main (int argc, char* argv[]) int opt_nview; int opt_nray = 1; int opt_trace = 0; - string optPhmName = Phantom::PHM_HERMAN_STR; + string optPhmName (Phantom::convertPhantomIDToName(Phantom::PHM_HERMAN)); int opt_verbose = 0; int opt_debug = 0; double opt_rotangle = 1; @@ -285,7 +285,24 @@ phm2pj_main (int argc, char* argv[]) #else Projections pjGlobal (scanner); - scanner.collectProjections (pjGlobal, phm, 0, opt_trace); + + SGPDriver* pSGPDriver = NULL; + SGP* pSGP = NULL; + + if (opt_trace >= TRACE_PHM) { + pSGPDriver = new SGPDriver ("phm2pj", 600, 600); + pSGP = new SGP (*pSGPDriver); + } + + scanner.collectProjections (pjGlobal, phm, 0, opt_trace, pSGP); + + if (opt_trace >= TRACE_PHM) { + cout << "Press enter to continue\n"; + cio_kb_getc(); + delete pSGP; pSGP = NULL; + delete pSGPDriver; pSGPDriver = NULL; + } + #endif #ifdef HAVE_MPI @@ -358,6 +375,9 @@ main (int argc, char* argv[]) try { retval = phm2pj_main(argc, argv); +#if HAVE_DMALLOC + // dmalloc_shutdown(); +#endif } catch (exception e) { cerr << "Exception: " << e.what() << endl; } catch (...) {