r273: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 17 Dec 2000 22:30:34 +0000 (22:30 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 17 Dec 2000 22:30:34 +0000 (22:30 +0000)
12 files changed:
include/reconstruct.h
libctsim/reconstruct.cpp
msvc/ctsim/ctsim.plg
src/ctsim.cpp
src/dlgprojections.cpp
src/dlgprojections.h
src/dlgreconstruct.cpp
src/dlgreconstruct.h
src/docs.cpp
src/views.cpp
tools/pjinfo.cpp
tools/pjrec.cpp

index 70c2ca6f28aafd88dbad4ded7fd64fb14cc95ca5..ad93c310e77c0b78e474f362ebcc1686a2ca00ea 100644 (file)
@@ -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;
index 7a27208597d1be2f515dd64ffc4ac23c20355814..ded9420ca6c6ef30477ff73c2e708ff2f6866410 100644 (file)
@@ -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());
+\r
+       if (bBackprojectView)
+      m_pBackprojector->BackprojectView (adFilteredProj, rDetArray.viewAngle());
 
 #ifdef HAVE_SGP
     if (m_iTrace >= Trace::TRACE_PLOT && pSGP) {
index cc5f910f79600854dd79a147db426a4ae9a54387..05e7d4950527e20496bc7b5d8bb55cd96af6b97f 100644 (file)
@@ -6,15 +6,15 @@
 --------------------Configuration: ctsim - Win32 Debug--------------------\r
 </h3>\r
 <h3>Command Lines</h3>\r
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP3B.tmp" with contents\r
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP10E.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 "_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 \r
-"C:\ctsim-2.0.6\src\dialogs.cpp"\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\ctsim.cpp"\r
 ]\r
-Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP3B.tmp" \r
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP3C.tmp" with contents\r
+Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP10E.tmp" \r
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP10F.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 \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
@@ -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"\r
 "\wx2\lib\wxd.lib"\r
 ]\r
-Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP3C.tmp"\r
+Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP10F.tmp"\r
 <h3>Output Window</h3>\r
 Compiling...\r
-dialogs.cpp\r
+ctsim.cpp\r
 Linking...\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
+BSCMAKE: warning BK4503 : minor error in .SBR file '.\Debug\ctsim.sbr' ignored\r
+<h3>Output Window</h3>\r
 \r
 \r
 \r
 <h3>Results</h3>\r
-ctsim.exe - 0 error(s), 0 warning(s)\r
+ctsim.exe - 0 error(s), 1 warning(s)\r
 </pre>\r
 </body>\r
 </html>\r
index 95894c15a0b1f1eac2634e1e8068036a50c3a4d3..556f431540186e5947390ea60dd60347dce97531 100644 (file)
@@ -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
 \r
-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;\r
+#ifdef CTSIMVERSION\r
+                 std::cout << "Version: CTSIMVERSION" << std::endl;\r
+#elif defined(VERSION)\r
+                 std::cout << "Version: VERSION" << std::endl;\r
+#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 <kevin@rosenberg.net>\nUsage: ctsim [files-to-open..] [--help]", "About CTSim", wxOK | wxICON_INFORMATION, this);
+{\r
+       wxString msg = "CTSim\nThe Open Source Computed Tomography Simulator\n";\r
+#ifdef CTSIMVERSION\r
+       msg += "Version ";\r
+       msg += CTSIMVERSION;\r
+       msg += "\n\n";\r
+#elif defined(VERSION)\r
+       msg << "Version: " <<  VERSION << "\n\n";\r
+#endif\r
+       msg += "Author: Kevin Rosenberg <kevin@rosenberg.net>\nUsage: ctsim [files-to-open..] [--help]";\r
+
+    wxMessageBox(msg, "About CTSim", wxOK | wxICON_INFORMATION, this);
 }
 
 void 
index de6d0e634fbb7ef7e0179fa9ea9ca614654e5cee..b816ae0ba6a88476d88ae0e8bf38638235002d3a 100644 (file)
@@ -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\r
     m_pDC = dynamic_cast<wxDC*> (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\r
+    m_pSGP->setTextSize (1/25.);\r
        m_rScanner.collectProjections (m_rProjections, m_rPhantom, iViewNumber, 1, true, m_iTrace, m_pSGP);
        ::wxYield();        // update the display
        if (m_iTrace >= Trace::TRACE_PLOT) {
index 203893775f7eb5390e5b1d547542a9261dca7a69..eedd7b826ec55be79247108b5e6f6d19b5ab4d51 100644 (file)
@@ -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
index 4729ee9c3930aad1542da8bf967d841a04e7d77b..7ec1d326d03135e7d0a372bc1e3b680d6a3f3804 100644 (file)
@@ -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);\r
+\r
+    if ( m_parentTop )\r
+      m_parentTop->Enable(FALSE);\r
+\r
+    Show(TRUE);\r
+    Enable(TRUE); // enable this window\r
+\r
     m_bitmap.Create (m_iClientX, m_iClientY); // save a copy of screen
+    int x, y;\r
+    this->GetClientSize(&x, &y);\r
+#if OLD\r
     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<wxDC*>(m_pDC), x, y);
+    m_pSGPDriver = new SGPDriver (dynamic_cast<wxDC*>(m_pDC), x, y);\r
+#else\r
+    m_pDC = dynamic_cast<wxDC*> (new wxClientDC (this));\r
+    m_pSGPDriver = new SGPDriver (m_pDC, x, y);\r
+#endif\r
     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) {\r
+#ifndef OLD\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_pSGP->setDC (m_pDC);\r
+         m_memoryDC.SelectObject(wxNullBitmap);\r
+#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) {\r
+#ifndef OLD\r
+         m_memoryDC.SelectObject (m_bitmap);       // in memoryDC\r
+         m_pSGP->setDC (&m_memoryDC);\r
+         m_memoryDC.SetFont (*wxSWISS_FONT);\r
+      m_rReconstructor.reconstructView (m_iLastView, 1, m_pSGP, false);\r
+         m_pSGP->setDC (m_pDC);\r
+         m_memoryDC.SelectObject(wxNullBitmap);\r
+#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);\r
+  if (m_state == Paused)
+    paintDC.DrawBitmap(m_bitmap, 0, 0, false);
 }
 
 
index fa44d89a8b640f9ed7efc29cc57d02e5141eb91a..9e08e4a87b42c859a8dd450e2540af0ceb7fd437 100644 (file)
@@ -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\r
    wxMemoryDC* m_pDC;
+#else\r
+   wxDC* m_pDC;\r
+#endif\r
 
    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()
 };
index 034cfe710041604be7815baf7575c92feb095ee6..096a61b6a0b33828eca4f45d350e0a19a71608cc 100644 (file)
@@ -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;
     }
index 2ee032f8e7b67ad45f3c05bb1ef7298edd170153..b068214dd3eb6c27d49d38a8f1396f82879db6eb 100644 (file)
@@ -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: "<<min<<"\nmax: "<<max<<"\nmean: "<<mean<<"\nmode: "<<mode<<"\nstddev: "<<stddev << "\n";
+    os << "file: " << rFilename << "\nmin: "<<min<<"\nmax: "<<max<<"\nmean: "<<mean<<"\nmedian: "<<median<<"\nmode: "<<mode<<"\nstddev: "<<stddev << "\n";
     *theApp->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());
     }
index 265a9fecd6539c8633dc69234e35695dfb34d2ab..d5086b9bfe5601f9e01b7c6b7365b3288b6510cb 100644 (file)
@@ -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);
index d87a76d521653d4998d8f3851312a6f4614945aa..7426f47125117b48c16a152b6262403808e7fbeb 100644 (file)
@@ -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"
-\r
 
 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 $";
-\r
+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)
 {