X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=libctsim%2Fimagefile.cpp;h=cc7e23489af837a9b99ef30f9f42369abce3b090;hp=c21c17f6858facaa7114cd9a92e90b9667dbc35b;hb=6098e67c0181cfe3a60f59fca5cecae9bfa43c97;hpb=05eec54adcba8e2b7a8cdb4599de45ae131e1706 diff --git a/libctsim/imagefile.cpp b/libctsim/imagefile.cpp index c21c17f..cc7e234 100644 --- 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 ** -** $Id: imagefile.cpp,v 1.31 2001/01/02 08:15:02 kevin Exp $ +** $Id: imagefile.cpp,v 1.32 2001/01/02 10:23:46 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 @@ -89,7 +89,6 @@ ImageFile::filterResponse (const char* const domainName, double bw, const char* ImageFileArray v = getArray(); SignalFilter filter (filterName, domainName, bw, filt_param); -#if 1 int iXCenter, iYCenter; if (isEven (m_nx)) iXCenter = m_nx / 2; @@ -106,18 +105,6 @@ ImageFile::filterResponse (const char* const domainName, double bw, const char* double r = ::sqrt (static_cast(lD2)) * dInputScale; v[ix][iy] = filter.response (r) * dOutputScale; } -#else - int hx = (m_nx - 1) / 2; - int hy = (m_ny - 1) / 2; - - for (int i = -hx; i <= hx; i++) { - for (int j = -hy; j <= hy; j++) { - double r = ::sqrt (i * i + j * j); - - v[i+hx][j+hy] = filter.response (r); - } - } -#endif } int @@ -1255,8 +1242,8 @@ ImageFile::writeImagePNG (const char* const outfile, int bitdepth, int nxcell, i rowp[p] = outval; else { int rowpos = p * 2; - rowp[rowpos] = (outval >> 8) & 0xFF; - rowp[rowpos+1] = (outval & 0xFF); + rowp[rowpos+1] = (outval >> 8) & 0xFF; + rowp[rowpos] = (outval & 0xFF); } } }