r348: fix linefeed problem
[ctsim.git] / libctsim / filter.cpp
index 097a1f30e46a2722aba52ad00c188a6ed5676702..60f97c8e9b7f27319a3fc1a0dcb088f06e360b00 100644 (file)
@@ -1,4 +1,3 @@
-#include "complex"
 /*****************************************************************************
 ** File IDENTIFICATION
 ** 
@@ -10,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: filter.cpp,v 1.30 2000/11/28 14:54:07 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
@@ -365,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);
 }