X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=libctsim%2Fprocsignal.cpp;h=67641fd52f5b306fde9469c25845c107bb749c07;hp=4fdefe6679e9fd16346259c8566ce8ebea0f510d;hb=7f8f356151b0c8db0dbbf1c1896cc22630d6c774;hpb=164b4cc282e33e4b5c04f5b89e5563e0046fa076 diff --git a/libctsim/procsignal.cpp b/libctsim/procsignal.cpp index 4fdefe6..67641fd 100644 --- a/libctsim/procsignal.cpp +++ b/libctsim/procsignal.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: procsignal.cpp,v 1.17 2001/01/12 14:14:58 kevin Exp $ +** $Id: procsignal.cpp,v 1.19 2001/01/12 16:41:56 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 @@ -27,6 +27,10 @@ #include "ct.h" +#ifdef HAVE_WXWINDOWS +#include "../src/dlgezplot.h" +#endif + // FilterMethod ID/Names const int ProcessSignal::FILTER_METHOD_INVALID = -1; const int ProcessSignal::FILTER_METHOD_CONVOLUTION = 0; @@ -351,16 +355,14 @@ ProcessSignal::init (const int idFilter, const int idFilterMethod, double dBandw SignalFilter filter (m_idFilter, m_dFilterMin, m_dFilterMax, nSpatialPoints, m_dBandwidth, m_dFilterParam, SignalFilter::DOMAIN_SPATIAL); filter.copyFilterData (adSpatialFilter, 0, nSpatialPoints); -#ifdef HAVE_SGP - EZPlot* pEZPlot = NULL; - if (pSGP && m_traceLevel >= Trace::TRACE_PLOT) { - pEZPlot = new EZPlot; - pEZPlot->ezset ("title Spatial Filter: Natural Order"); - pEZPlot->ezset ("ylength 0.50"); - pEZPlot->ezset ("yporigin 0.00"); - pEZPlot->addCurve (adSpatialFilter, nSpatialPoints); - pEZPlot->plot (pSGP); - delete pEZPlot; +#if defined(HAVE_WXWINDOWS) && defined(DEBUG) + EZPlotDialog pEZPlotDlg = NULL; + if (g_bRunningWXWindows && m_traceLevel > 0) { + pEZPlotDlg = new EZPlotDialog; + pEZPlot->getEZPlot()->ezset ("title Spatial Filter: Natural Order"); + pEZPlot->getEZPlot()->ezset ("ylength 0.50"); + pEZPlot->getEZPlot()->ezset ("yporigin 0.00"); + pEZPlot->getEZPlot()->addCurve (adSpatialFilter, nSpatialPoints); } #endif @@ -395,6 +397,9 @@ ProcessSignal::init (const int idFilter, const int idFilterMethod, double dBandw for (i = nSpatialPoints; i < m_nFilterPoints; i++) adSpatialFilter[i] = 0; +// for (i = 0; i < m_nFilterPoints; i++) +// adSpatialFilter[i] /= m_dSignalInc; + std::complex* acInverseFilter = new std::complex [m_nFilterPoints]; finiteFourierTransform (adSpatialFilter, acInverseFilter, m_nFilterPoints, FORWARD); delete adSpatialFilter; @@ -420,14 +425,14 @@ ProcessSignal::init (const int idFilter, const int idFilterMethod, double dBandw } #endif -#ifdef HAVE_SGP - if (pEZPlot && m_traceLevel >= Trace::TRACE_PLOT) { - pEZPlot->ezset ("title Spatial Filter: Inverse"); - pEZPlot->ezset ("ylength 0.50"); - pEZPlot->ezset ("yporigin 0.50"); - pEZPlot->addCurve (m_adFilter, m_nFilterPoints); - pEZPlot->plot (pSGP); - delete pEZPlot; +#if defined(HAVE_WXWINDOWS) && defined(DEBUG) + if (g_bRunningWXWindows && pEZPlotDlg && m_traceLevel > 0) { + pEZPlotDlg->getEZPlot()->ezset ("title Spatial Filter: Inverse"); + pEZPlotDlg->getEZPlot()->ezset ("ylength 0.50"); + pEZPlotDlg->getEZPlot()->ezset ("yporigin 0.50"); + pEZPlotDlg->getEZPlot()->addCurve (m_adFilter, m_nFilterPoints); + pEZPlotDlg->ShowModal(); + delete pEZPlotDlg; } #endif }