r584: no message
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 25 Feb 2001 16:21:36 +0000 (16:21 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 25 Feb 2001 16:21:36 +0000 (16:21 +0000)
include/scanner.h
libctsim/scanner.cpp
msvc/ctsim/ctsim.plg
src/backgroundsupr.cpp
src/docs.cpp
src/docs.h
src/threadproj.cpp
src/views.cpp

index fea4dc4c8cc1675585cb75df543881684a3feff9..8b367eedff642b10f2e2efcccac1136da5e731b5 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: scanner.h,v 1.18 2001/02/20 04:48:45 kevin Exp $
+**  $Id: scanner.h,v 1.19 2001/02/25 16:21:36 kevin Exp $
 **
 **
 **  This program is free software; you can redistribute it and/or modify
@@ -79,9 +79,14 @@ class Scanner
     double dFocalLengthRatio, double dViewRatio, double dScanRatio);
   ~Scanner();
   
-  void collectProjections (Projections& proj, const Phantom& phm, const int trace = Trace::TRACE_NONE, SGP* pSGP = NULL);
+  void collectProjections (Projections& proj, const Phantom& phm, const int trace = Trace::TRACE_NONE,
+    SGP* pSGP = NULL);
 
-  void collectProjections (Projections& proj, const Phantom& phm, const int iStartView, const int iNumViews, bool bStoreAtViewPosition, const int trace = Trace::TRACE_NONE, SGP* pSGP = NULL);
+  void collectProjections (Projections& proj, const Phantom& phm, const int iStartView, const int iNumViews, 
+    bool bStoreAtViewPosition, const int trace = Trace::TRACE_NONE, SGP* pSGP = NULL);
+
+  void collectProjections (Projections& proj, const Phantom& phm, const int iStartView, const int iNumViews, 
+    int iStorageOffset, const int trace = Trace::TRACE_NONE, SGP* pSGP = NULL);
 
   void setNView (int nView);
 
index 6dbfec8371a71f15c9953a8cbf77150ea783b66d..353926659dea09a0282ab5ad2e77c1b5896004c3 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: scanner.cpp,v 1.31 2001/02/20 17:44:14 kevin Exp $
+**  $Id: scanner.cpp,v 1.32 2001/02/25 16:21:36 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
@@ -266,7 +266,16 @@ Scanner::collectProjections (Projections& proj, const Phantom& phm, const int tr
 }
 
 void
-Scanner::collectProjections (Projections& proj, const Phantom& phm, const int iStartView, const int iNumViews, bool bStoreAtViewPosition, const int trace, SGP* pSGP)
+Scanner::collectProjections (Projections& proj, const Phantom& phm, const int iStartView, const int iNumViews, 
+                             bool bStoreAtViewPosition, const int trace, SGP* pSGP)
+{
+  int iStorageOffset = (bStoreAtViewPosition ? iStartView : 0);
+  collectProjections (proj, phm, iStartView, iNumViews, iStorageOffset, trace, pSGP);
+}
+
+void
+Scanner::collectProjections (Projections& proj, const Phantom& phm, const int iStartView, const int iNumViews, 
+                             int iStorageOffset, const int trace, SGP* pSGP)
 {
   m_trace = trace;
   double start_angle = iStartView * proj.rotInc();
@@ -299,10 +308,8 @@ Scanner::collectProjections (Projections& proj, const Phantom& phm, const int iS
   int iView;
   double viewAngle;
   for (iView = 0, viewAngle = start_angle;  iView < iNumViews; iView++, viewAngle += proj.rotInc()) {
-    int iStoragePosition = iView;
-    if (bStoreAtViewPosition)
-      iStoragePosition += iStartView;
-    
+    int iStoragePosition = iView + iStorageOffset;
+
     DetectorArray& detArray = proj.getDetectorArray( iStoragePosition );
     
 #ifdef HAVE_SGP 
index 0c5966844e85993d175890b173ece6b0f53fb67f..396719f019a542e4fd859bbcb12c3864d8162dd2 100644 (file)
@@ -3,66 +3,16 @@
 <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\RSP310.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" /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 /FR"Debug/" /Fp"Debug/libctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c 
-"C:\ctsim\libctsim\scanner.cpp"
-]
-Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP310.tmp" 
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP311.tmp" with contents
-[
-/nologo /out:"Debug\libctsim.lib" 
-.\Debug\array2dfile.obj
-.\Debug\backprojectors.obj
-.\Debug\clip.obj
-.\Debug\consoleio.obj
-.\Debug\dlgezplot.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\globalvars.obj
-.\Debug\hashtable.obj
-.\Debug\imagefile.obj
-.\Debug\interpolator.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\RSP311.tmp"
-<h3>Output Window</h3>
-Compiling...
-scanner.cpp
-Creating library...
-<h3>
 --------------------Configuration: ctsim - Win32 Debug--------------------
 </h3>
 <h3>Command Lines</h3>
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP312.tmp" with contents
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP342.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" /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.0.4\" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c 
 "C:\ctsim\src\backgroundsupr.cpp"
 ]
-Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP312.tmp" 
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP313.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP342.tmp" 
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP343.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 /nologo /subsystem:windows /incremental:yes /pdb:"Debug/ctsim.pdb" /debug /machine:I386 /out:"Debug/ctsim.exe" /pdbtype:sept /libpath:"\wx2.2.5\lib" 
 .\Debug\backgroundmgr.obj
@@ -88,7 +38,7 @@ 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\RSP313.tmp"
+Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP343.tmp"
 <h3>Output Window</h3>
 Compiling...
 backgroundsupr.cpp
index 0a09ef8614cec93ac83c1b9c14ba75b40a4bac35..4f9e4c616eaab24cb1cf256b8e448048231ed1ab 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
-**  $Id: backgroundsupr.cpp,v 1.5 2001/02/25 15:27:28 kevin Exp $
+**  $Id: backgroundsupr.cpp,v 1.6 2001/02/25 16:21:36 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
@@ -74,7 +74,7 @@ BackgroundSupervisor::BackgroundSupervisor (wxFrame* pParentFrame, wxDocument* p
     wxEvtHandler()
 {
   m_iNumThreads = theApp->getNumberCPU();
-    ++m_iNumThreads;
+//    ++m_iNumThreads;
 
   m_vecpThreads.reserve (m_iNumThreads);
   for (int iThread = 0; iThread < m_iNumThreads; iThread++)
index 99e6a56e9c9245d5cda5b1b88b8a840db209fdee..96f7ee3c2ae793d842e34f91a0fce7abdb99b47f 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: docs.cpp,v 1.29 2001/02/25 10:52:55 kevin Exp $
+**  $Id: docs.cpp,v 1.30 2001/02/25 16:21:36 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
@@ -180,8 +180,8 @@ BackgroundProcessingDocument::cancelRunningTasks()
   m_criticalSection.Leave();
 
   while (m_vecpBackgroundSupervisors.size() > 0) {
-     ::wxUsleep(50);
      ::wxYield();
+     ::wxUsleep(50);
   }
 }
 
@@ -255,6 +255,11 @@ ProjectionFileDocument::getView() const
 
 IMPLEMENT_DYNAMIC_CLASS(PhantomFileDocument, BackgroundProcessingTask)
 
+PhantomFileDocument::~PhantomFileDocument()
+{
+  cancelRunningTasks();
+}
+
 bool 
 PhantomFileDocument::OnOpenDocument(const wxString& filename)
 {
index f841bcdfe51489dd296182f43dc78522ad254362..82b08b02080ffbb4e933d33d465157fec807056f 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: docs.h,v 1.25 2001/02/25 10:52:55 kevin Exp $
+**  $Id: docs.h,v 1.26 2001/02/25 16:21:36 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
@@ -156,8 +156,7 @@ public:
        : m_idPhantom(Phantom::PHM_INVALID), m_bBadFileOpen(false)
     {}
 
-    virtual ~PhantomFileDocument () 
-    {}
+    virtual ~PhantomFileDocument ();
 
     const int getPhantomID () const { return m_idPhantom; }
 
index 2978c61c342ebb6b98cc63c366449e366ecaa6ef..db6070c1484a8a5b12bd92ddc9fb228556aca137 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
-**  $Id: threadproj.cpp,v 1.2 2001/02/25 15:27:28 kevin Exp $
+**  $Id: threadproj.cpp,v 1.3 2001/02/25 16:21:36 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
@@ -248,7 +248,7 @@ ProjectorWorker::Entry ()
 #endif
         break;
       }
-      m_pScanner->collectProjections (*m_pProjections, rPhantom, iUnit + m_iStartUnit, 1, true, Trace::TRACE_NONE);
+      m_pScanner->collectProjections (*m_pProjections, rPhantom, iUnit + m_iStartUnit, 1, iUnit, Trace::TRACE_NONE);
       wxPostEvent (m_pSupervisor, eventProgress);
     }
   }
index ae7ea2094b4189c17de31c96eca6b1ed038fb850..c94fa7ec453aac4706114fd477657cbaad93606c 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: views.cpp,v 1.119 2001/02/25 15:27:28 kevin Exp $
+**  $Id: views.cpp,v 1.120 2001/02/25 16:21:36 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
@@ -1802,7 +1802,7 @@ PhantomCanvas::GetBestSize() const
   int xSize, ySize;
   theApp->getMainFrame()->GetClientSize (&xSize, &ySize);
   xSize = maxValue<int> (xSize, ySize);
-  ySize = xSize = (xSize / 3);
+  ySize = xSize = (xSize / 4);
   return wxSize (xSize, ySize);
 }