X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=tools%2Fphm2if.cpp;h=e0ca9c81238e97137226410af2f2ed05bff77ab5;hp=afc579c3eacdccd75bdc1f1ecc83b1fe287ceb69;hb=9b2bb510160bdb56f04847f5b55ab61dd8a47976;hpb=b9dfe2d5cee6f08652541f3c5318f78d50314161 diff --git a/tools/phm2if.cpp b/tools/phm2if.cpp index afc579c..e0ca9c8 100644 --- a/tools/phm2if.cpp +++ b/tools/phm2if.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: phm2if.cpp,v 1.15 2000/12/16 07:28:25 kevin Exp $ +** $Id: phm2if.cpp,v 1.17 2001/01/02 05:34:57 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 @@ -50,7 +50,7 @@ static struct option my_options[] = {0, 0, 0, 0} }; -static const char* g_szIdStr = "$Id: phm2if.cpp,v 1.15 2000/12/16 07:28:25 kevin Exp $"; +static const char* g_szIdStr = "$Id: phm2if.cpp,v 1.17 2001/01/02 05:34:57 kevin Exp $"; void phm2if_usage (const char *program) @@ -195,7 +195,7 @@ phm2if_main (int argc, char* argv[]) #ifdef VERSION std::cout << "Version " << VERSION << std::endl << g_szIdStr << std::endl; #else - cerr << "Unknown version number\n"; + std::cerr << "Unknown version number\n"; #endif case O_HELP: case '?': @@ -208,7 +208,7 @@ phm2if_main (int argc, char* argv[]) } if (optPhmName == "" && optFilterName == "" && optPhmFilename == "") { - cerr << "No phantom defined\n" << std::endl; + std::cerr << "No phantom defined\n" << std::endl; phm2if_usage(argv[0]); return (1); } @@ -259,7 +259,7 @@ phm2if_main (int argc, char* argv[]) phm.createFromFile(optPhmFilename.c_str()); #ifdef HAVE_MPI if (mpiWorld.getRank() == 0) - cerr << "Can't use phantom from file in MPI mode\n"; + std::cerr << "Can't use phantom from file in MPI mode\n"; return (1); #endif } @@ -354,10 +354,11 @@ phm2if_main (int argc, char* argv[]) double dmin, dmax; int nscale; - printf ("Enter display size scale (nominal = 1): "); - scanf ("%d", &nscale); - printf ("Enter minimum and maximum densities (min, max): "); - scanf ("%lf %lf", &dmin, &dmax); + std::cout << "Enter display size scale (nominal = 1): "; + std::cin >> nscale; + std::cout ("Enter minimum and maximum densities (min, max): "; + std::cin >> dmin; + std::cin >> dmax; pImGlobal->displayScaling (nscale, dmin, dmax); } } @@ -406,9 +407,9 @@ main (int argc, char* argv[]) try { retval = phm2if_main(argc, argv); } catch (exception e) { - cerr << "Exception: " << e.what() << std::endl; + std::cerr << "Exception: " << e.what() << std::endl; } catch (...) { - cerr << "Unknown exception\n"; + std::cerr << "Unknown exception\n"; } return (retval);