r645: no message
authorKevin M. Rosenberg <kevin@rosenberg.net>
Wed, 28 Mar 2001 16:53:43 +0000 (16:53 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Wed, 28 Mar 2001 16:53:43 +0000 (16:53 +0000)
ChangeLog
libctsim/imagefile.cpp
libctsim/projections.cpp
msvc/ctsim/ctsim.plg

index fe1e67387d5354be7d6bd3f4f0b95990e59fc658..8ffb2d6abc16579d59aa5f0eb622b4148c785758 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,65 +1,48 @@
-3.5.0 - Released 3//01
+3.5.0 - Released 4//01
 
-       * ctsim: Added tips to be displayed at startup and via the help menu.
-
-       * ctsim: Added center-detector concept. Allow for detector array
+       New Features:
+       
+       -- ctsim: Added tips to be displayed at startup and via the help menu.
+       -- ctsim: Added center-detector concept. Allow for detector array
        to be any arbitrary distance from center of scanner. As a result,
        projection files are not incompatible with previous version of
        CTSim.
-       
-       * ctsim: Added background and SMP processing for reconstructions, 
+       -- ctsim: Added background and SMP processing for reconstructions, 
        scanning, and rasterization. 
-
-       * ctsim: Added generic threaded tasks and background manager for 
+       -- ctsim: Added generic threaded tasks and background manager for 
        background processing as well as taking advantage of multiple-CPU's 
        on SMP systems.
-
-       * ctsim: Added plot t-theta sampling to projection file menu.
-       
-       * ctsim: Added Reconstruction with Rebinning for faster
+       -- ctsim: Added plot t-theta sampling to projection file menu.
+       -- ctsim: Added Reconstruction with Rebinning for faster
        divergent beam reconstructions.
-       
-       * ctsim: Added import and export of DICOM image files.
-
-       * ctsim: Added PPM, PGM, and PNG file import to imagefile.
-
-       * ctsim: Added FFT/IFFT of columns of image files.
-       
-       * ctsim: Added clipboard cut/copy/paste for image files.
-
-       * ctsim: Added region of interest to reconstructions.
-
-       * ctsim: Added Convert Rectangular Image to Projection files
-       
-       * ctsim: Added "Verbose Logging", "Startup Tips", and
+       -- ctsim: Added import and export of DICOM image files.
+       -- ctsim: Added PPM, PGM, and PNG file import to imagefile.
+       -- ctsim: Added FFT/IFFT of columns of image files.
+       -- ctsim: Added clipboard cut/copy/paste for image files.
+       -- ctsim: Added region of interest to reconstructions.
+       -- ctsim: Added Convert Rectangular Image to Projection files
+       -- ctsim: Added "Verbose Logging", "Startup Tips", and
        "Background processes" options  to Preferences dialog.
-
-       * ctsim: Added plotting of projection file histograms.
-       
-       * plotfile: Added scattergram plot functions
-
-       * ctsim: Added accelerator key for File-Properties
-
-       * ctsim: Improved wireframe 3-d display to remove hidden
+       -- ctsim: Added plotting of projection file histograms.
+       -- plotfile: Added scattergram plot functions
+       -- ctsim: Added accelerator key for File-Properties
+       -- ctsim: Improved wireframe 3-d display to remove hidden
        surfaces.
-       
-       * sgp.cpp/ezplot.cpp: Improved plotting with markers.
-       
-       * views.cpp: Added out of memory checks to display for huge
+       -- views.cpp: Added out of memory checks to display for huge
        image and projection files.
-
-       * distribution: fixed problem with documentation files not
-       being included with the distribution [Reported by Ian Kay].
-
-       * sgp.cpp: Fixed bug in drawCircle
-
-       * filter.cpp: Fixed Hanning parameter to be 0.5 rather than 0.54
-
-       * imagefile.cpp: Fixed scaling factor in fftRows
-
-       * backprojectors.cpp: Added setting of axis extent and increment
+       -- backprojectors.cpp: Added setting of axis extent and increment
        to reconstructions.
        
+       Bug Fixes:
+       -- filter.cpp: Fixed Hanning parameter to be 0.5 rather than 0.54
+       -- imagefile.cpp: Fixed scaling factor in fftRows
+       -- imagefile.cpp: Fixed bug when performing magnitude() on real-valued
+       image.
+       -- sgp.cpp: Fixed bug in drawCircle.
+       -- distribution: fixed problem with documentation files not
+       being included with the distribution [Reported by Ian Kay].
+       -- sgp.cpp/ezplot.cpp: Improved plotting with markers.
+
 3.0.3 - Released 2/20/01
 
        * ctsim: Fixed core dump on Linux with OpenGL
index bab87bdeff5ab0fa4486a66f629089e85efd4d91..9fa905725ec0883b269e3b072d95c1b946a94521 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: imagefile.cpp,v 1.42 2001/03/21 21:45:31 kevin Exp $
+**  $Id: imagefile.cpp,v 1.43 2001/03/28 16:53:43 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
@@ -1185,7 +1185,7 @@ ImageFile::magnitude (ImageFile& result) const
       if (isComplex()) 
         vRealResult[ix][iy] = ::sqrt (vReal[ix][iy] * vReal[ix][iy] + vImag[ix][iy] * vImag[ix][iy]);
       else
-        vRealResult[ix][iy] = vReal[ix][iy];
+        vRealResult[ix][iy] = ::fabs(vReal[ix][iy]);
     }
     
     if (result.isComplex())
index 2a80405a43dc1eb0356f1ddaf6d2d9bb6c58ed7e..968ee0ec48b1bdb807362ead34d0e187384da5bf 100644 (file)
@@ -8,7 +8,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: projections.cpp,v 1.70 2001/03/24 05:28:28 kevin Exp $
+**  $Id: projections.cpp,v 1.71 2001/03/28 16:53:43 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
@@ -50,6 +50,7 @@ const char* const Projections::s_aszInterpTitle[] =
 const int Projections::s_iInterpCount = sizeof(s_aszInterpName) / sizeof(char*);
 
 
+
 /* NAME
 *    Projections               Constructor for projections matrix storage 
 *
@@ -756,24 +757,32 @@ Projections::convertFFTPolar (ImageFile& rIF, int iInterpolationID, int iZeropad
   double dInterpScale = (m_nDet-1) / static_cast<double>(iInterpDet-1) / SQRT2;
   
   double dFFTScale = 1. / static_cast<double>(iInterpDet * iInterpDet);
-  dFFTScale /= 2; // Not sure why this scaling is necessary
+  int iMidPoint = iInterpDet / 2;
+  double dMidPoint = static_cast<double>(iInterpDet) / 2.;
+  int iZerosAdded = iNumInterpDetWithZeros - iInterpDet;
   for (unsigned int iView = 0; iView < m_nView; iView++) {
     DetectorValue* detval = getDetectorArray(iView).detValues();
     LinearInterpolator<DetectorValue> projInterp (detval, m_nDet);
     for (unsigned int iDet = 0; iDet < iInterpDet; iDet++) {
 //      double dInterpPos = iInterpDet * dInterpScale;
-      double dInterpPos = (m_nDet / 2.) + (iDet - iInterpDet/2.) * dInterpScale;
-      pcIn[iDet].re = projInterp.interpolate (dInterpPos);
+      double dInterpPos = (m_nDet / 2.) + (iDet - dMidPoint) * dInterpScale;
+      pcIn[iDet].re = projInterp.interpolate (dInterpPos) * PI * SQRT2;
       pcIn[iDet].im = 0;
     }
-    for (unsigned int iDet2 = iInterpDet; iDet2 < iNumInterpDetWithZeros; iDet2++) 
-      pcIn[iDet2].re = pcIn[iDet2].im = 0;
+    Fourier::shuffleFourierToNaturalOrder (pcIn, iInterpDet);
+    if (iZerosAdded > 0) {
+      for (unsigned int iDet1 = iMidPoint; iDet1 < iInterpDet; iDet1++)
+        pcIn[iDet1+iZerosAdded] = pcIn[iDet1];
+      for (unsigned int iDet2 = iMidPoint; iDet2 < iMidPoint + iZerosAdded; iDet2++) 
+        pcIn[iDet2].re = pcIn[iDet2].im = 0;
+    }
 
     fftw_one (plan, pcIn, NULL);
 
     ppcDetValue[iView] = new std::complex<double> [iNumInterpDetWithZeros];
-    for (unsigned int iD = 0; iD < iNumInterpDetWithZeros; iD++)
+    for (unsigned int iD = 0; iD < iNumInterpDetWithZeros; iD++) {
       ppcDetValue[iView][iD] = std::complex<double> (pcIn[iD].re * dFFTScale, pcIn[iD].im * dFFTScale); 
+    }
 
     Fourier::shuffleFourierToNaturalOrder (ppcDetValue[iView], iNumInterpDetWithZeros);
   }
index 1150d39d77421364df4b0a7c926984cfca8a683a..5d5f4308d9e5adc16ef2d91f264ca8350a71bf99 100644 (file)
@@ -6,13 +6,13 @@
 --------------------Configuration: libctsim - Win32 Debug--------------------
 </h3>
 <h3>Command Lines</h3>
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPBD.tmp" with contents
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP7D.tmp" with contents
 [
 /nologo /G6 /MTd /W3 /Gm /Gi /GR /GX /Zi /Od /Gy /I "..\..\..\wx2.2.5\src\png" /I "..\..\..\wx2.2.5\src\zlib" /I "..\..\INCLUDE" /I "..\..\getopt" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /I "..\..\..\wx2.2.5\include" /I "\dicom\ctn\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__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "HAVE_CTN_DICOM" /D VERSION=\"3.1.0\" /FR"Debug/" /Fp"Debug/libctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c 
 "C:\ctsim\libctsim\projections.cpp"
 ]
-Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPBD.tmp" 
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPBE.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP7D.tmp" 
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP7E.tmp" with contents
 [
 /nologo /out:"Debug\libctsim.lib" 
 .\Debug\array2dfile.obj
@@ -48,7 +48,7 @@ Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPBE.tmp" with content
 .\Debug\transformmatrix.obj
 .\Debug\xform.obj
 ]
-Creating command line "link.exe -lib @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPBE.tmp"
+Creating command line "link.exe -lib @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP7E.tmp"
 <h3>Output Window</h3>
 Compiling...
 projections.cpp
@@ -57,29 +57,13 @@ Creating library...
 --------------------Configuration: ctsim - Win32 Debug--------------------
 </h3>
 <h3>Command Lines</h3>
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPBF.tmp" with contents
-[
-/nologo /G6 /MTd /W3 /Gm /Gi /GR /GX /Zi /Od /Gy /I "\wx2.2.5\include" /I "..\..\..\fftw-2.1.3\fftw" /I "\wx2.2.5\src\png" /I "\wx2.2.5\src\zlib" /I "..\..\include" /I "..\..\getopt" /I "..\..\..\fftw-2.1.3\rfftw" /I "\dicom\ctn\include" /D VERSION=\"3.0.0beta1\" /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.1.0\" /D "HAVE_CTN_DICOM" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX"ctsim.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c 
-"C:\ctsim\src\backgroundmgr.cpp"
-"C:\ctsim\src\backgroundsupr.cpp"
-"C:\ctsim\src\graph3dview.cpp"
-"C:\ctsim\src\threadproj.cpp"
-"C:\ctsim\src\threadraster.cpp"
-"C:\ctsim\src\threadrecon.cpp"
-]
-Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPBF.tmp" 
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPC0.tmp" with contents
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP7F.tmp" with contents
 [
 /nologo /G6 /MTd /W3 /Gm /Gi /GR /GX /Zi /Od /Gy /I "\wx2.2.5\include" /I "..\..\..\fftw-2.1.3\fftw" /I "\wx2.2.5\src\png" /I "\wx2.2.5\src\zlib" /I "..\..\include" /I "..\..\getopt" /I "..\..\..\fftw-2.1.3\rfftw" /I "\dicom\ctn\include" /D VERSION=\"3.0.0beta1\" /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.1.0\" /D "HAVE_CTN_DICOM" /D CTSIMVERSION=\"3.0.0alpha5\" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX"ctsim.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c 
-"C:\ctsim\src\ctsim.cpp"
-"C:\ctsim\src\dialogs.cpp"
-"C:\ctsim\src\dlgprojections.cpp"
-"C:\ctsim\src\dlgreconstruct.cpp"
-"C:\ctsim\src\docs.cpp"
 "C:\ctsim\src\views.cpp"
 ]
-Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPC0.tmp" 
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPC1.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP7F.tmp" 
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP80.tmp" with contents
 [
 winmm.lib rpcrt4.lib ws2_32.lib ../libctsim/Debug/libctsim.lib libcmtd.lib ..\..\..\fftw-2.1.3\Win32\FFTW2st\Debug\FFTW2st.lib ..\..\..\fftw-2.1.3\Win32\RFFTW2st\Debug\RFFTW2st.lib wxd.lib xpmd.lib tiffd.lib zlibd.lib pngd.lib comctl32.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 opengl32.lib glu32.lib htmlhelp.lib ctn_lib.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/ctsim.pdb" /debug /machine:I386 /out:"Debug/ctsim.exe" /pdbtype:sept /libpath:"\wx2.2.5\lib" /libpath:"\dicom\ctn\winctn\ctn_lib\Debug" 
 .\Debug\backgroundmgr.obj
@@ -106,21 +90,9 @@ winmm.lib rpcrt4.lib ws2_32.lib ../libctsim/Debug/libctsim.lib libcmtd.lib ..\..
 \wx2.2.5\lib\zlibd.lib
 \wx2.2.5\lib\tiffd.lib
 ]
-Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPC1.tmp"
+Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP80.tmp"
 <h3>Output Window</h3>
 Compiling...
-backgroundmgr.cpp
-backgroundsupr.cpp
-graph3dview.cpp
-threadproj.cpp
-threadraster.cpp
-threadrecon.cpp
-Compiling...
-ctsim.cpp
-dialogs.cpp
-dlgprojections.cpp
-dlgreconstruct.cpp
-docs.cpp
 views.cpp
 Linking...