From efc79bd4b7deba9df501fccd39bc342f1329e6e6 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Sat, 13 Jan 2001 02:55:14 +0000 Subject: [PATCH] r386: no message --- ChangeLog | 11 +++++-- libctsim/procsignal.cpp | 73 +++-------------------------------------- msvc/ctsim/ctsim.plg | 20 +++++++---- src/views.cpp | 4 +-- 4 files changed, 28 insertions(+), 80 deletions(-) diff --git a/ChangeLog b/ChangeLog index b6ea15f..c6d86ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,14 +1,19 @@ 3.0.0alpha5 - Released - * ctsim: Changed default reconstruction filter generation - + * ctsim: Added EZPlotDialog, used by debugging plots in + procsignal.cpp + * ctsimtext: Fixed bugs for MSVC and with empty input lines - * views.cpp: Fixed bug in copying of labels from images to plotfiles + * views.cpp: Fixed bug in copying of labels from images to + plotfiles * syserror.cpp: fixed reporting for fatal errors * projections.cpp: fixed MSVC failure with std:: namespace + + * procsignal.cpp: fixed bug in equiangular reconstructions + for frequency/inverse-fourier filtering 3.0.0alpha4 - Released 1/09/01 diff --git a/libctsim/procsignal.cpp b/libctsim/procsignal.cpp index b717f80..155d894 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.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 @@ -297,10 +297,9 @@ ProcessSignal::init (const int idFilter, const int idFilterMethod, double dBandw } #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; @@ -365,8 +364,6 @@ ProcessSignal::init (const int idFilter, const int idFilterMethod, double dBandw } #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; @@ -408,68 +405,6 @@ ProcessSignal::init (const int idFilter, const int idFilterMethod, double dBandw dlgEZPlot.ShowModal(); } #endif - -#else - for (i = nSpatialPoints; i < m_nFilterPoints; i++) - adSpatialFilter[i] = 0; - - std::complex* acInverseFilter = new std::complex [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 } } diff --git a/msvc/ctsim/ctsim.plg b/msvc/ctsim/ctsim.plg index a652a60..deb8023 100644 --- a/msvc/ctsim/ctsim.plg +++ b/msvc/ctsim/ctsim.plg @@ -6,13 +6,13 @@ --------------------Configuration: libctsim - Win32 Debug--------------------

Command Lines

-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 @@ -44,7 +44,7 @@ Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1A2.tmp" with conten .\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"

Output Window

Compiling... procsignal.cpp @@ -53,7 +53,13 @@ Creating library... --------------------Configuration: ctsim - Win32 Debug--------------------

Command Lines

-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 @@ -69,8 +75,10 @@ comctl32.lib winmm.lib rpcrt4.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib w "\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"

Output Window

+Compiling... +views.cpp Linking... diff --git a/src/views.cpp b/src/views.cpp index f8efe44..c649a68 100644 --- a/src/views.cpp +++ b/src/views.cpp @@ -9,7 +9,7 @@ ** 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 @@ -2009,7 +2009,7 @@ ProjectionFileView::ProjectionFileView(void) 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; -- 2.34.1