** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: procsignal.cpp,v 1.20 2001/01/12 21:53:27 kevin Exp $
+** $Id: procsignal.cpp,v 1.21 2001/01/13 02:55:14 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
}
#endif
- // This doesn't work: Need to add filtering for divergent geometries & Frequency/Direct filtering
- // Jan 2001: Direct seems to work for equilinear and equiangular
- // however, inverse_fourier doesn't work for equiangular on all versions of CTSim tested
- // Scaling is done with data in frequency space, natural order
+ // This works fairly well. I'm not sure why since scaling for geometries is done on
+ // frequency filter rather than spatial filter as it should be.
+ // It gives values slightly off than freq/inverse filtering
if (m_idGeometry == Scanner::GEOMETRY_EQUILINEAR) {
for (i = 0; i < m_nFilterPoints; i++)
m_adFilter[i] *= 0.5;
}
#endif
-#define PRE_JAN_2001 1
-#ifdef PRE_JAN_2001
if (m_idGeometry == Scanner::GEOMETRY_EQUILINEAR) {
for (i = 0; i < nSpatialPoints; i++)
adSpatialFilter[i] *= 0.5;
dlgEZPlot.ShowModal();
}
#endif
-
-#else
- for (i = nSpatialPoints; i < m_nFilterPoints; i++)
- adSpatialFilter[i] = 0;
-
- std::complex<double>* acInverseFilter = new std::complex<double> [m_nFilterPoints];
- finiteFourierTransform (adSpatialFilter, acInverseFilter, m_nFilterPoints, FORWARD);
- delete adSpatialFilter;
- m_adFilter = new double [m_nFilterPoints];
- for (i = 0; i < m_nFilterPoints; i++)
- m_adFilter[i] = std::abs(acInverseFilter[i]);
- delete acInverseFilter;
-
-#if defined(HAVE_WXWINDOWS) && (defined(DEBUG) || defined(_DEBUG))
- if (g_bRunningWXWindows && m_traceLevel > 0) {
- EZPlotDialog dlgEZPlot;
- dlgEZPlot.getEZPlot()->ezset ("title Inverse Spatial Filter: Fourier order");
- dlgEZPlot.getEZPlot()->addCurve (m_adFilter, m_nFilterPoints);
- dlgEZPlot.ShowModal();
- }
-#endif
- Fourier::shuffleFourierToNaturalOrder(m_adFilter, m_nFilterPoints);
-#if defined(HAVE_WXWINDOWS) && (defined(DEBUG) || defined(_DEBUG))
- if (g_bRunningWXWindows && m_traceLevel > 0) {
- EZPlotDialog dlgEZPlot;
- dlgEZPlot.getEZPlot()->ezset ("title Inverse Spatial Filter: Natural order");
- dlgEZPlot.getEZPlot()->addCurve (m_adFilter, m_nFilterPoints);
- dlgEZPlot.ShowModal();
- }
-#endif
- if (m_idGeometry == Scanner::GEOMETRY_EQUILINEAR) {
- for (i = 0; i < m_nFilterPoints; i++)
- m_adFilter[i] *= 0.5;
- } else if (m_idGeometry == Scanner::GEOMETRY_EQUIANGULAR) {
- for (i = 0; i < m_nFilterPoints; i++) {
- int iDetFromZero = i - ((m_nFilterPoints - 1) / 2);
- if (abs(iDetFromZero) < m_nSignalPoints) {
- double sinScale = 1 / SignalFilter::sinc (iDetFromZero * m_dSignalInc);
- double dScale = 0.5 * sinScale * sinScale;
- m_adFilter[i] *= dScale;
- }
- }
- }
-#if defined(HAVE_WXWINDOWS) && (defined(DEBUG) || defined(_DEBUG))
- if (g_bRunningWXWindows && m_traceLevel > 0) {
- EZPlotDialog dlgEZPlot;
- dlgEZPlot.getEZPlot()->ezset ("title Scaled Inverse Spatial Filter: Natural order");
- dlgEZPlot.getEZPlot()->addCurve (m_adFilter, m_nFilterPoints);
- dlgEZPlot.ShowModal();
- }
-#endif
- Fourier::shuffleNaturalToFourierOrder(m_adFilter, m_nFilterPoints);
-#endif
-
-#if defined(HAVE_WXWINDOWS) && (defined(DEBUG) || defined(_DEBUG))
- if (g_bRunningWXWindows && m_traceLevel > 0) {
- EZPlotDialog dlgEZPlot;
- dlgEZPlot.getEZPlot()->ezset ("title Spatial Filter Inverse Post Geometry Filtering");
- dlgEZPlot.getEZPlot()->addCurve (m_adFilter, m_nFilterPoints);
- dlgEZPlot.ShowModal();
- }
-#endif
}
}
--------------------Configuration: libctsim - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1A1.tmp" with contents
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1B7.tmp" with contents
[
/nologo /G6 /MTd /W3 /Gm /GR /GX /ZI /Od /I "..\..\..\zlib" /I "..\..\INCLUDE" /I "..\..\getopt" /I "..\..\..\lpng108" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /I "..\..\..\wx2\include" /D "_DEBUG" /D "HAVE_WXWIN" /D "HAVE_STRING_H" /D "HAVE_GETOPT_H" /D "WIN32" /D "_MBCS" /D "_LIB" /D "MSVC" /D "HAVE_FFTW" /D "HAVE_PNG" /D "HAVE_SGP" /D "HAVE_WXWINDOWS" /D "__WXMSW__" /FR"Debug/" /Fp"Debug/libctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
"C:\ctsim\libctsim\procsignal.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1A1.tmp"
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1A2.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1B7.tmp"
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1B8.tmp" with contents
[
/nologo /out:"Debug\libctsim.lib"
.\Debug\array2dfile.obj
.\Debug\transformmatrix.obj
.\Debug\xform.obj
]
-Creating command line "link.exe -lib @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1A2.tmp"
+Creating command line "link.exe -lib @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1B8.tmp"
<h3>Output Window</h3>
Compiling...
procsignal.cpp
--------------------Configuration: ctsim - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1A3.tmp" with contents
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1B9.tmp" with contents
+[
+/nologo /G6 /MTd /W3 /Gm /GR /GX /ZI /Od /I "\wx2\include" /I "." /I "..\..\include" /I "..\..\getopt" /I "..\..\..\lpng108" /I "..\..\..\zlib" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /D VERSION=\"2.5.0\" /D "_DEBUG" /D "__WXMSW__" /D "HAVE_SGP" /D "HAVE_PNG" /D "HAVE_WXWINDOWS" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "HAVE_STRING_H" /D "HAVE_FFTW" /D "HAVE_RFFTW" /D "HAVE_GETOPT_H" /D "MSVC" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D CTSIMVERSION=\"3.0.0beta1\" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
+"C:\ctsim\src\views.cpp"
+]
+Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1B9.tmp"
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1BA.tmp" with contents
[
comctl32.lib winmm.lib rpcrt4.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../libctsim/Debug/libctsim.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\..\lpng108\msvc\win32\libpng\lib_dbg\libpng.lib ..\..\..\lpng108\msvc\win32\zlib\lib_dbg\zlib.lib libcmtd.lib ..\..\..\fftw-2.1.3\Win32\FFTW2st\Debug\FFTW2st.lib ..\..\..\fftw-2.1.3\Win32\RFFTW2st\Debug\RFFTW2st.lib ../../../wx2/lib/wxd.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/ctsim.pdb" /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrtd.lib" /out:"Debug/ctsim.exe" /pdbtype:sept /libpath:"..\..\..\lpng108\msvc\win32\libpng\lib" /libpath:"..\..\..\lpng108\msvc\win32\zlib\lib"
.\Debug\ctsim.obj
"\fftw-2.1.3\Win32\RFFTW2st\Debug\RFFTW2st.lib"
\wx2\lib\wxd.lib
]
-Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1A3.tmp"
+Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1BA.tmp"
<h3>Output Window</h3>
+Compiling...
+views.cpp
Linking...
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: views.cpp,v 1.60 2001/01/12 21:53:27 kevin Exp $
+** $Id: views.cpp,v 1.61 2001/01/13 02:55:14 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
m_dDefaultFilterParam = 1.;
#if HAVE_FFTW
m_iDefaultFilterMethod = ProcessSignal::FILTER_METHOD_RFFTW;
- m_iDefaultFilterGeneration = ProcessSignal::FILTER_GENERATION_DIRECT;
+ m_iDefaultFilterGeneration = ProcessSignal::FILTER_GENERATION_INVERSE_FOURIER;
#else
m_iDefaultFilterMethod = ProcessSignal::FILTER_METHOD_CONVOLUTION;
m_iDefaultFilterGeneration = ProcessSignal::FILTER_GENERATION_DIRECT;