projects
/
ctsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r310: plotfile updates
[ctsim.git]
/
libctsim
/
imagefile.cpp
diff --git
a/libctsim/imagefile.cpp
b/libctsim/imagefile.cpp
index d4c973cc3a4a1aeeb1f7be4054c9f9ade7f581ff..b86ff794ae9cd0242201c21e33184bca9c513e3f 100644
(file)
--- a/
libctsim/imagefile.cpp
+++ b/
libctsim/imagefile.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: imagefile.cpp,v 1.2
2 2000/12/20 20:08:4
8 kevin Exp $
+** $Id: imagefile.cpp,v 1.2
3 2000/12/21 03:40:5
8 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
@@
-233,13
+233,15
@@
ImageFile::statistics (double& min, double& max, double& mean, double& mode, dou
if (v == NULL || nx == 0 || ny == 0)
return;
\r
if (v == NULL || nx == 0 || ny == 0)
return;
\r
- std::vector<double> vecImage (nx * ny);
\r
+ std::vector<double> vecImage;
\r
+ int iVec = 0;
\r
+ vecImage.resize (nx * ny);
\r
for (int ix = 0; ix < nx; ix++) {
\r
for (int iy = 0; iy < ny; iy++)
\r
for (int ix = 0; ix < nx; ix++) {
\r
for (int iy = 0; iy < ny; iy++)
\r
- vecImage
.push_back (v[ix][iy])
;
\r
+ vecImage
[iVec++] = v[ix][iy]
;
\r
}
\r
\r
}
\r
\r
- vectorNumericStatistics (vecImage, min, max, mean, mode, median, stddev);
\r
+ vectorNumericStatistics (vecImage,
nx * ny,
min, max, mean, mode, median, stddev);
\r
}
}