- if (m_traceLevel >= TRACE_PLOT) {
- SGPDriver sgpDriver ("Spatial Filter: Natural Order");
- SGP sgp (sgpDriver);
- EZPlot ezplot (sgp);
-
- ezplot.ezset ("title Spatial Filter: Natural Order");
- ezplot.addCurve (adSpatialFilter, nSpatialPoints);
- ezplot.plot();
- cio_put_str ("Press any key to continue");
- cio_kb_getc ();
+ EZPlot* pEZPlot = NULL;
+ if (pSGP && m_traceLevel >= Trace::TRACE_PLOT) {
+ pEZPlot = new EZPlot (*pSGP);
+ pEZPlot->ezset ("title Spatial Filter: Natural Order");
+ pEZPlot->ezset ("ylength 0.50");
+ pEZPlot->ezset ("yporigin 0.00");
+ pEZPlot->addCurve (adSpatialFilter, nSpatialPoints);
+ pEZPlot->plot();
+ delete pEZPlot;
+ }
+ if (m_idGeometry == Scanner::GEOMETRY_EQUILINEAR) {
+ for (int i = 0; i < m_nFilterPoints; i++)
+ adSpatialFilter[i] *= 0.5;
+ } else if (m_idGeometry == Scanner::GEOMETRY_EQUIANGULAR) {
+ for (int i = 0; i < m_nFilterPoints; i++) {
+ int iDetFromZero = i - ((m_nFilterPoints - 1) / 2);
+ double sinScale = sin (iDetFromZero * m_dSignalInc);
+ if (fabs(sinScale) < 1E-7)
+ sinScale = 1;
+ else
+ sinScale = (iDetFromZero * m_dSignalInc) / sinScale;
+ double dScale = 0.5 * sinScale * sinScale;
+ adSpatialFilter[i] *= dScale;
+ }