X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=libctsim%2Ffilter.cpp;h=5a4b0ef5fdccb6889b8b5012fb11a474c9f93630;hp=ef479387aa99b1b55964ada39e1d1bd5e38a6ce9;hb=806adf54f5b8d061662696b3b498bfab3cd8b2e6;hpb=2fc7d45c0575dcbfe7bf5cf660034d99db1b983a diff --git a/libctsim/filter.cpp b/libctsim/filter.cpp index ef47938..5a4b0ef 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.31 2000/11/28 14:54:29 kevin Exp $ +** $Id: filter.cpp,v 1.32 2000/12/04 19:50:57 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 @@ -364,12 +364,13 @@ SignalFilter::spatialResponseCalc (int filterID, double bw, double x, double par double zinc = (zmax - zmin) / (n - 1); double z = zmin; - double q [n]; + double* q = new double [n]; for (int i = 0; i < n; i++, z += zinc) q[i] = frequencyResponse (filterID, bw, z, param) * cos (TWOPI * z * x); double y = 2 * integrateSimpson (zmin, zmax, q, n); - + delete q; + return (y); }