X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=libctsim%2Ffilter.cpp;h=84d2e7b4e080f877d9d162973d548e70131be084;hb=980bef9b95bef1ab728634181a5672088fd47066;hp=544afecbb8074ec5de18466d2490b99d5219d167;hpb=081b06d3a3372e5db56755c1fe5b2af9f8c189f3;p=ctsim.git diff --git a/libctsim/filter.cpp b/libctsim/filter.cpp index 544afec..84d2e7b 100644 --- a/libctsim/filter.cpp +++ b/libctsim/filter.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: filter.cpp,v 1.22 2000/07/23 01:49:03 kevin Exp $ +** $Id: filter.cpp,v 1.23 2000/07/31 14:48:35 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 @@ -317,11 +317,16 @@ SignalFilter::init (const int filterID, const int filterMethodID, double bw, dou } else if (m_idDomain == DOMAIN_SPATIAL) { double x; int i; - for (x = m_filterMin, i = 0; i < m_nFilterPoints; x += m_filterInc, i++) + for (x = m_filterMin, i = 0; i < m_nFilterPoints; x += m_filterInc, i++) { if (haveAnalyticSpatial(m_idFilter)) m_vecFilter[i] = spatialResponseAnalytic (x, m_filterParam); else m_vecFilter[i] = spatialResponseCalc (x, m_filterParam); +#if LIMIT_BANDWIDTH_TRIAL + if (i < m_nFilterPoints / 4 || i > (m_nFilterPoints * 3) / 4) + m_vecFilter[i] = 0; +#endif + } } else { m_failMessage = "Illegal domain name "; m_failMessage += m_idDomain;