** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: imagefile.cpp,v 1.33 2001/01/02 16:02:13 kevin Exp $
+** $Id: imagefile.cpp,v 1.34 2001/01/04 21:28:41 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
}
void
-ImageFile::filterResponse (const char* const domainName, double bw, const char* const filterName, double filt_param, double dInputScale, double dOutputScale)
+ImageFile::getCenterCoordinates (unsigned int& iXCenter, unsigned int& iYCenter)
{
- ImageFileArray v = getArray();
- SignalFilter filter (filterName, domainName, bw, filt_param);
-
- int iXCenter, iYCenter;
if (isEven (m_nx))
iXCenter = m_nx / 2;
else
iXCenter = (m_nx - 1) / 2;
+
if (isEven (m_ny))
iYCenter = m_ny / 2;
else
iYCenter = (m_ny - 1) / 2;
+}
+
+
+void
+ImageFile::filterResponse (const char* const domainName, double bw, const char* const filterName, double filt_param, double dInputScale, double dOutputScale)
+{
+ ImageFileArray v = getArray();
+ SignalFilter filter (filterName, domainName, bw, filt_param);
+ unsigned int iXCenter, iYCenter;
+ getCenterCoordinates (iXCenter, iYCenter);
+
for (unsigned int ix = 0; ix < m_nx; ix++)
for (unsigned int iy = 0; iy < m_ny; iy++) {
long lD2 = ((ix - iXCenter) * (ix - iXCenter)) + ((iy - iYCenter) * (iy - iYCenter));