X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=libctsim%2Ffilter.cpp;h=60f97c8e9b7f27319a3fc1a0dcb088f06e360b00;hb=23f5654dacb1952c15bda92c2606fae3a55e48ad;hp=23cd2268a1192768f96092fd4220b515a05395e1;hpb=df6c3115d39298e7a365be2513af758c3df44a93;p=ctsim.git diff --git a/libctsim/filter.cpp b/libctsim/filter.cpp index 23cd226..60f97c8 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.29 2000/11/22 07:38:52 kevin Exp $ +** $Id: filter.cpp,v 1.33 2001/01/02 16:02:13 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); }