** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: pj2if.cpp,v 1.2 2000/06/18 10:27:11 kevin Exp $
+** $Id: pj2if.cpp,v 1.5 2000/06/27 10:48:11 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
if (opt_verbose)
pj.printScanInfo();
- ImageFile im (im_name, pj.nDet(), pj.nView());
+ ImageFile im (pj.nDet(), pj.nView());
ImageFileArray v = im.getArray();
}
}
- im.fileCreate ();
- im.arrayDataWrite ();
- im.labelAdd (Array2dFileLabel::L_HISTORY, pj.remark(), pj.calcTime());
+ im.labelAdd (pj.getLabel());
im.labelAdd (Array2dFileLabel::L_HISTORY, "Conversion from .pj to .if");
- im.fileClose ();
+ im.fileWrite (im_name);
return(0);
}
int
main (const int argc, char *const argv[])
{
- return (pj2if_main(argc, argv));
+ int retval = 1;
+
+ try {
+ retval = pj2if_main(argc, argv);
+ } catch (exception e) {
+ cerr << "Exception: " << e.what() << endl;
+ } catch (...) {
+ cerr << "Unknown exception" << endl;
+ }
+
+ return (retval);
}
#endif