3.0.0alpha5 - Released
+ * ctsim: Changed default reconstruction filter generation
+
* ctsimtext: Fixed bugs for MSVC and with empty input lines
* syserror.cpp: fixed reporting for fatal errors
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: filter.cpp,v 1.33 2001/01/02 16:02:13 kevin Exp $
+** $Id: filter.cpp,v 1.34 2001/01/12 03:49:07 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
}
-/* NAME
- * sinc Return sin(x)/x function
- *
- * SYNOPSIS
- * v = sinc (x, mult)
- * double v sinc value
- * double x, mult
- *
- * DESCRIPTION
- * v = sin(x * mult) / x;
- */
+// Functions that are inline in filter.h
+
+
+// sinc Return sin(x)/x function
+// v = sinc (x, mult)
+// Calculates sin(x * mult) / x;
+
+// integral_abscos Returns integral of u*cos(u)
+//
+// q = integral_abscos (u, w)
+// double q Integral value
+// double u Integration variable
+// double w Upper integration boundary
+// Returns the value of integral of u*cos(u)*dV for V = 0 to w
-/* NAME
- * integral_abscos Returns integral of u*cos(u)
- *
- * SYNOPSIS
- * q = integral_abscos (u, w)
- * double q Integral value
- * double u Integration variable
- * double w Upper integration boundary
- *
- * DESCRIPTION
- * Returns the value of integral of u*cos(u)*dV for V = 0 to w
- */
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: procsignal.cpp,v 1.14 2001/01/02 16:02:13 kevin Exp $
+** $Id: procsignal.cpp,v 1.15 2001/01/12 03:49:07 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
// CLASS IDENTIFICATION
// ProcessSignal
//
-ProcessSignal::ProcessSignal (const char* szFilterName, const char* szFilterMethodName, double dBandwidth, double dSignalIncrement, int nSignalPoints, double dFilterParam, const char* szDomainName, const char* szFilterGenerationName, int iZeropad, int iPreinterpolationFactor, int iTraceLevel, int iGeometry, double dFocalLength, SGP* pSGP)
+ProcessSignal::ProcessSignal (const char* szFilterName, const char* szFilterMethodName, double dBandwidth,
+ double dSignalIncrement, int nSignalPoints, double dFilterParam, const char* szDomainName,
+ const char* szFilterGenerationName, int iZeropad, int iPreinterpolationFactor, int iTraceLevel,
+ int iGeometry, double dFocalLength, SGP* pSGP)
: m_adFourierCosTable(NULL), m_adFourierSinTable(NULL), m_adFilter(NULL), m_fail(false)
{
m_idFilterMethod = convertFilterMethodNameToID (szFilterMethodName);
return;
}
- init (m_idFilter, m_idFilterMethod, dBandwidth, dSignalIncrement, nSignalPoints, dFilterParam, m_idDomain, m_idFilterGeneration, iZeropad, iPreinterpolationFactor, iTraceLevel, iGeometry, dFocalLength, pSGP);
+ init (m_idFilter, m_idFilterMethod, dBandwidth, dSignalIncrement, nSignalPoints, dFilterParam, m_idDomain,
+ m_idFilterGeneration, iZeropad, iPreinterpolationFactor, iTraceLevel, iGeometry, dFocalLength, pSGP);
}
void
-ProcessSignal::init (const int idFilter, const int idFilterMethod, double dBandwidth, double dSignalIncrement, int nSignalPoints, double dFilterParam, const int idDomain, const int idFilterGeneration, const int iZeropad, const int iPreinterpolationFactor, int iTraceLevel, int iGeometry, double dFocalLength, SGP* pSGP)
+ProcessSignal::init (const int idFilter, const int idFilterMethod, double dBandwidth, double dSignalIncrement,
+ int nSignalPoints, double dFilterParam, const int idDomain, const int idFilterGeneration,
+ const int iZeropad, const int iPreinterpolationFactor, int iTraceLevel, int iGeometry,
+ double dFocalLength, SGP* pSGP)
{
int i;
m_idFilter = idFilter;
m_iPreinterpolationFactor = iPreinterpolationFactor;
// scale signalInc/BW to signalInc/2 to adjust for imaginary detector
- // through origin of phantom, see Kak-Slaney Fig 3.22, for Collinear
+ // through origin of phantom rather than 2 times distance to detector,
+ // see Kak-Slaney Fig 3.22, for Collinear diagram
if (m_idGeometry == Scanner::GEOMETRY_EQUILINEAR) {
m_dSignalInc /= 2;
m_dBandwidth *= 2;
// 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
+
if (m_idGeometry == Scanner::GEOMETRY_EQUILINEAR) {
for (i = 0; i < m_nFilterPoints; i++)
m_adFilter[i] *= 0.5;
delete pEZPlot;
}
#endif
+
if (m_idGeometry == Scanner::GEOMETRY_EQUILINEAR) {
for (i = 0; i < m_nFilterPoints; i++)
adSpatialFilter[i] *= 0.5;
for (i = 0; i < m_nFilterPoints; i++)
m_adFilter[i] = std::abs (acInverseFilter[i]) * m_dSignalInc;
delete acInverseFilter;
+
#ifdef HAVE_SGP
if (pEZPlot && m_traceLevel >= Trace::TRACE_PLOT) {
pEZPlot->ezset ("title Spatial Filter: Inverse");
<pre>
<h1>Build Log</h1>
<h3>
+--------------------Configuration: libctsim - Win32 Debug--------------------
+</h3>
+<h3>Command Lines</h3>
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP2F.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
+"D:\ctsim\libctsim\procsignal.cpp"
+]
+Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP2F.tmp"
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP30.tmp" with contents
+[
+/nologo /out:"Debug\libctsim.lib"
+.\Debug\array2dfile.obj
+.\Debug\backprojectors.obj
+.\Debug\clip.obj
+.\Debug\consoleio.obj
+.\Debug\ezplot.obj
+.\Debug\ezset.obj
+.\Debug\ezsupport.obj
+.\Debug\filter.obj
+.\Debug\fnetorderstream.obj
+.\Debug\fourier.obj
+.\Debug\getopt.obj
+.\Debug\getopt1.obj
+.\Debug\hashtable.obj
+.\Debug\imagefile.obj
+.\Debug\mathfuncs.obj
+.\Debug\phantom.obj
+.\Debug\plotfile.obj
+.\Debug\pol.obj
+.\Debug\procsignal.obj
+.\Debug\projections.obj
+.\Debug\reconstruct.obj
+.\Debug\scanner.obj
+.\Debug\sgp.obj
+.\Debug\strfuncs.obj
+.\Debug\syserror.obj
+.\Debug\trace.obj
+.\Debug\transformmatrix.obj
+.\Debug\xform.obj
+]
+Creating command line "link.exe -lib @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP30.tmp"
+<h3>Output Window</h3>
+Compiling...
+procsignal.cpp
+Creating library...
+<h3>
--------------------Configuration: ctsim - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP31.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
+.\Debug\dialogs.obj
+.\Debug\dlgprojections.obj
+.\Debug\dlgreconstruct.obj
+.\Debug\docs.obj
+.\Debug\views.obj
+.\Debug\wx.res
+\ctsim\msvc\libctsim\Debug\libctsim.lib
+"\fftw-2.1.3\Win32\FFTW2st\Debug\FFTW2st.lib"
+"\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\RSP31.tmp"
+<h3>Output Window</h3>
+Linking...
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: views.cpp,v 1.57 2001/01/08 02:03:24 kevin Exp $
+** $Id: views.cpp,v 1.58 2001/01/12 03:49:07 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_INVERSE_FOURIER;
+ m_iDefaultFilterGeneration = ProcessSignal::FILTER_GENERATION_DIRECT;
#else
m_iDefaultFilterMethod = ProcessSignal::FILTER_METHOD_CONVOLUTION;
m_iDefaultFilterGeneration = ProcessSignal::FILTER_GENERATION_DIRECT;
const Projections& rProj = GetDocument()->getProjections();
imageFile.setArraySize (m_iDefaultNX, m_iDefaultNY);
- if (m_iDefaultFilterMethod != ProcessSignal::FILTER_METHOD_CONVOLUTION && m_iDefaultFilterGeneration == ProcessSignal::FILTER_GENERATION_DIRECT && rProj.geometry() != Scanner::GEOMETRY_PARALLEL) {
- wxMessageBox ("Sorry!\nCurrently, frequency-based filtering with direct filter generation is not support for geometries other than parallel.\nAborting command.", "Not Supported", wxOK | wxICON_WARNING, m_frame);
- return;
+ if (m_iDefaultFilterMethod != ProcessSignal::FILTER_METHOD_CONVOLUTION &&
+ m_iDefaultFilterGeneration == ProcessSignal::FILTER_GENERATION_INVERSE_FOURIER &&
+ rProj.geometry() == Scanner::GEOMETRY_EQUIANGULAR) {
+ wxMessageBox ("Sorry!\nCurrently, frequency-based filtering with inverse_fourier filter generation is not supported equiangular geometry.\nAborting command.", "Not Supported", wxOK | wxICON_WARNING, m_frame);
+ // return;
}
Reconstructor* pReconstruct = new Reconstructor (rProj, imageFile, optFilterName.c_str(), m_dDefaultFilterParam, optFilterMethodName.c_str(), m_iDefaultZeropad, optFilterGenerationName.c_str(), optInterpName.c_str(), m_iDefaultInterpParam, optBackprojectName.c_str(), m_iDefaultTrace);