From f46d464bb065716c6738c23a4d7e7dbedd0b93b9 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Mon, 18 Dec 2000 06:32:13 +0000 Subject: [PATCH] r296: *** empty log message *** --- libctgraphics/ezplot.cpp | 6 +++-- libctgraphics/sgp.cpp | 13 ++++++++--- libctsim/scanner.cpp | 4 +--- msvc/ctsim/ctsim.plg | 47 ---------------------------------------- src/dlgprojections.cpp | 24 +++++++++++--------- src/dlgreconstruct.cpp | 46 +++++++++++++++++++-------------------- src/dlgreconstruct.h | 4 ++-- 7 files changed, 53 insertions(+), 91 deletions(-) diff --git a/libctgraphics/ezplot.cpp b/libctgraphics/ezplot.cpp index 3ea5ce1..7d6e23e 100644 --- a/libctgraphics/ezplot.cpp +++ b/libctgraphics/ezplot.cpp @@ -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); + rSGP.setTextAngle(HALFPI); rSGP.drawText (str); + rSGP.setTextAngle(0.); } } } // Y - Axis diff --git a/libctgraphics/sgp.cpp b/libctgraphics/sgp.cpp index 14cfd63..f291245 100644 --- a/libctgraphics/sgp.cpp +++ b/libctgraphics/sgp.cpp @@ -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; + if (m_driver.isWX()) { + wxBrush brushWhite; brushWhite.SetColour(255,255,255); m_driver.idWX()->SetBackground(brushWhite); m_driver.idWX()->Clear(); m_driver.idWX()->SetBackground(wxNullBrush); +#if 1 + wxPen pen; + pen.SetColour(255,255,255); + m_driver.idWX()->SetBrush (brushWhite); + m_driver.idWX()->DrawRectangle (0, 0, m_iPhysicalXSize, m_iPhysicalYSize); + m_driver.idWX()->SetBrush (wxNullBrush); +#endif } #endif } diff --git a/libctsim/scanner.cpp b/libctsim/scanner.cpp index 98eb8a8..c593b09 100644 --- a/libctsim/scanner.cpp +++ b/libctsim/scanner.cpp @@ -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); diff --git a/msvc/ctsim/ctsim.plg b/msvc/ctsim/ctsim.plg index cf2bd49..e69de29 100644 --- a/msvc/ctsim/ctsim.plg +++ b/msvc/ctsim/ctsim.plg @@ -1,47 +0,0 @@ - - -
-

Build Log

-

---------------------Configuration: ctsim - Win32 Debug-------------------- -

-

Command Lines

-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP20.tmp" with contents -[ -/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 -"C:\ctsim-2.0.6\src\dlgreconstruct.cpp" -] -Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP20.tmp" -Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP21.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-2.0.6\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\RSP21.tmp" -

Output Window

-Compiling... -dlgreconstruct.cpp -C:\ctsim-2.0.6\src\dlgreconstruct.cpp(147) : error C2039: 'setDC' : is not a member of 'wxDC' - c:\wx2\include\wx\msw\dc.h(74) : see declaration of 'wxDC' -Error executing cl.exe. -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"" -Creating browse info file... -

Output Window

- - - -

Results

-ctsim.exe - 1 error(s), 0 warning(s) -
- - diff --git a/src/dlgprojections.cpp b/src/dlgprojections.cpp index cc5b246..4971292 100644 --- a/src/dlgprojections.cpp +++ b/src/dlgprojections.cpp @@ -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); m_memoryDC.SelectObject(wxNullBitmap); + } 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); + 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); m_memoryDC.SelectObject(wxNullBitmap); + Refresh(); + } else if (m_state == Paused) { + m_memoryDC.SelectObject (m_bitmap); // in memoryDC + m_pSGP->setDC (&m_memoryDC); + m_memoryDC.SetFont (*wxSWISS_FONT); projectView (m_iLastView + 1); + m_pSGP->setDC (m_pDC); + m_memoryDC.SelectObject(wxNullBitmap); + Refresh(); } } @@ -275,7 +279,7 @@ ProjectionsDialog::OnPaint (wxPaintEvent& event) { wxPaintDC paintDC (this); if (m_state == Paused) { - paintDC.DrawBitmap(m_bitmap, 0, 0, false); + paintDC.DrawBitmap (m_bitmap, 0, 0, false); } } diff --git a/src/dlgreconstruct.cpp b/src/dlgreconstruct.cpp index 640337a..7fb47d2 100644 --- a/src/dlgreconstruct.cpp +++ b/src/dlgreconstruct.cpp @@ -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; this->GetClientSize(&x, &y); m_pSGPDriver = new SGPDriver (m_pDC, x, y); - m_pSGP = new SGP (*m_pSGPDriver); - m_pSGP->getDriver().idWX()->setDC (&m_pDC); + m_pSGP = new SGP (*m_pSGPDriver); wxYield(); // Update the display m_pSGPDriver->idWX()->SetFont(*wxSWISS_FONT); -#ifdef __WXMAC__ - MacUpdateImmediately(); -#endif } void ReconstructDialog::showView (int iViewNumber, bool bBackprojectView) { - // m_pSGP->setTextSize(0.01); if ( iViewNumber < m_rProjections.nView() ) { m_iLastView = iViewNumber; ::wxYield(); // update the display @@ -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) { -// m_memoryDC.SelectObject (m_bitmap); // in memoryDC -// m_pSGP->setDC (&m_memoryDC); -// m_memoryDC.SetFont (*wxSWISS_FONT); + m_memoryDC.SelectObject (m_bitmap); // in memoryDC + m_pSGP->setDC (&m_memoryDC); + m_memoryDC.SetFont (*wxSWISS_FONT); showView (m_iLastView, false); m_state = Paused; m_btnPause->SetLabel (wxString("Resume")); + m_pSGP->setDC (m_pDC); + m_memoryDC.SelectObject(wxNullBitmap); } else if (m_state == Paused) { -// m_pSGP->setDC (m_pDC); -// m_memoryDC.SelectObject(wxNullBitmap); 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) { -// m_memoryDC.SelectObject (m_bitmap); // in memoryDC -// m_pSGP->setDC (&m_memoryDC); -// m_memoryDC.SetFont (*wxSWISS_FONT); + m_memoryDC.SelectObject (m_bitmap); // in memoryDC + m_pSGP->setDC (&m_memoryDC); + m_memoryDC.SetFont (*wxSWISS_FONT); showView (m_iLastView, false); m_state = Paused; m_btnPause->SetLabel (wxString("Resume")); + m_pSGP->setDC (m_pDC); + m_memoryDC.SelectObject(wxNullBitmap); + Refresh(); } else if (m_state == Paused) { -// m_pSGP->setDC (m_pDC); -// m_memoryDC.SelectObject(wxNullBitmap); + m_memoryDC.SelectObject (m_bitmap); // in memoryDC + m_pSGP->setDC (&m_memoryDC); + m_memoryDC.SetFont (*wxSWISS_FONT); reconstructView (m_iLastView + 1); + m_pSGP->setDC (m_pDC); + m_memoryDC.SelectObject(wxNullBitmap); + Refresh(); } } @@ -316,7 +314,7 @@ ReconstructDialog::OnPaint (wxPaintEvent& event) { wxPaintDC paintDC (this); if (m_state == Paused) { - paintDC.DrawBitmap(m_bitmap, 0, 0, false); + paintDC.DrawBitmap (m_bitmap, 0, 0, false); } } diff --git a/src/dlgreconstruct.h b/src/dlgreconstruct.h index a7abe8c..8ff6cb2 100644 --- a/src/dlgreconstruct.h +++ b/src/dlgreconstruct.h @@ -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 -- 2.34.1