r380: no message
authorKevin M. Rosenberg <kevin@rosenberg.net>
Fri, 12 Jan 2001 03:49:07 +0000 (03:49 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Fri, 12 Jan 2001 03:49:07 +0000 (03:49 +0000)
ChangeLog
libctsim/filter.cpp
libctsim/procsignal.cpp
msvc/ctsim/ctsim.plg
src/views.cpp

index b961d6861164078f47104a92deedf8f2b7f9d807..f62ec4e111f7a4a9eebc3fd6e626249a4bbedb97 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 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
index 60f97c8e9b7f27319a3fc1a0dcb088f06e360b00..26c1c0eda20c5ddd42a29d450817732c2f5d80d1 100644 (file)
@@ -9,7 +9,7 @@
 **  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
@@ -559,30 +559,21 @@ SignalFilter::spatialResponseAnalytic (int filterID, double bw, double x, double
 }
 
 
-/* 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
- */
 
 
index 71a0e67bad2121c37eb063ca893f0e70f4e7919e..c40e2972ad606290afef9a33ec7dd0f9a8f96355 100644 (file)
@@ -9,7 +9,7 @@
 **  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
@@ -77,7 +77,10 @@ const int ProcessSignal::s_iFilterGenerationCount = sizeof(s_aszFilterGeneration
 // 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);
@@ -109,12 +112,16 @@ ProcessSignal::ProcessSignal (const char* szFilterName, const char* szFilterMeth
     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;
@@ -139,7 +146,8 @@ ProcessSignal::init (const int idFilter, const int idFilterMethod, double dBandw
   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;
@@ -278,6 +286,9 @@ ProcessSignal::init (const int idFilter, const int idFilterMethod, double dBandw
       
       // 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;
@@ -350,6 +361,7 @@ ProcessSignal::init (const int idFilter, const int idFilterMethod, double dBandw
         delete pEZPlot;
       }
 #endif
+
       if (m_idGeometry == Scanner::GEOMETRY_EQUILINEAR) {
         for (i = 0; i < m_nFilterPoints; i++)
           adSpatialFilter[i] *= 0.5;
@@ -375,6 +387,7 @@ ProcessSignal::init (const int idFilter, const int idFilterMethod, double dBandw
       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");
index 80c16f37e55e17afaaaa953c1c70c7cca6f8867e..f011491e65ddbc672a79f8d55d88241dbeb728f4 100644 (file)
@@ -3,9 +3,74 @@
 <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...
 
 
 
index c5fed7cce442e8430331c1a237fa83ca76c55e14..02ded2091d98324a13ce8b5dd529e74791b1573b 100644 (file)
@@ -9,7 +9,7 @@
 **  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
@@ -2009,7 +2009,7 @@ ProjectionFileView::ProjectionFileView(void)
   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;
@@ -2147,9 +2147,11 @@ ProjectionFileView::OnReconstructFBP (wxCommandEvent& event)
       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);