projects
/
ctsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r126: *** empty log message ***
[ctsim.git]
/
src
/
if-1.cpp
diff --git
a/src/if-1.cpp
b/src/if-1.cpp
index f85a269176bcfd981eb369adbffca8beca75b4e2..b1d352bb5e994a43a3eb315719fc0a841a535613 100644
(file)
--- a/
src/if-1.cpp
+++ b/
src/if-1.cpp
@@
-9,7
+9,7
@@
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: if-1.cpp,v 1.
7 2000/06/18 10:27:11
kevin Exp $
+** $Id: if-1.cpp,v 1.
9 2000/06/26 21:15:24
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
**
** 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
@@
-135,12
+135,11
@@
if1_main (int argc, char *const argv[])
if (opt_invert || opt_log || opt_exp || opt_sqr || opt_sqrt) {
int ix, iy;
if (opt_invert || opt_log || opt_exp || opt_sqr || opt_sqrt) {
int ix, iy;
- im_in = new ImageFile (
in_file
);
- im_in->fileRead ();
+ im_in = new ImageFile ();
+ im_in->fileRead (
in_file
);
int nx = im_in->nx();
int ny = im_in->ny();
int nx = im_in->nx();
int ny = im_in->ny();
- im_out = new ImageFile (out_file, nx, ny);
- im_out->fileCreate ();
+ im_out = new ImageFile (nx, ny);
ImageFileArray vIn = im_in->getArray();
ImageFileArray vOut = im_out->getArray();
ImageFileArray vIn = im_in->getArray();
ImageFileArray vOut = im_out->getArray();
@@
-176,10
+175,9
@@
if1_main (int argc, char *const argv[])
histString = "Sqrt transformation";
}
histString = "Sqrt transformation";
}
- im_out->arrayDataWrite ();
im_out->labelsCopy (*im_in);
im_out->labelAdd (Array2dFileLabel::L_HISTORY, histString.c_str());
im_out->labelsCopy (*im_in);
im_out->labelAdd (Array2dFileLabel::L_HISTORY, histString.c_str());
- im_out->file
Close (
);
+ im_out->file
Write (out_file
);
}
return (0);
}
return (0);
@@
-189,7
+187,17
@@
if1_main (int argc, char *const argv[])
int
main (int argc, char *const argv[])
{
int
main (int argc, char *const argv[])
{
- return (if1_main(argc, argv));
+ int retval = 1;
+
+ try {
+ retval = if1_main(argc, argv);
+ } catch (exception e) {
+ cerr << "Exception: " << e.what() << endl;
+ } catch (...) {
+ cerr << "Unknown exception" << endl;
+ }
+
+ return (retval);
}
#endif
}
#endif