r296: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Mon, 18 Dec 2000 06:32:13 +0000 (06:32 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Mon, 18 Dec 2000 06:32:13 +0000 (06:32 +0000)
libctgraphics/ezplot.cpp
libctgraphics/sgp.cpp
libctsim/scanner.cpp
msvc/ctsim/ctsim.plg
src/dlgprojections.cpp
src/dlgreconstruct.cpp
src/dlgreconstruct.h

index 3ea5ce1fe2c383c0e59b6975fb1d30c369d20f07..7d6e23e745807d82905b603bf2d3a52e76545ad7 100644 (file)
@@ -6,7 +6,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ezplot.cpp,v 1.18 2000/12/18 05:40:30 kevin Exp $
+**  $Id: ezplot.cpp,v 1.19 2000/12/18 06:32:13 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
@@ -753,8 +753,10 @@ EZPlot::drawAxes()
       if (o_ytlabel == TRUE && axis_near == FALSE) {
        snprintf (str, sizeof(str), y_numfmt, ygw_min + yw_tickinc * i);
        rSGP.moveAbs (yaxispos + ytl_ofs, y + 0.5 * charheight);
-       rSGP.setTextColor (clr_number, -1);
+       rSGP.setTextColor (clr_number, -1);\r
+       rSGP.setTextAngle(HALFPI);
        rSGP.drawText (str);
+       rSGP.setTextAngle(0.);\r
       }
     }
   }            // Y - Axis
index 14cfd63e500a9f40d3dc4a94f03588017d4d68c3..f291245b4548a0d5246b4d08453f4f47f0df0ef3 100644 (file)
@@ -7,7 +7,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: sgp.cpp,v 1.20 2000/12/18 05:40:30 kevin Exp $
+**  $Id: sgp.cpp,v 1.21 2000/12/18 06:32:13 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
@@ -165,12 +165,19 @@ SGP::eraseWindow ()
     g2_clear (m_driver.idG2());
 #endif
 #if HAVE_WXWINDOWS
-  if (m_driver.isWX()) {
-    wxBrush brushWhite;\r
+  if (m_driver.isWX()) {\r
+       wxBrush brushWhite;\r
        brushWhite.SetColour(255,255,255);\r
        m_driver.idWX()->SetBackground(brushWhite);\r
        m_driver.idWX()->Clear();\r
        m_driver.idWX()->SetBackground(wxNullBrush);\r
+#if 1\r
+       wxPen pen;\r
+       pen.SetColour(255,255,255);\r
+       m_driver.idWX()->SetBrush (brushWhite);\r
+       m_driver.idWX()->DrawRectangle (0, 0, m_iPhysicalXSize, m_iPhysicalYSize);\r
+       m_driver.idWX()->SetBrush (wxNullBrush);\r
+#endif\r
   }
 #endif
 }
index 98eb8a8013cfae6476949e12ad1a0fb6c772ea6d..c593b0937ca9caa9f80f58e9456c7440d9b3cf42 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: scanner.cpp,v 1.21 2000/12/18 02:23:43 kevin Exp $
+**  $Id: scanner.cpp,v 1.22 2000/12/18 06:32:13 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
@@ -302,7 +302,6 @@ Scanner::collectProjections (Projections& proj, const Phantom& phm, const int iS
 #ifdef HAVE_SGP 
   if (pSGP && m_trace >= Trace::TRACE_PHANTOM) {
       m_pSGP = pSGP;
-      m_pSGP->eraseWindow();
       double dWindowSize = dmax (m_detLen, m_dFocalLength * 2) * SQRT2;
       double dHalfWindowSize = dWindowSize / 2;
       m_dXMinWin = m_dXCenter - dHalfWindowSize;
@@ -311,7 +310,6 @@ Scanner::collectProjections (Projections& proj, const Phantom& phm, const int iS
       m_dYMaxWin = m_dYCenter + dHalfWindowSize;
       double dHalfPhmLen = m_phmLen /  2;
 
-    m_pSGP->eraseWindow ();
     m_pSGP->setWindow (m_dXMinWin, m_dYMinWin, m_dXMaxWin, m_dYMaxWin);
     m_pSGP->setRasterOp (RO_COPY);
     m_pSGP->setColor (C_RED);
index cf2bd492e20c45b479ea2d81518eaa38048b87a2..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,47 +0,0 @@
-<html>\r
-<body>\r
-<pre>\r
-<h1>Build Log</h1>\r
-<h3>\r
---------------------Configuration: ctsim - Win32 Debug--------------------\r
-</h3>\r
-<h3>Command Lines</h3>\r
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP20.tmp" with contents\r
-[\r
-/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.1.0\" /D "_DEBUG" /D "__WXMSW__" /D "HAVE_SGP" /D VERSION="2.1.0" /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" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c \r
-"C:\ctsim-2.0.6\src\dlgreconstruct.cpp"\r
-]\r
-Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP20.tmp" \r
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP21.tmp" with contents\r
-[\r
-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" \r
-".\Debug\ctsim.obj"\r
-".\Debug\dialogs.obj"\r
-".\Debug\dlgprojections.obj"\r
-".\Debug\dlgreconstruct.obj"\r
-".\Debug\docs.obj"\r
-".\Debug\views.obj"\r
-".\Debug\wx.res"\r
-"\ctsim-2.0.6\msvc\libctsim\Debug\libctsim.lib"\r
-"\fftw-2.1.3\Win32\FFTW2st\Debug\FFTW2st.lib"\r
-"\fftw-2.1.3\Win32\RFFTW2st\Debug\RFFTW2st.lib"\r
-"\wx2\lib\wxd.lib"\r
-]\r
-Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP21.tmp"\r
-<h3>Output Window</h3>\r
-Compiling...\r
-dlgreconstruct.cpp\r
-C:\ctsim-2.0.6\src\dlgreconstruct.cpp(147) : error C2039: 'setDC' : is not a member of 'wxDC'\r
-        c:\wx2\include\wx\msw\dc.h(74) : see declaration of 'wxDC'\r
-Error executing cl.exe.\r
-Creating command line "bscmake.exe /nologo /o"Debug/ctsim.bsc"  ".\Debug\ctsim.sbr" ".\Debug\dialogs.sbr" ".\Debug\dlgprojections.sbr" ".\Debug\dlgreconstruct.sbr" ".\Debug\docs.sbr" ".\Debug\views.sbr""\r
-Creating browse info file...\r
-<h3>Output Window</h3>\r
-\r
-\r
-\r
-<h3>Results</h3>\r
-ctsim.exe - 1 error(s), 0 warning(s)\r
-</pre>\r
-</body>\r
-</html>\r
index cc5b246f85c2e39972518b8f0e626b190c9cfc54..4971292359e4f9134ee8b5f043f527eaaf5ad87a 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: dlgprojections.cpp,v 1.10 2000/12/18 05:40:30 kevin Exp $
+**  $Id: dlgprojections.cpp,v 1.11 2000/12/18 06:32:13 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
@@ -221,8 +221,6 @@ void
 ProjectionsDialog::OnPause (wxCommandEvent& event)
 {
        if ( m_state == Finished ) {
-               // this means that the count down is already finished and we're being
-               // shown as a modal dialog - so just let the default handler do the job
                event.Skip();
        } else if (m_state == Continue) {
                m_memoryDC.SelectObject (m_bitmap);       // in memoryDC
@@ -231,9 +229,9 @@ ProjectionsDialog::OnPause (wxCommandEvent& event)
                showView (m_iLastView);
                m_state = Paused;
                m_btnPause->SetLabel (wxString("Resume"));
-       } else if (m_state == Paused) {
                m_pSGP->setDC (m_pDC);\r
                m_memoryDC.SelectObject(wxNullBitmap);\r
+       } else if (m_state == Paused) {
                m_state = Continue;
                m_btnPause->SetLabel (wxString("Pause"));
        }
@@ -243,20 +241,26 @@ void
 ProjectionsDialog::OnStep (wxCommandEvent& event)
 {
        if ( m_state == Finished ) {
-               // this means that the count down is already finished and we're being
-               // shown as a modal dialog - so just let the default handler do the job
                event.Skip();
        } else if (m_state == Continue) {
                m_memoryDC.SelectObject (m_bitmap);       // in memoryDC
                m_pSGP->setDC (&m_memoryDC);
-               m_memoryDC.SetFont (*wxSWISS_FONT);
-               m_rScanner.collectProjections (m_rProjections, m_rPhantom, m_iLastView, 1, true, m_iTrace, m_pSGP);
+               m_memoryDC.SetFont (*wxSWISS_FONT);\r
+               showView (m_iLastView);
+               // m_rScanner.collectProjections (m_rProjections, m_rPhantom, m_iLastView, 1, true, m_iTrace, m_pSGP);
                m_state = Paused;
                m_btnPause->SetLabel (wxString("Resume"));
-       } else if (m_state == Paused) {
                m_pSGP->setDC (m_pDC);\r
                m_memoryDC.SelectObject(wxNullBitmap);\r
+               Refresh();\r
+       } else if (m_state == Paused) {
+               m_memoryDC.SelectObject (m_bitmap);       // in memoryDC\r
+               m_pSGP->setDC (&m_memoryDC);\r
+               m_memoryDC.SetFont (*wxSWISS_FONT);\r
                projectView (m_iLastView + 1);
+               m_pSGP->setDC (m_pDC);\r
+               m_memoryDC.SelectObject(wxNullBitmap);\r
+               Refresh();\r
        }
 }
 
@@ -275,7 +279,7 @@ ProjectionsDialog::OnPaint (wxPaintEvent& event)
 {
        wxPaintDC paintDC (this);\r
        if (m_state == Paused) {
-               paintDC.DrawBitmap(m_bitmap, 0, 0, false);
+               paintDC.DrawBitmap (m_bitmap, 0, 0, false);
        }
 }
 
index 640337a707069f771cd560c774b7c9003533249b..7fb47d22251416afccf40b523fd8faabeb35ceb9 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: dlgreconstruct.cpp,v 1.10 2000/12/18 05:40:30 kevin Exp $
+**  $Id: dlgreconstruct.cpp,v 1.11 2000/12/18 06:32:13 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
@@ -143,21 +143,16 @@ ReconstructDialog::ReconstructDialog (Reconstructor& rReconstruct, const Project
     int x, y;\r
     this->GetClientSize(&x, &y);\r
     m_pSGPDriver = new SGPDriver (m_pDC, x, y);\r
-    m_pSGP = new SGP (*m_pSGPDriver);
-       m_pSGP->getDriver().idWX()->setDC (&m_pDC);\r
+    m_pSGP = new SGP (*m_pSGPDriver);\r
        
     wxYield();     // Update the display
        
     m_pSGPDriver->idWX()->SetFont(*wxSWISS_FONT);
-#ifdef __WXMAC__
-    MacUpdateImmediately();
-#endif
 }
 
 void
 ReconstructDialog::showView (int iViewNumber, bool bBackprojectView)
 {\r
-       // m_pSGP->setTextSize(0.01);
        if ( iViewNumber < m_rProjections.nView() ) {
                m_iLastView = iViewNumber;
                ::wxYield();        // update the display\r
@@ -214,14 +209,14 @@ ReconstructDialog::showView (int iViewNumber, bool bBackprojectView)
 }
 
 bool
-ReconstructDialog::reconstructView (int iViewNumber)
+ReconstructDialog::reconstructView (int iViewNumber, bool bBackproject)
 {
        if (iViewNumber <= m_iLastView)  // have already done this view
                return true;
        
        if (iViewNumber < m_rProjections.nView()) {
                ::wxYield();        // update the display
-               showView (iViewNumber, true);
+               showView (iViewNumber, bBackproject);
                ::wxYield();        // update the display
                if (m_iTrace >= Trace::TRACE_PLOT) {
                        ::wxUsleep(250);
@@ -230,10 +225,6 @@ ReconstructDialog::reconstructView (int iViewNumber)
                m_state = Finished;    // so that we return TRUE below and 
        }                        // that [Cancel] handler knew what to do
        
-#ifdef __WXMAC__
-       MacUpdateImmediately();
-#endif
-       
        ::wxYield();        // update the display
        return m_state != Cancelled;
 }
@@ -267,15 +258,15 @@ ReconstructDialog::OnPause (wxCommandEvent& event)
                // shown as a modal dialog - so just let the default handler do the job
                event.Skip();
        } else if (m_state == Continue) {\r
-//             m_memoryDC.SelectObject (m_bitmap);       // in memoryDC\r
-//             m_pSGP->setDC (&m_memoryDC);\r
-//             m_memoryDC.SetFont (*wxSWISS_FONT);\r
+               m_memoryDC.SelectObject (m_bitmap);       // in memoryDC\r
+               m_pSGP->setDC (&m_memoryDC);\r
+               m_memoryDC.SetFont (*wxSWISS_FONT);\r
                showView (m_iLastView, false);\r
                m_state = Paused;
                m_btnPause->SetLabel (wxString("Resume"));
+               m_pSGP->setDC (m_pDC);\r
+               m_memoryDC.SelectObject(wxNullBitmap);\r
        } else if (m_state == Paused) {
-//             m_pSGP->setDC (m_pDC);\r
-//             m_memoryDC.SelectObject(wxNullBitmap);\r
                m_state = Continue;
                m_btnPause->SetLabel (wxString("Pause"));
        }
@@ -288,16 +279,23 @@ ReconstructDialog::OnStep (wxCommandEvent& event)
        if ( m_state == Finished ) {
                event.Skip();
        } else if (m_state == Continue) {\r
-//             m_memoryDC.SelectObject (m_bitmap);       // in memoryDC\r
-//             m_pSGP->setDC (&m_memoryDC);\r
-//             m_memoryDC.SetFont (*wxSWISS_FONT);\r
+               m_memoryDC.SelectObject (m_bitmap);       // in memoryDC\r
+               m_pSGP->setDC (&m_memoryDC);\r
+               m_memoryDC.SetFont (*wxSWISS_FONT);\r
                showView (m_iLastView, false);\r
                m_state = Paused;
                m_btnPause->SetLabel (wxString("Resume"));
+               m_pSGP->setDC (m_pDC);\r
+               m_memoryDC.SelectObject(wxNullBitmap);\r
+               Refresh();\r
        } else if (m_state == Paused) {
-//             m_pSGP->setDC (m_pDC);\r
-//             m_memoryDC.SelectObject(wxNullBitmap);\r
+               m_memoryDC.SelectObject (m_bitmap);       // in memoryDC\r
+               m_pSGP->setDC (&m_memoryDC);\r
+               m_memoryDC.SetFont (*wxSWISS_FONT);\r
                reconstructView (m_iLastView + 1);
+               m_pSGP->setDC (m_pDC);\r
+               m_memoryDC.SelectObject(wxNullBitmap);\r
+               Refresh();\r
        }
 }
 
@@ -316,7 +314,7 @@ ReconstructDialog::OnPaint (wxPaintEvent& event)
 {\r
        wxPaintDC paintDC (this);\r
        if (m_state == Paused) {
-               paintDC.DrawBitmap(m_bitmap, 0, 0, false);\r
+               paintDC.DrawBitmap (m_bitmap, 0, 0, false);\r
        }\r
 }
 
index a7abe8c29fbb102655235008134ac6cb70ac9422..8ff6cb2a138ca87a2eb161df71f137b17772875b 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: dlgreconstruct.h,v 1.5 2000/12/18 05:40:30 kevin Exp $
+**  $Id: dlgreconstruct.h,v 1.6 2000/12/18 06:32:13 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
@@ -56,7 +56,7 @@ public:
    /* Perform projection on view number
        return true if ABORT button has not been pressed
    */
-   bool reconstructView (int iViewNumber);
+   bool reconstructView (int iViewNumber, bool bBackproject = true);
 
    /* Can be called to continue after the cancel button has been pressed, but
        the program decided to continue the operation (e.g., user didn't