From 92a0f68cb5d5062787b0cbb2664fafe2b2c9ae37 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Sun, 17 Dec 2000 22:30:34 +0000 Subject: [PATCH] r273: *** empty log message *** --- include/reconstruct.h | 4 +-- libctsim/reconstruct.cpp | 9 +++--- msvc/ctsim/ctsim.plg | 22 +++++++++------ src/ctsim.cpp | 25 ++++++++++++---- src/dlgprojections.cpp | 7 +++-- src/dlgprojections.h | 3 +- src/dlgreconstruct.cpp | 61 +++++++++++++++++++++++++++------------- src/dlgreconstruct.h | 8 ++++-- src/docs.cpp | 8 +++--- src/views.cpp | 12 ++++---- tools/pjinfo.cpp | 12 ++++---- tools/pjrec.cpp | 7 ++--- 12 files changed, 111 insertions(+), 67 deletions(-) diff --git a/include/reconstruct.h b/include/reconstruct.h index 70c2ca6..ad93c31 100644 --- a/include/reconstruct.h +++ b/include/reconstruct.h @@ -8,7 +8,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: reconstruct.h,v 1.2 2000/12/16 06:12:47 kevin Exp $ +** $Id: reconstruct.h,v 1.3 2000/12/17 22:30:34 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 @@ -49,7 +49,7 @@ public: void reconstructAllViews (); - void reconstructView (int iStartView = 0, int iViewCount = -1, SGP* pSGP = NULL); + void reconstructView (int iStartView = 0, int iViewCount = -1, SGP* pSGP = NULL, bool bBackprojectView = true); private: const Projections& m_rProj; diff --git a/libctsim/reconstruct.cpp b/libctsim/reconstruct.cpp index 7a27208..ded9420 100644 --- a/libctsim/reconstruct.cpp +++ b/libctsim/reconstruct.cpp @@ -8,7 +8,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: reconstruct.cpp,v 1.4 2000/12/16 06:12:47 kevin Exp $ +** $Id: reconstruct.cpp,v 1.5 2000/12/17 22:30:34 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 @@ -138,7 +138,7 @@ Reconstructor::reconstructAllViews () void -Reconstructor::reconstructView (int iStartView, int iViewCount, SGP* pSGP) +Reconstructor::reconstructView (int iStartView, int iViewCount, SGP* pSGP, bool bBackprojectView) { double* adFilteredProj = new double [m_nFilteredProjections]; // filtered projections @@ -165,8 +165,9 @@ Reconstructor::reconstructView (int iStartView, int iViewCount, SGP* pSGP) } #endif #endif - - m_pBackprojector->BackprojectView (adFilteredProj, rDetArray.viewAngle()); + + if (bBackprojectView) + m_pBackprojector->BackprojectView (adFilteredProj, rDetArray.viewAngle()); #ifdef HAVE_SGP if (m_iTrace >= Trace::TRACE_PLOT && pSGP) { diff --git a/msvc/ctsim/ctsim.plg b/msvc/ctsim/ctsim.plg index cc5f910..05e7d49 100644 --- a/msvc/ctsim/ctsim.plg +++ b/msvc/ctsim/ctsim.plg @@ -6,15 +6,15 @@ --------------------Configuration: ctsim - Win32 Debug--------------------

Command Lines

-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP3B.tmp" with contents +Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP10E.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 "_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" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c -"C:\ctsim-2.0.6\src\dialogs.cpp" +/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\ctsim.cpp" ] -Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP3B.tmp" -Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP3C.tmp" with contents +Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP10E.tmp" +Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP10F.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 +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" @@ -27,16 +27,20 @@ comctl32.lib winmm.lib rpcrt4.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib w "\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\RSP3C.tmp" +Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP10F.tmp"

Output Window

Compiling... -dialogs.cpp +ctsim.cpp Linking... +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... +BSCMAKE: warning BK4503 : minor error in .SBR file '.\Debug\ctsim.sbr' ignored +

Output Window

Results

-ctsim.exe - 0 error(s), 0 warning(s) +ctsim.exe - 0 error(s), 1 warning(s) diff --git a/src/ctsim.cpp b/src/ctsim.cpp index 95894c1..556f431 100644 --- a/src/ctsim.cpp +++ b/src/ctsim.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ctsim.cpp,v 1.16 2000/12/16 06:12:47 kevin Exp $ +** $Id: ctsim.cpp,v 1.17 2000/12/17 22:30:34 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 @@ -61,7 +61,7 @@ #endif #endif -static const char* rcsindent = "$Id: ctsim.cpp,v 1.16 2000/12/16 06:12:47 kevin Exp $"; +static const char* rcsindent = "$Id: ctsim.cpp,v 1.17 2000/12/17 22:30:34 kevin Exp $"; class CTSimApp* theApp = NULL; @@ -103,7 +103,12 @@ CTSimApp::OnInit() switch (c) { case O_VERSION: - std::cout << rcsindent << std::endl; + std::cout << rcsindent << std::endl; +#ifdef CTSIMVERSION + std::cout << "Version: CTSIMVERSION" << std::endl; +#elif defined(VERSION) + std::cout << "Version: VERSION" << std::endl; +#endif exit(0); case O_HELP: case '?': @@ -250,8 +255,18 @@ MainFrame::MainFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const void MainFrame::OnAbout(wxCommandEvent& WXUNUSED(event) ) -{ - wxMessageBox("CTSim\nThe Open Source Computed Tomography Simulator\nAuthor: Kevin Rosenberg \nUsage: ctsim [files-to-open..] [--help]", "About CTSim", wxOK | wxICON_INFORMATION, this); +{ + wxString msg = "CTSim\nThe Open Source Computed Tomography Simulator\n"; +#ifdef CTSIMVERSION + msg += "Version "; + msg += CTSIMVERSION; + msg += "\n\n"; +#elif defined(VERSION) + msg << "Version: " << VERSION << "\n\n"; +#endif + msg += "Author: Kevin Rosenberg \nUsage: ctsim [files-to-open..] [--help]"; + + wxMessageBox(msg, "About CTSim", wxOK | wxICON_INFORMATION, this); } void diff --git a/src/dlgprojections.cpp b/src/dlgprojections.cpp index de6d0e6..b816ae0 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.7 2000/12/16 03:29:02 kevin Exp $ +** $Id: dlgprojections.cpp,v 1.8 2000/12/17 22:30:34 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 @@ -117,7 +117,6 @@ ProjectionsDialog::ProjectionsDialog (Scanner& rScanner, Projections& rProj, con m_iClientX = sizeDlg.x; m_iClientY = sizeDlg.y; SetClientSize(sizeDlg); - m_bitmap.Create (m_iClientX, m_iClientY); // save a copy of screen Centre(wxCENTER_FRAME | wxBOTH); @@ -127,6 +126,7 @@ ProjectionsDialog::ProjectionsDialog (Scanner& rScanner, Projections& rProj, con Show(TRUE); Enable(TRUE); // enable this window + m_bitmap.Create (m_iClientX, m_iClientY); // save a copy of screen m_pDC = dynamic_cast (new wxClientDC (this)); int x, y; this->GetClientSize(&x, &y); @@ -149,7 +149,8 @@ ProjectionsDialog::showView (int iViewNumber) m_iLastView = iViewNumber; if (m_iTrace >= Trace::TRACE_PLOT) m_pSGP->setViewport (0, 0, 0.66, 1); - ::wxYield(); // update the display + ::wxYield(); // update the display + m_pSGP->setTextSize (1/25.); m_rScanner.collectProjections (m_rProjections, m_rPhantom, iViewNumber, 1, true, m_iTrace, m_pSGP); ::wxYield(); // update the display if (m_iTrace >= Trace::TRACE_PLOT) { diff --git a/src/dlgprojections.h b/src/dlgprojections.h index 2038937..eedd7b8 100644 --- a/src/dlgprojections.h +++ b/src/dlgprojections.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: dlgprojections.h,v 1.4 2000/12/16 03:29:02 kevin Exp $ +** $Id: dlgprojections.h,v 1.5 2000/12/17 22:30:34 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 @@ -42,7 +42,6 @@ class Projections; class Phantom; class SGP; class Scanner; -class SGP; class SGPDriver; class ProjectionsDialog : public wxDialog diff --git a/src/dlgreconstruct.cpp b/src/dlgreconstruct.cpp index 4729ee9..7ec1d32 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.7 2000/12/16 03:39:06 kevin Exp $ +** $Id: dlgreconstruct.cpp,v 1.8 2000/12/17 22:30:34 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 @@ -130,23 +130,27 @@ ReconstructDialog::ReconstructDialog (Reconstructor& rReconstruct, const Project m_iClientY = sizeDlg.y; SetClientSize (sizeDlg); + Centre(wxCENTER_FRAME | wxBOTH); + + if ( m_parentTop ) + m_parentTop->Enable(FALSE); + + Show(TRUE); + Enable(TRUE); // enable this window + m_bitmap.Create (m_iClientX, m_iClientY); // save a copy of screen + int x, y; + this->GetClientSize(&x, &y); +#if OLD m_pDC = new wxMemoryDC; m_pDC->SelectObject (m_bitmap); // in memoryDC - m_pDC->SetFont (*wxSWISS_FONT); - int x, y; - this->GetClientSize(&x, &y); - m_pSGPDriver = new SGPDriver (dynamic_cast(m_pDC), x, y); + m_pSGPDriver = new SGPDriver (dynamic_cast(m_pDC), x, y); +#else + m_pDC = dynamic_cast (new wxClientDC (this)); + m_pSGPDriver = new SGPDriver (m_pDC, x, y); +#endif m_pSGP = new SGP (*m_pSGPDriver); - Centre(wxCENTER_FRAME | wxBOTH); - - if ( m_parentTop ) - m_parentTop->Enable(FALSE); - - Show(TRUE); - Enable(TRUE); // enable this window - wxYield(); // Update the display m_pSGPDriver->idWX()->SetFont(*wxSWISS_FONT); @@ -156,7 +160,7 @@ ReconstructDialog::ReconstructDialog (Reconstructor& rReconstruct, const Project } void -ReconstructDialog::showView (int iViewNumber) +ReconstructDialog::showView (int iViewNumber, bool bBackprojectView) { if ( iViewNumber < m_rProjections.nView() ) { m_iLastView = iViewNumber; @@ -174,7 +178,7 @@ ReconstructDialog::showView (int iViewNumber) m_pSGP->setTextSize (dCharHeight); m_pSGP->setViewport (0.0, 0.1, 0.66, 1.); - m_rReconstructor.reconstructView (iViewNumber, 1, m_pSGP); + m_rReconstructor.reconstructView (iViewNumber, 1, m_pSGP, bBackprojectView); ImageFileArrayConst v = m_rImageFile.getArray(); int xBase = m_nxGraph; @@ -221,7 +225,7 @@ ReconstructDialog::reconstructView (int iViewNumber) if (iViewNumber < m_rProjections.nView()) { ::wxYield(); // update the display - showView (iViewNumber); + showView (iViewNumber, true); ::wxYield(); // update the display if (m_iTrace >= Trace::TRACE_PLOT) { ::wxUsleep(250); @@ -267,7 +271,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) { + if (m_state == Continue) { +#ifndef OLD + m_memoryDC.SelectObject (m_bitmap); // in memoryDC + m_pSGP->setDC (&m_memoryDC); + m_memoryDC.SetFont (*wxSWISS_FONT); + showView (m_iLastView, false); + m_pSGP->setDC (m_pDC); + m_memoryDC.SelectObject(wxNullBitmap); +#endif m_state = Paused; m_btnPause->SetLabel (wxString("Resume")); } else if (m_state == Paused) { @@ -283,7 +295,15 @@ ReconstructDialog::OnStep (wxCommandEvent& event) if ( m_state == Finished ) { event.Skip(); } else { - if (m_state == Continue) { + if (m_state == Continue) { +#ifndef OLD + m_memoryDC.SelectObject (m_bitmap); // in memoryDC + m_pSGP->setDC (&m_memoryDC); + m_memoryDC.SetFont (*wxSWISS_FONT); + m_rReconstructor.reconstructView (m_iLastView, 1, m_pSGP, false); + m_pSGP->setDC (m_pDC); + m_memoryDC.SelectObject(wxNullBitmap); +#endif m_state = Paused; m_btnPause->SetLabel (wxString("Resume")); } else if (m_state == Paused) { @@ -305,8 +325,9 @@ void ReconstructDialog::OnClose(wxCloseEvent& event) void ReconstructDialog::OnPaint (wxPaintEvent& event) { - wxPaintDC paintDC (this); - paintDC.DrawBitmap(m_bitmap, 0, 0, false); + wxPaintDC paintDC (this); + if (m_state == Paused) + paintDC.DrawBitmap(m_bitmap, 0, 0, false); } diff --git a/src/dlgreconstruct.h b/src/dlgreconstruct.h index fa44d89..9e08e4a 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.3 2000/12/16 03:29:02 kevin Exp $ +** $Id: dlgreconstruct.h,v 1.4 2000/12/17 22:30:34 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 @@ -91,7 +91,11 @@ private: SGPDriver* m_pSGPDriver; SGP* m_pSGP; const int m_iTrace; +#if OLD wxMemoryDC* m_pDC; +#else + wxDC* m_pDC; +#endif wxButton *m_btnAbort; // the abort button (or NULL if none) wxButton *m_btnPause; @@ -120,7 +124,7 @@ private: const static int MAX_IMAGE_X; const static int MAX_IMAGE_Y; - void showView (int iViewNumber); + void showView (int iViewNumber, bool bBackprojectView = true); DECLARE_EVENT_TABLE() }; diff --git a/src/docs.cpp b/src/docs.cpp index 034cfe7..096a61b 100644 --- a/src/docs.cpp +++ b/src/docs.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: docs.cpp,v 1.4 2000/12/16 06:12:47 kevin Exp $ +** $Id: docs.cpp,v 1.5 2000/12/17 22:30:34 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 @@ -72,7 +72,7 @@ bool ImageFileDocument::OnOpenDocument(const wxString& filename) wxString untitledFilename = theApp->getUntitledFilename(); SetFilename (untitledFilename, true); } else { - if (! m_imageFile.fileRead (filename)) { + if (! m_imageFile.fileRead (filename.c_str())) { *theApp->getLog() << "Unable to read image file " << filename << "\n"; return false; } @@ -106,7 +106,7 @@ IMPLEMENT_DYNAMIC_CLASS(ProjectionFileDocument, wxDocument) bool ProjectionFileDocument::OnSaveDocument(const wxString& filename) { - if (! m_projectionFile.write (filename)) { + if (! m_projectionFile.write (filename.c_str())) { *theApp->getLog() << "Unable to write projection file " << filename << "\n"; return false; } @@ -121,7 +121,7 @@ bool ProjectionFileDocument::OnOpenDocument(const wxString& filename) wxString untitledFilename = theApp->getUntitledFilename(); SetFilename (untitledFilename, true); } else { - if (! m_projectionFile.read (filename)) { + if (! m_projectionFile.read (filename.c_str())) { *theApp->getLog() << "Unable to read projection file " << filename << "\n"; return false; } diff --git a/src/views.cpp b/src/views.cpp index 2ee032f..b068214 100644 --- a/src/views.cpp +++ b/src/views.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: views.cpp,v 1.26 2000/12/17 19:30:02 kevin Exp $ +** $Id: views.cpp,v 1.27 2000/12/17 22:30:34 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 @@ -139,7 +139,7 @@ ImageFileView::OnProperties (wxCommandEvent& event) const std::string& rFilename = rIF.getFilename(); rIF.statistics (min, max, mean, mode, median, stddev); std::ostringstream os; - os << "file: " << rFilename << "\nmin: "<getLog() << os.str().c_str(); wxMessageDialog dialogMsg (m_frame, os.str().c_str(), "Imagefile Properties", wxOK | wxICON_INFORMATION); dialogMsg.ShowModal(); @@ -465,9 +465,9 @@ PhantomView::OnProjections (wxCommandEvent& event) } std::ostringstream os; - os << "Projections for " << rPhantom.name() << ": nDet=" << m_iDefaultNDet << ", nView=" << m_iDefaultNView << ", nSamples=" << m_iDefaultNSample << ", RotAngle=" << m_dDefaultRotation << ", FocalLengthRatio=" << m_dDefaultFocalLength << ", FieldOfViewRatio=" << m_dDefaultFieldOfView << ", Geometry=" << sGeometry.c_str() << "\n"; + os << "Projections for " << rPhantom.name() << ": nDet=" << m_iDefaultNDet << ", nView=" << m_iDefaultNView << ", nSamples=" << m_iDefaultNSample << ", RotAngle=" << m_dDefaultRotation << ", FocalLengthRatio=" << m_dDefaultFocalLength << ", FieldOfViewRatio=" << m_dDefaultFieldOfView << ", Geometry=" << sGeometry.c_str(); rProj.setRemark (os.str()); - *theApp->getLog() << os.str().c_str(); + *theApp->getLog() << os.str().c_str() << "\n"; m_frame->Lower(); ::wxYield(); @@ -791,8 +791,8 @@ ProjectionFileView::OnReconstruct (wxCommandEvent& event) pReconDoc->Modify(true); pReconDoc->UpdateAllViews(this); std::ostringstream os; - os << "Reconstruct " << rProj.getFilename() << ": xSize=" << m_iDefaultNX << ", ySize=" << m_iDefaultNY << ", Filter=" << optFilterName.c_str() << ", FilterParam=" << m_dDefaultFilterParam << ", FilterMethod=" << optFilterMethodName.c_str() << ", FilterGeneration=" << optFilterGenerationName.c_str() << ", Zeropad=" << m_iDefaultZeropad << ", Interpolation=" << optInterpName.c_str() << ", InterpolationParam=" << m_iDefaultInterpParam << ", Backprojection=" << optBackprojectName.c_str() << "\n"; - *theApp->getLog() << os.str().c_str(); + os << "Reconstruct " << rProj.getFilename() << ": xSize=" << m_iDefaultNX << ", ySize=" << m_iDefaultNY << ", Filter=" << optFilterName.c_str() << ", FilterParam=" << m_dDefaultFilterParam << ", FilterMethod=" << optFilterMethodName.c_str() << ", FilterGeneration=" << optFilterGenerationName.c_str() << ", Zeropad=" << m_iDefaultZeropad << ", Interpolation=" << optInterpName.c_str() << ", InterpolationParam=" << m_iDefaultInterpParam << ", Backprojection=" << optBackprojectName.c_str(); + *theApp->getLog() << os.str().c_str() << "\n"; imageFile.labelAdd (rProj.getLabel()); imageFile.labelAdd (Array2dFileLabel::L_HISTORY, os.str().c_str(), timerRecon.timerEnd()); } diff --git a/tools/pjinfo.cpp b/tools/pjinfo.cpp index 265a9fe..d5086b9 100644 --- a/tools/pjinfo.cpp +++ b/tools/pjinfo.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: pjinfo.cpp,v 1.3 2000/12/16 07:28:25 kevin Exp $ +** $Id: pjinfo.cpp,v 1.4 2000/12/17 22:30:34 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,7 +50,7 @@ static struct option my_options[] = {0, 0, 0, 0} }; -static const char* g_szIdStr = "$Id: pjinfo.cpp,v 1.3 2000/12/16 07:28:25 kevin Exp $"; +static const char* g_szIdStr = "$Id: pjinfo.cpp,v 1.4 2000/12/17 22:30:34 kevin Exp $"; void pjinfo_usage (const char *program) @@ -102,7 +102,7 @@ pjinfo_main (const int argc, char *const argv[]) optStartView = strtol(optarg, &endptr, 10); endstr = optarg + strlen(optarg); if (endptr != endstr) { - cerr << "Error setting --startview to %s" << optarg << std::endl; + std::cerr << "Error setting --startview to %s" << optarg << std::endl; pjinfo_usage(argv[0]); return (1); } @@ -111,7 +111,7 @@ pjinfo_main (const int argc, char *const argv[]) optEndView = strtol(optarg, &endptr, 10); endstr = optarg + strlen(optarg); if (endptr != endstr) { - cerr << "Error setting --endview to %s" << optarg << std::endl; + std::cerr << "Error setting --endview to %s" << optarg << std::endl; pjinfo_usage(argv[0]); return (1); } @@ -173,9 +173,9 @@ main (const int argc, char *const argv[]) try { retval = pjinfo_main(argc, argv); } catch (exception e) { - cerr << "Exception: " << e.what() << std::endl; + std::cerr << "Exception: " << e.what() << std::endl; } catch (...) { - cerr << "Unknown exception\n"; + std::cerr << "Unknown exception\n"; } return (retval); diff --git a/tools/pjrec.cpp b/tools/pjrec.cpp index d87a76d..7426f47 100644 --- a/tools/pjrec.cpp +++ b/tools/pjrec.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: pjrec.cpp,v 1.19 2000/12/16 06:12:47 kevin Exp $ +** $Id: pjrec.cpp,v 1.20 2000/12/17 22:30:34 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 @@ -27,7 +27,6 @@ #include "ct.h" #include "timer.h" - enum {O_INTERP, O_FILTER, O_FILTER_METHOD, O_ZEROPAD, O_FILTER_PARAM, O_FILTER_GENERATION, O_BACKPROJ, O_PREINTERPOLATION_FACTOR, O_VERBOSE, O_TRACE, O_HELP, O_DEBUG, O_VERSION}; @@ -49,8 +48,8 @@ static struct option my_options[] = {0, 0, 0, 0} }; -static const char* g_szIdStr = "$Id: pjrec.cpp,v 1.19 2000/12/16 06:12:47 kevin Exp $"; - +static const char* g_szIdStr = "$Id: pjrec.cpp,v 1.20 2000/12/17 22:30:34 kevin Exp $"; + void pjrec_usage (const char *program) { -- 2.34.1