r468: Fixed shutdown error (i hope!)
authorKevin M. Rosenberg <kevin@rosenberg.net>
Mon, 29 Jan 2001 23:11:32 +0000 (23:11 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Mon, 29 Jan 2001 23:11:32 +0000 (23:11 +0000)
include/reconstruct.h
libctsim/reconstruct.cpp
msvc/ctsim.dsw
msvc/ctsim/ctsim.dsp
msvc/ctsim/ctsim.plg
msvc/ctsimtext/ctsimtext.dsp
msvc/libctsim/libctsim.dsp
src/ctsim.cpp
src/ctsim.h
src/dlgreconstruct.cpp
src/views.cpp

index 5ab448ac40562a045847b9a13c3cef15bffc55ff..83d54762d5002c6742c0ca5ef35e08d8813405f5 100644 (file)
@@ -8,7 +8,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: reconstruct.h,v 1.4 2001/01/28 19:10:18 kevin Exp $
+**  $Id: reconstruct.h,v 1.5 2001/01/29 23:11:32 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, bool bBackprojectView = true);
+    void reconstructView (int iStartView = 0, int iViewCount = -1, SGP* pSGP = NULL, bool bBackprojectView = true, double dGraphWidth = 1.);
     
  private:
     const Projections& m_rProj;
index 4b1b4a81b4b0a40b0f16ed786a0a107180feb3db..67d141474d2284ef06c13f12c8028599b232710f 100644 (file)
@@ -8,7 +8,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: reconstruct.cpp,v 1.9 2001/01/28 19:10:18 kevin Exp $
+**  $Id: reconstruct.cpp,v 1.10 2001/01/29 23:11:32 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, bool bBackprojectView)
+Reconstructor::reconstructView (int iStartView, int iViewCount, SGP* pSGP, bool bBackprojectView, double dGraphWidth)
 {
   double* adFilteredProj = new double [m_nFilteredProjections];   // filtered projections
 
@@ -173,6 +173,8 @@ Reconstructor::reconstructView (int iStartView, int iViewCount, SGP* pSGP, bool
     if (m_iTrace >= Trace::TRACE_PLOT && pSGP) {
       EZPlot ezplotProj;
 
+      std::ostringstream osXLength;
+      osXLength << "xlength " << dGraphWidth;
       ezplotProj.ezset ("clear");
       ezplotProj.ezset ("title Raw Projection");
       ezplotProj.ezset ("xticks major 5");
@@ -180,7 +182,7 @@ Reconstructor::reconstructView (int iStartView, int iViewCount, SGP* pSGP, bool
       ezplotProj.ezset ("ylabel ");
       ezplotProj.ezset ("yporigin 0.1");
       ezplotProj.ezset ("ylength 0.45");
-      ezplotProj.ezset ("xlength 0.66");
+      ezplotProj.ezset (osXLength.str().c_str());
       ezplotProj.ezset ("box.");
       ezplotProj.ezset ("grid.");
       ezplotProj.addCurve (m_adPlotXAxis, detval, m_rProj.nDet());
@@ -193,7 +195,7 @@ Reconstructor::reconstructView (int iStartView, int iViewCount, SGP* pSGP, bool
       ezplotProj.ezset ("ylabel ");
       ezplotProj.ezset ("yporigin 0.55");
       ezplotProj.ezset ("ylength 0.45");
-      ezplotProj.ezset ("xlength 0.66");
+      ezplotProj.ezset (osXLength.str().c_str());
       ezplotProj.ezset ("box");
       ezplotProj.ezset ("grid");
       ezplotProj.addCurve (m_adPlotXAxis, adFilteredProj,  m_nFilteredProjections);
index fad76a89f8990f9c397be50d3ee7f95551b8ff28..1b3e3f32bf082b214a367625c8b56cf8541b1d52 100644 (file)
@@ -35,15 +35,6 @@ Package=<5>
 
 Package=<4>
 {{{
-    Begin Project Dependency
-    Project_Dep_Name libpng
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name wxvc
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name zlib
-    End Project Dependency
 }}}
 
 ###############################################################################
@@ -60,18 +51,6 @@ Package=<4>
 
 ###############################################################################
 
-Project: "ThreadVC"=..\..\wx2\samples\thread\ThreadVC.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
 Project: "ctsim"=.\ctsim\ctsim.dsp - Package Owner=<4>
 
 Package=<5>
@@ -87,20 +66,26 @@ Package=<4>
     Project_Dep_Name FFTW2st
     End Project Dependency
     Begin Project Dependency
-    Project_Dep_Name libpng
+    Project_Dep_Name RFFTW2st
     End Project Dependency
     Begin Project Dependency
-    Project_Dep_Name RFFTW2st
+    Project_Dep_Name jpeg
     End Project Dependency
     Begin Project Dependency
-    Project_Dep_Name wxvc
+    Project_Dep_Name png
     End Project Dependency
     Begin Project Dependency
-    Project_Dep_Name zlib
+    Project_Dep_Name tiff
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name wxvc
     End Project Dependency
     Begin Project Dependency
     Project_Dep_Name xpm
     End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name zlib
+    End Project Dependency
 }}}
 
 ###############################################################################
@@ -117,14 +102,20 @@ Package=<4>
     Project_Dep_Name libctsim
     End Project Dependency
     Begin Project Dependency
-    Project_Dep_Name libpng
-    End Project Dependency
-    Begin Project Dependency
     Project_Dep_Name RFFTW2st
     End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name zlib
-    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "jpeg"=..\..\wx2.2.5\src\jpeg\JpegVC.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
 }}}
 
 ###############################################################################
@@ -141,7 +132,19 @@ Package=<4>
 
 ###############################################################################
 
-Project: "libpng"=..\..\lpng108\msvc\libpng.dsp - Package Owner=<4>
+Project: "png"=..\..\wx2.2.5\src\png\PngVC.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "tiff"=..\..\wx2.2.5\src\tiff\TiffVC.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -149,14 +152,11 @@ Package=<5>
 
 Package=<4>
 {{{
-    Begin Project Dependency
-    Project_Dep_Name zlib
-    End Project Dependency
 }}}
 
 ###############################################################################
 
-Project: "wxvc"=..\..\wx2\src\wxvc.dsp - Package Owner=<4>
+Project: "wxvc"=..\..\wx2.2.5\src\wxvc.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -168,7 +168,7 @@ Package=<4>
 
 ###############################################################################
 
-Project: "xpm"=..\..\wx2\src\xpm\XpmVC.dsp - Package Owner=<4>
+Project: "xpm"=..\..\wx2.2.5\src\xpm\XpmVC.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -180,7 +180,7 @@ Package=<4>
 
 ###############################################################################
 
-Project: "zlib"=..\..\lpng108\msvc\zlib.dsp - Package Owner=<4>
+Project: "zlib"=..\..\wx2.2.5\src\zlib\ZlibVC.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
index 120c4d1f3bd20783dd38295de0d20c017fd9f549..80372632e15b5fcca9f836dd1ff07742b37e5875 100644 (file)
@@ -47,13 +47,13 @@ RSC=rc.exe
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 # ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /i "\wx2\include\wx\msw" /i "\wx2\include" /d "NDEBUG"
+# ADD RSC /l 0x409 /i "\wx2.2.1\include" /d "NDEBUG"
 BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
-# ADD LINK32 kernel32.lib user32.lib wsock32.lib comctl32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libpng.lib zlib.lib xpm.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\..\lpng108\msvc\win32\libpng\lib" /libpath:"..\..\..\lpng108\msvc\win32\zlib\lib" /libpath:"..\..\..\wx2\lib"
+# ADD LINK32 kernel32.lib user32.lib wsock32.lib comctl32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tiff.lib jpeg.lib png.lib zlib.lib xpm.lib /nologo /subsystem:windows /machine:I386
 
 !ELSEIF  "$(CFG)" == "ctsim - Win32 Debug"
 
@@ -69,17 +69,17 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
-# ADD 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.5.0\" /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.0beta1\" /FR /YX /FD /GZ /c
+# ADD CPP /nologo /G6 /MTd /W3 /Gm /Gi /GR /GX /Zi /Od /Gy /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.5.0\" /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.0beta1\" /FR /YX /FD /GZ /c
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /i "\wx2\include\wx\msw" /i "\wx2\include" /d "_DEBUG"
+# ADD RSC /l 0x409 /i "\wx2.2.1\include" /d "_DEBUG"
 BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 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 xpmd.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\lpng108\msvc\win32\libpng\lib" /libpath:"..\..\..\lpng108\msvc\win32\zlib\lib" /libpath:"..\..\..\wx2\lib"
+# ADD LINK32 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 pngd.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 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
 # SUBTRACT LINK32 /nodefaultlib
 
 !ENDIF 
index 7165ee268e633d47cde03da04447773c155845d6..28f7e041aa5b01d5f73450bfa0ef5a38c3332ba4 100644 (file)
@@ -3,99 +3,18 @@
 <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\RSP14A2.tmp" with contents
-[
-/nologo /G6 /MTd /W3 /Gm /GR /GX /Zi /Od /I "..\..\..\zlib" /I "..\..\INCLUDE" /I "..\..\getopt" /I "..\..\..\lpng108" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /I "..\..\..\wx2\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 
-"D:\ctsim\libctgraphics\dlgezplot.cpp"
-"D:\ctsim\libctsim\globalvars.cpp"
-"D:\ctsim\libctsupport\syserror.cpp"
-]
-Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP14A2.tmp" 
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP14A3.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\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\RSP14A3.tmp"
-<h3>Output Window</h3>
-Compiling...
-dlgezplot.cpp
-Skipping... (no relevant changes detected)
-globalvars.cpp
-syserror.cpp
-Creating library...
-<h3>
---------------------Configuration: FFTW2st - Win32 Debug--------------------
-</h3>
-<h3>Command Lines</h3>
-<h3>
---------------------Configuration: zlib - Win32 DLL--------------------
-</h3>
-<h3>Command Lines</h3>
-<h3>
---------------------Configuration: libpng - Win32 DLL--------------------
-</h3>
-<h3>Command Lines</h3>
-<h3>
---------------------Configuration: RFFTW2st - Win32 Debug--------------------
-</h3>
-<h3>Command Lines</h3>
-<h3>
---------------------Configuration: wxvc - Win32 Debug--------------------
-</h3>
-<h3>Command Lines</h3>
-<h3>
---------------------Configuration: xpm - Win32 Debug--------------------
-</h3>
-<h3>Command Lines</h3>
-<h3>
 --------------------Configuration: ctsim - Win32 Debug--------------------
 </h3>
 <h3>Command Lines</h3>
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP14A4.tmp" with contents
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP24C.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.5.0\" /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.0alpha5\" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c 
-"D:\ctsim\src\ctsim.cpp"
-"D:\ctsim\src\dialogs.cpp"
-"D:\ctsim\src\docs.cpp"
-"D:\ctsim\src\views.cpp"
+/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.0alpha5\" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c 
+"C:\ctsim\src\views.cpp"
 ]
-Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP14A4.tmp" 
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP14A5.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP24C.tmp" 
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP24D.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 xpmd.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/ctsim.pdb" /debug /machine:I386 /out:"Debug/ctsim.exe" /pdbtype:sept /libpath:"..\..\..\lpng108\msvc\win32\libpng\lib" /libpath:"..\..\..\lpng108\msvc\win32\zlib\lib" /libpath:"..\..\..\wx2\lib" 
+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 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 /nologo /subsystem:windows /incremental:yes /pdb:"Debug/ctsim.pdb" /debug /machine:I386 /out:"Debug/ctsim.exe" /pdbtype:sept /libpath:"\wx2.2.5\lib" 
 .\Debug\ctsim.obj
 .\Debug\dialogs.obj
 .\Debug\dlgprojections.obj
@@ -106,17 +25,17 @@ comctl32.lib winmm.lib rpcrt4.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib w
 \ctsim\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
-\wx2\lib\xpmd.lib
+\wx2.2.5\lib\jpegd.lib
+\wx2.2.5\lib\pngd.lib
+\wx2.2.5\lib\tiffd.lib
+\wx2.2.5\lib\wxd.lib
+\wx2.2.5\lib\xpmd.lib
+\wx2.2.5\lib\zlibd.lib
 ]
-Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP14A5.tmp"
+Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP24D.tmp"
 <h3>Output Window</h3>
 Compiling...
-ctsim.cpp
 views.cpp
-Skipping... (no relevant changes detected)
-dialogs.cpp
-docs.cpp
 Linking...
 
 
index e470deca8f586397353ac82f9ccb07fcc8a06bdf..30464d982254f8f6acf53a2b2a6c542f870425c0 100644 (file)
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /I "../../include" /I "../../getopt" /I "..\..\..\lpng108" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /I "..\..\..\zlib" /I "..\..\..\wx2\include" /D "NDEBUG" /D "HAVE_GETOPT_H" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MSVC" /D "HAVE_STRING_H" /D "HAVE_PNG" /D "NO_MAIN" /D "HAVE_WXWINDOWS" /D "__WXMSW__" /YX /FD /c
+# ADD CPP /nologo /G6 /MT /W3 /GR /GX /O2 /I "../../include" /I "../../getopt" /I "..\..\..\lpng108" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /I "..\..\..\zlib" /I "..\..\..\wx2\include" /D "NDEBUG" /D "HAVE_GETOPT_H" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MSVC" /D "HAVE_STRING_H" /D "HAVE_PNG" /D "NO_MAIN" /D "HAVE_WXWINDOWS" /D "__WXMSW__" /YX /FD /c
 # ADD BASE RSC /l 0x409 /d "NDEBUG"
 # ADD RSC /l 0x409 /d "NDEBUG"
 BSC32=bscmake.exe
@@ -50,7 +50,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.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 /nologo /subsystem:console /machine:I386
-# ADD LINK32 wx.lib libctsim.lib zlib.lib comctl32.lib wsock32.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 libpng.lib ..\..\..\fftw-2.1.3\Win32\FFTW2st\Release\FFTW2st.lib ..\..\..\fftw-2.1.3\Win32\RFFTW2st\Release\RFFTW2st.lib xpmd.lib /nologo /subsystem:console /machine:I386 /libpath:"..\libctsim\Release" /libpath:"..\..\..\lpng108\msvc\win32\libpng\lib" /libpath:"..\..\..\wx2\lib" /libpath:"..\..\..\lpng108\msvc\win32\zlib\lib"
+# ADD LINK32 wx.lib libctsim.lib zlib.lib comctl32.lib wsock32.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 tiff.lib jpeg.lib png.lib ..\..\..\fftw-2.1.3\Win32\FFTW2st\Release\FFTW2st.lib ..\..\..\fftw-2.1.3\Win32\RFFTW2st\Release\RFFTW2st.lib xpmd.lib /nologo /subsystem:console /machine:I386
 
 !ELSEIF  "$(CFG)" == "ctsimtext - Win32 Debug"
 
@@ -66,7 +66,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /GR /GX /ZI /Od /I "../../include" /I "../../getopt" /I "..\..\..\lpng108" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /I "..\..\..\zlib" /I "..\..\..\wx2\include" /D "_DEBUG" /D "HAVE_GETOPT_H" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MSVC" /D "HAVE_STRING_H" /D "HAVE_PNG" /D "NO_MAIN" /D "HAVE_WXWINDOWS" /D "__WXMSW__" /FR /YX /FD /GZ /c
+# ADD CPP /nologo /G6 /MTd /W3 /Gm /Gi /GR /GX /Zi /Od /Gy /I "../../include" /I "../../getopt" /I "..\..\..\lpng108" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /I "..\..\..\zlib" /I "..\..\..\wx2\include" /D "_DEBUG" /D "HAVE_GETOPT_H" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MSVC" /D "HAVE_STRING_H" /D "HAVE_PNG" /D "NO_MAIN" /D "HAVE_WXWINDOWS" /D "__WXMSW__" /FR /YX /FD /GZ /c
 # ADD BASE RSC /l 0x409 /d "_DEBUG"
 # ADD RSC /l 0x409 /d "_DEBUG"
 BSC32=bscmake.exe
@@ -74,7 +74,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 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  ../../../wx2/lib/xpmd.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrtd.lib" /pdbtype:sept /libpath:"..\..\..\lpng108\msvc\win32\libpng\lib" /libpath:"..\..\..\lpng108\msvc\win32\zlib\lib"
+# ADD LINK32 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 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib pngd.lib  zlibd.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 xpmd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
 # SUBTRACT LINK32 /verbose /incremental:no /nodefaultlib
 
 !ENDIF 
index 89332dd3bc471ce82c996920ee56d2bb9d876aaa..b17a3e0647b7a6d0a66cc73b25b1d53a7d4060f8 100644 (file)
@@ -67,7 +67,7 @@ LIB32=link.exe -lib
 # PROP Target_Dir ""
 MTL=midl.exe
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /GR /GX /Zi /Od /I "..\..\..\zlib" /I "..\..\INCLUDE" /I "..\..\getopt" /I "..\..\..\lpng108" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /I "..\..\..\wx2\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 /YX /FD /GZ /c
+# ADD CPP /nologo /G6 /MTd /W3 /Gm /Gi /GR /GX /Zi /Od /Gy /I "..\..\..\zlib" /I "..\..\INCLUDE" /I "..\..\getopt" /I "..\..\..\lpng108" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /I "..\..\..\wx2\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 /YX /FD /GZ /c
 # SUBTRACT CPP /X
 # ADD BASE RSC /l 0x409 /d "_DEBUG"
 # ADD RSC /l 0x409 /d "_DEBUG"
index 87aec7e458349597b9163cf9bfde661f10f280f9..a55ba8e3d0e38cc953e05f906a3cb5ba81a23a1e 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ctsim.cpp,v 1.57 2001/01/29 00:42:26 kevin Exp $
+**  $Id: ctsim.cpp,v 1.58 2001/01/29 23:11:32 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
@@ -70,7 +70,7 @@
 #endif
 #endif
 
-static const char* rcsindent = "$Id: ctsim.cpp,v 1.57 2001/01/29 00:42:26 kevin Exp $";
+static const char* rcsindent = "$Id: ctsim.cpp,v 1.58 2001/01/29 23:11:32 kevin Exp $";
 
 struct option CTSimApp::ctsimOptions[] = 
 {
@@ -445,8 +445,7 @@ MainFrame::OnCreateFilter (wxCommandEvent& WXUNUSED(event))
                rIF.setArraySize (m_iDefaultFilterXSize, m_iDefaultFilterYSize);
                rIF.filterResponse (strDomain.c_str(), m_dDefaultFilterBandwidth, strFilter.c_str(), m_dDefaultFilterParam, m_dDefaultFilterInputScale, m_dDefaultFilterOutputScale);
                rIF.labelAdd (os.str().c_str());
-               if (theApp->getSetModifyNewDocs())
-                       pFilterDoc->Modify (true);
+    pFilterDoc->Modify (true);
                pFilterDoc->UpdateAllViews();
                pFilterDoc->GetFirstView()->OnUpdate (NULL, NULL);
                pFilterDoc->getView()->getFrame()->SetClientSize(m_iDefaultFilterXSize, m_iDefaultFilterYSize);
@@ -534,6 +533,7 @@ MainFrame::OnExit (wxCommandEvent& WXUNUSED(event) )
 void
 MainFrame::OnUpdateUI (wxUpdateUIEvent& rEvent)
 {
+#ifndef CTSIM_MDI
        int iPos = 0;
        wxList& rListDocs = theApp->getDocManager()->GetDocuments();
        wxNode* pNode = rListDocs.GetFirst();
@@ -555,7 +555,7 @@ MainFrame::OnUpdateUI (wxUpdateUIEvent& rEvent)
                static_cast<wxMenuItemBase*>(m_apWindowMenuItems[i])->SetName (wxString("[EMPTY]"));
                m_apWindowMenuData[i] = NULL;
        }
-       
+#endif 
 }
 
 #ifdef CTSIM_CUSTOM_MRU
@@ -776,7 +776,7 @@ CTSimApp::newProjectionDoc()
                                pFrame->Show (false);
                        }
                }
-               newDoc->OnNewDocument();
+//             newDoc->OnNewDocument();
        }
        
        return newDoc;
@@ -795,7 +795,7 @@ CTSimApp::newImageDoc()
                                pFrame->Show (false);
                        }
                }
-               newDoc->OnNewDocument();
+//             newDoc->OnNewDocument();
        }
        
        return newDoc;
@@ -816,7 +816,7 @@ CTSimApp::newPlotDoc()
                                pFrame->Show (false);
                        }
                }
-               newDoc->OnNewDocument();
+//             newDoc->OnNewDocument();
        }
        
        return newDoc;
@@ -841,7 +841,7 @@ CTSimApp::newTextDoc()
                                pFrame->Show (false);
                        }
                }
-               newDoc->OnNewDocument();
+//             newDoc->OnNewDocument();
        }
        
        return newDoc;
@@ -859,7 +859,7 @@ CTSimApp::newPhantomDoc()
                        if (pFrame)
                                pFrame->SetSize (0,0);
                }
-               newDoc->OnNewDocument();
+//             newDoc->OnNewDocument();
        }
        
        return newDoc;
index 9c4278f1e01ef19844993fe916e4c4d9e451ebc5..99b94b86ae6b8019fe0a111fdb940101c2efdf3b 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: ctsim.h,v 1.34 2001/01/29 00:42:26 kevin Exp $
+**  $Id: ctsim.h,v 1.35 2001/01/29 23:11:32 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
@@ -84,8 +84,10 @@ private:
   DECLARE_CLASS(MainFrame)
   DECLARE_EVENT_TABLE()
 
+#ifndef CTSIM_MDI
   wxMenu* m_pWindowMenu;
-  
+#endif
+
   enum { MAX_WINDOW_MENUITEMS = 20 };
   wxMenuItem* m_apWindowMenuItems[MAX_WINDOW_MENUITEMS];
   wxDocument* m_apWindowMenuData[MAX_WINDOW_MENUITEMS];
@@ -202,9 +204,6 @@ public:
   
   void getCompatibleImages (const ImageFileDocument* pIFDoc, std::vector<ImageFileDocument*>& vecIF);
   
-  bool getSetModifyNewDocs() const
-  { return true; }
-  
   void setIconForFrame (wxFrame* pFrame);
   wxConfig* getConfig()
   { return m_pConfig; }
index d0be191674e6315011cdd02a9058bc22c91c39c5..1c467c1728977f3f176df27a546b68b487398c72 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: dlgreconstruct.cpp,v 1.15 2001/01/28 19:10:18 kevin Exp $
+**  $Id: dlgreconstruct.cpp,v 1.16 2001/01/29 23:11:32 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,8 +74,11 @@ END_EVENT_TABLE()
 IMPLEMENT_CLASS(ReconstructDialog, wxDialog)
 
 
-ReconstructDialog::ReconstructDialog (Reconstructor& rReconstruct, const Projections& rProj, ImageFile& rIF, const int iTrace, wxWindow *parent)
-: wxDialog(parent, -1, "Reconstruction", wxDefaultPosition), m_rReconstructor(rReconstruct), m_rProjections(rProj), m_rImageFile(rIF), m_pSGPDriver(NULL), m_pSGP(NULL), m_iTrace(iTrace), m_pDC(NULL), m_btnAbort(0), m_btnPause(0), m_btnStep(0)
+ReconstructDialog::ReconstructDialog (Reconstructor& rReconstruct, const Projections& rProj, 
+                                      ImageFile& rIF, const int iTrace, wxWindow *parent)
+: wxDialog(parent, -1, "Reconstruction", wxDefaultPosition), m_rReconstructor(rReconstruct), 
+           m_rProjections(rProj), m_rImageFile(rIF), m_pSGPDriver(NULL), m_pSGP(NULL), 
+  m_iTrace(iTrace), m_pDC(NULL), m_btnAbort(0), m_btnPause(0), m_btnStep(0)
 {
     m_state = Continue;
     m_iLastView = -1;
@@ -118,10 +121,10 @@ ReconstructDialog::ReconstructDialog (Reconstructor& rReconstruct, const Project
     wxSize sizeDlg (m_nxGraph, m_nyGraph);
     m_nxImage = m_rImageFile.nx();
     if (m_nxImage > MAX_IMAGE_X)
-               m_nxImage = MAX_IMAGE_X;
+                  m_nxImage = MAX_IMAGE_X;
     m_nyImage = m_rImageFile.ny();
     if (m_nyImage > MAX_IMAGE_Y)
-               m_nyImage = MAX_IMAGE_Y;
+                  m_nyImage = MAX_IMAGE_Y;
        
     sizeDlg.x += m_nxImage;
     sizeDlg.y = max (sizeDlg.y, m_nyImage);
@@ -172,8 +175,11 @@ ReconstructDialog::showView (int iViewNumber, bool bBackprojectView)
                m_pSGP->drawText (szProgress);
                m_pSGP->setTextSize (dCharHeight);
                
-               // m_pSGP->setViewport (0.0, 0.1, 0.66, 1.); // viewport equiv now done in subroutine
-               m_rReconstructor.reconstructView (iViewNumber, 1, m_pSGP, bBackprojectView);
+    int iXDialog, iYDialog;
+    GetClientSize (&iXDialog, &iYDialog);
+    double dGraphWidth = (iXDialog - m_nxImage) / static_cast<double>(iXDialog);
+
+               m_rReconstructor.reconstructView (iViewNumber, 1, m_pSGP, bBackprojectView, dGraphWidth);
                
                ImageFileArrayConst v = m_rImageFile.getArray();
                int xBase = m_nxGraph;
index a72ace4a3432104c64fdcbeecc31f8e2c17ccedd..a2a30f40abd2590dd9fe78b0c5cee84b025a25c2 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: views.cpp,v 1.87 2001/01/28 22:45:54 kevin Exp $
+**  $Id: views.cpp,v 1.88 2001/01/29 23:11:32 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
@@ -387,8 +387,7 @@ ImageFileView::OnCompare (wxCommandEvent& event)
           << " and " << pCompareDoc->GetFirstView()->GetFrame()->GetTitle().c_str() << ": "
           << os.str().c_str();
         differenceImage.labelAdd (os.str().c_str());
-        if (theApp->getSetModifyNewDocs())
-          pDifferenceDoc->Modify (true);
+        pDifferenceDoc->Modify (true);
         pDifferenceDoc->UpdateAllViews (this);
         pDifferenceDoc->getView()->OnUpdate (this, NULL);
         pDifferenceDoc->getView()->getFrame()->Show(true);
@@ -404,8 +403,7 @@ ImageFileView::OnInvertValues (wxCommandEvent& event)
   ImageFile& rIF = GetDocument()->getImageFile();
   rIF.invertPixelValues (rIF);
   rIF.labelAdd ("Invert Pixel Values");
-  if (theApp->getSetModifyNewDocs())
-    GetDocument()->Modify(TRUE);
+  GetDocument()->Modify (true);
   GetDocument()->UpdateAllViews (this);
 }
 
@@ -415,8 +413,7 @@ ImageFileView::OnSquare (wxCommandEvent& event)
   ImageFile& rIF = GetDocument()->getImageFile();
   rIF.square (rIF);
   rIF.labelAdd ("Square Pixel Values");
-  if (theApp->getSetModifyNewDocs())
-    GetDocument()->Modify(TRUE);
+  GetDocument()->Modify (true);
   GetDocument()->UpdateAllViews (this);
 }
 
@@ -426,8 +423,7 @@ ImageFileView::OnSquareRoot (wxCommandEvent& event)
   ImageFile& rIF = GetDocument()->getImageFile();
   rIF.sqrt (rIF);
   rIF.labelAdd ("Square-root Pixel Values");
-  if (theApp->getSetModifyNewDocs())
-    GetDocument()->Modify(TRUE);
+  GetDocument()->Modify (true);
   GetDocument()->UpdateAllViews (this);
 }
 
@@ -437,8 +433,7 @@ ImageFileView::OnLog (wxCommandEvent& event)
   ImageFile& rIF = GetDocument()->getImageFile();
   rIF.log (rIF);
   rIF.labelAdd ("Logrithm base-e Pixel Values");
-  if (theApp->getSetModifyNewDocs())
-    GetDocument()->Modify(TRUE);
+  GetDocument()->Modify (true);
   GetDocument()->UpdateAllViews (this);
 }
 
@@ -448,8 +443,7 @@ ImageFileView::OnExp (wxCommandEvent& event)
   ImageFile& rIF = GetDocument()->getImageFile();
   rIF.exp (rIF);
   rIF.labelAdd ("Exponent base-e Pixel Values");
-  if (theApp->getSetModifyNewDocs())
-    GetDocument()->Modify(TRUE);
+  GetDocument()->Modify (true);
   GetDocument()->UpdateAllViews (this);
 }
 
@@ -485,8 +479,7 @@ ImageFileView::OnAdd (wxCommandEvent& event)
       newImage.labelsCopy (rRHSIF, s.c_str());
       newImage.labelAdd (os.str().c_str());
       *theApp->getLog() << os.str().c_str() << "\n";
-      if (theApp->getSetModifyNewDocs())
-        pNewDoc->Modify(TRUE);
+      pNewDoc->Modify (true);
       pNewDoc->UpdateAllViews (this);
       pNewDoc->getView()->OnUpdate (this, NULL);
       pNewDoc->getView()->getFrame()->Show(true);
@@ -526,8 +519,7 @@ ImageFileView::OnSubtract (wxCommandEvent& event)
       newImage.labelsCopy (rRHSIF, s.c_str());
       newImage.labelAdd (os.str().c_str());
       *theApp->getLog() << os.str().c_str() << "\n";
-      if (theApp->getSetModifyNewDocs())
-        pNewDoc->Modify(TRUE);
+      pNewDoc->Modify (true);
       pNewDoc->UpdateAllViews (this);
       pNewDoc->getView()->OnUpdate (this, NULL);
       pNewDoc->getView()->getFrame()->Show(true);
@@ -567,8 +559,7 @@ ImageFileView::OnMultiply (wxCommandEvent& event)
       newImage.labelsCopy (rRHSIF, s.c_str());
       newImage.labelAdd (os.str().c_str());
       *theApp->getLog() << os.str().c_str() << "\n";
-      if (theApp->getSetModifyNewDocs())
-        pNewDoc->Modify(TRUE);
+      pNewDoc->Modify (true);
       pNewDoc->UpdateAllViews (this);
       pNewDoc->getView()->OnUpdate (this, NULL);
       pNewDoc->getView()->getFrame()->Show(true);
@@ -608,8 +599,7 @@ ImageFileView::OnDivide (wxCommandEvent& event)
       newImage.labelsCopy (rRHSIF, s.c_str());
       newImage.labelAdd (os.str().c_str());
       *theApp->getLog() << os.str().c_str() << "\n";
-      if (theApp->getSetModifyNewDocs())
-        pNewDoc->Modify(TRUE);
+      pNewDoc->Modify (true);
       pNewDoc->UpdateAllViews (this);
       pNewDoc->getView()->OnUpdate (this, NULL);
       pNewDoc->getView()->getFrame()->Show(true);
@@ -627,8 +617,7 @@ ImageFileView::OnFFT (wxCommandEvent& event)
   rIF.labelAdd ("FFT Image");
   m_bMinSpecified = false;
   m_bMaxSpecified = false;
-  if (theApp->getSetModifyNewDocs())
-    GetDocument()->Modify(TRUE);
+  GetDocument()->Modify (true);
   GetDocument()->UpdateAllViews (this);
 }
 
@@ -640,8 +629,7 @@ ImageFileView::OnIFFT (wxCommandEvent& event)
   rIF.labelAdd ("IFFT Image");
   m_bMinSpecified = false;
   m_bMaxSpecified = false;
-  if (theApp->getSetModifyNewDocs())
-    GetDocument()->Modify(TRUE);
+  GetDocument()->Modify (true);
   GetDocument()->UpdateAllViews (this);
 }
 
@@ -653,8 +641,7 @@ ImageFileView::OnFFTRows (wxCommandEvent& event)
   rIF.labelAdd ("FFT Rows");
   m_bMinSpecified = false;
   m_bMaxSpecified = false;
-  if (theApp->getSetModifyNewDocs())
-    GetDocument()->Modify(TRUE);
+  GetDocument()->Modify (true);
   GetDocument()->UpdateAllViews (this);
 }
 
@@ -666,8 +653,7 @@ ImageFileView::OnIFFTRows (wxCommandEvent& event)
   rIF.labelAdd ("IFFT Rows");
   m_bMinSpecified = false;
   m_bMaxSpecified = false;
-  if (theApp->getSetModifyNewDocs())
-    GetDocument()->Modify(TRUE);
+  GetDocument()->Modify (true);
   GetDocument()->UpdateAllViews (this);
 }
 
@@ -679,8 +665,7 @@ ImageFileView::OnFFTCols (wxCommandEvent& event)
   rIF.labelAdd ("FFT Columns");
   m_bMinSpecified = false;
   m_bMaxSpecified = false;
-  if (theApp->getSetModifyNewDocs())
-    GetDocument()->Modify(TRUE);
+  GetDocument()->Modify (true);
   GetDocument()->UpdateAllViews (this);
 }
 
@@ -692,8 +677,7 @@ ImageFileView::OnIFFTCols (wxCommandEvent& event)
   rIF.labelAdd ("IFFT Columns");
   m_bMinSpecified = false;
   m_bMaxSpecified = false;
-  if (theApp->getSetModifyNewDocs())
-    GetDocument()->Modify(TRUE);
+  GetDocument()->Modify (true);
   GetDocument()->UpdateAllViews (this);
 }
 #endif
@@ -707,8 +691,7 @@ ImageFileView::OnFourier (wxCommandEvent& event)
   rIF.labelAdd ("Fourier Image");
   m_bMinSpecified = false;
   m_bMaxSpecified = false;
-  if (theApp->getSetModifyNewDocs())
-    GetDocument()->Modify(TRUE);
+  GetDocument()->Modify (true);
   GetDocument()->UpdateAllViews (this);
 }
 
@@ -721,8 +704,7 @@ ImageFileView::OnInverseFourier (wxCommandEvent& event)
   rIF.labelAdd ("Inverse Fourier Image");
   m_bMinSpecified = false;
   m_bMaxSpecified = false;
-  if (theApp->getSetModifyNewDocs())
-    GetDocument()->Modify(TRUE);
+  GetDocument()->Modify (true);
   GetDocument()->UpdateAllViews (this);
 }
 
@@ -734,8 +716,7 @@ ImageFileView::OnShuffleNaturalToFourierOrder (wxCommandEvent& event)
   rIF.labelAdd ("Shuffle Natural To Fourier Order");
   m_bMinSpecified = false;
   m_bMaxSpecified = false;
-  if (theApp->getSetModifyNewDocs())
-    GetDocument()->Modify(TRUE);
+  GetDocument()->Modify (true);
   GetDocument()->UpdateAllViews (this);
 }
 
@@ -747,8 +728,7 @@ ImageFileView::OnShuffleFourierToNaturalOrder (wxCommandEvent& event)
   rIF.labelAdd ("Shuffle Fourier To Natural Order");
   m_bMinSpecified = false;
   m_bMaxSpecified = false;
-  if (theApp->getSetModifyNewDocs())
-    GetDocument()->Modify(TRUE);
+  GetDocument()->Modify (true);
   GetDocument()->UpdateAllViews (this);
 }
 
@@ -761,8 +741,7 @@ ImageFileView::OnMagnitude (wxCommandEvent& event)
     rIF.labelAdd ("Magnitude of complex-image");
     m_bMinSpecified = false;
     m_bMaxSpecified = false;
-    if (theApp->getSetModifyNewDocs())
-      GetDocument()->Modify(TRUE);
+    GetDocument()->Modify (true);
     GetDocument()->UpdateAllViews (this);
   }
 }
@@ -776,8 +755,7 @@ ImageFileView::OnPhase (wxCommandEvent& event)
     rIF.labelAdd ("Phase of complex-image");
     m_bMinSpecified = false;
     m_bMaxSpecified = false;
-    if (theApp->getSetModifyNewDocs())
-      GetDocument()->Modify(TRUE);
+    GetDocument()->Modify (true);
     GetDocument()->UpdateAllViews (this);
   }
 }
@@ -1017,15 +995,16 @@ ImageFileView::OnUpdate (wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint) )
 bool 
 ImageFileView::OnClose (bool deleteWindow)
 {
+  GetDocumentManager()->ActivateView (this, false, true);
   if (! GetDocument() || ! GetDocument()->Close())
     return false;
   
   if (m_pCanvas) {
-    m_pCanvas->Show(false);
+    //m_pCanvas->Show(false);
     m_pCanvas->setView(NULL);
     m_pCanvas = NULL;
   }
-  m_pFrame->Show(false);
+  //m_pFrame->Show(false);
   wxString s(theApp->GetAppName());
   if (m_pFrame)
     m_pFrame->SetTitle(s);
@@ -1034,9 +1013,11 @@ ImageFileView::OnClose (bool deleteWindow)
   Activate(false);
   
   if (deleteWindow) {
+    //delete m_pFrame;
     m_pFrame->Destroy();
     m_pFrame = NULL;
   }
+
   return true;
 }
 
@@ -1109,8 +1090,7 @@ ImageFileView::OnScaleSize (wxCommandEvent& event)
     rScaledIF.labelAdd (os.str().c_str());
     rIF.scaleImage (rScaledIF);
     *theApp->getLog() << os.str().c_str() << "\n";
-    if (theApp->getSetModifyNewDocs())
-      pScaledDoc->Modify(TRUE);
+    pScaledDoc->Modify (true);
     pScaledDoc->UpdateAllViews (this);
     pScaledDoc->getView()->OnUpdate (this, NULL);
     pScaledDoc->getView()->getFrame()->Show(true);
@@ -1195,8 +1175,7 @@ ImageFileView::OnPlotRow (wxCommandEvent& event)
       delete pYImag;
       delete pYMag;
     }
-    if (theApp->getSetModifyNewDocs())
-      pPlotDoc->Modify(true);
+    pPlotDoc->Modify (true);
     pPlotDoc->UpdateAllViews ();
     pPlotDoc->getView()->OnUpdate (this, NULL);
     pPlotDoc->getView()->getFrame()->Show(true);
@@ -1281,8 +1260,7 @@ ImageFileView::OnPlotCol (wxCommandEvent& event)
       delete pYImag;
       delete pYMag;
     }
-    if (theApp->getSetModifyNewDocs())
-      pPlotDoc->Modify(true);
+    pPlotDoc->Modify (true);
     pPlotDoc->UpdateAllViews ();
     pPlotDoc->getView()->OnUpdate (this, NULL);
     pPlotDoc->getView()->getFrame()->Show(true);
@@ -1376,8 +1354,7 @@ ImageFileView::OnPlotFFTRow (wxCommandEvent& event)
     delete pYMag;
     delete [] pcIn;
     
-    if (theApp->getSetModifyNewDocs())
-      pPlotDoc->Modify(true);
+    pPlotDoc->Modify (true);
     pPlotDoc->UpdateAllViews ();
     pPlotDoc->getView()->OnUpdate (this, NULL);
     pPlotDoc->getView()->getFrame()->Show(true);
@@ -1477,8 +1454,7 @@ ImageFileView::OnPlotFFTCol (wxCommandEvent& event)
     delete pdTemp;
     delete [] pcIn;
     
-    if (theApp->getSetModifyNewDocs())
-      pPlotDoc->Modify(true);
+    pPlotDoc->Modify (true);
     pPlotDoc->UpdateAllViews ();
     pPlotDoc->getView()->OnUpdate (this, NULL);
     pPlotDoc->getView()->getFrame()->Show(true);
@@ -1568,8 +1544,7 @@ ImageFileView::OnCompareCol (wxCommandEvent& event)
       delete pX;
       delete pY1;
       delete pY2;
-      if (theApp->getSetModifyNewDocs())
-        pPlotDoc->Modify(true);
+      pPlotDoc->Modify (true);
       pPlotDoc->UpdateAllViews ();
       pPlotDoc->getView()->OnUpdate (this, NULL);
       pPlotDoc->getView()->getFrame()->Show(true);
@@ -1660,8 +1635,7 @@ ImageFileView::OnCompareRow (wxCommandEvent& event)
       delete pX;
       delete pY1;
       delete pY2;
-      if (theApp->getSetModifyNewDocs())
-        pPlotDoc->Modify(true);
+      pPlotDoc->Modify (true);
       pPlotDoc->UpdateAllViews ();
       pPlotDoc->getView()->OnUpdate (this, NULL);
       pPlotDoc->getView()->getFrame()->Show(true);
@@ -1727,8 +1701,7 @@ ImageFileView::OnPlotHistogram (wxCommandEvent& event)
       rPlotFile.addDescription (os.str().c_str());
       delete pX;
       delete pY;
-      if (theApp->getSetModifyNewDocs())
-        pPlotDoc->Modify(true);
+      pPlotDoc->Modify (true);
       pPlotDoc->UpdateAllViews ();
       pPlotDoc->getView()->OnUpdate (this, NULL);
       pPlotDoc->getView()->getFrame()->Show(true);
@@ -1908,8 +1881,7 @@ PhantomFileView::OnProjections (wxCommandEvent& event)
         GetDocumentManager()->ActivateView (projView, true, false);
       }
       ::wxYield();
-      if (theApp->getSetModifyNewDocs())
-        pProjectionDoc->Modify(true);
+      pProjectionDoc-> Modify(true);
       pProjectionDoc->UpdateAllViews (this);
     }
   }
@@ -1951,8 +1923,7 @@ PhantomFileView::OnRasterize (wxCommandEvent& event)
           return;
         }
       }
-      if (theApp->getSetModifyNewDocs())
-        pRasterDoc->Modify(true);
+      pRasterDoc->Modify (true);
       pRasterDoc->UpdateAllViews (this);
       pRasterDoc->getView()->getFrame()->Show(true);
       std::ostringstream os;
@@ -2089,6 +2060,7 @@ PhantomFileView::OnUpdate (wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint) )
 bool 
 PhantomFileView::OnClose (bool deleteWindow)
 {
+  GetDocumentManager()->ActivateView (this, false, true);
   if (! GetDocument() || ! GetDocument()->Close())
     return false;
   
@@ -2106,9 +2078,11 @@ PhantomFileView::OnClose (bool deleteWindow)
   Activate(false);
   
   if (deleteWindow) {
+    //delete m_pFrame;
     m_pFrame->Destroy();
     m_pFrame = NULL;
   }
+//  ::wxYield();
   
   return true;
 }
@@ -2245,8 +2219,7 @@ ProjectionFileView::OnConvertPolar (wxCommandEvent& event)
       << strInterpolation.c_str();
     *theApp->getLog() << os.str().c_str() << "\n";
     rIF.labelAdd (os.str().c_str());
-    if (theApp->getSetModifyNewDocs())
-      pPolarDoc->Modify(true);
+    pPolarDoc->Modify (true);
     pPolarDoc->UpdateAllViews ();
     pPolarDoc->getView()->OnUpdate (this, NULL);
     pPolarDoc->getView()->getFrame()->Show(true);
@@ -2280,8 +2253,7 @@ ProjectionFileView::OnConvertFFTPolar (wxCommandEvent& event)
       << strInterpolation.c_str() << ", zeropad=" << m_iDefaultPolarZeropad;
     *theApp->getLog() << os.str().c_str() << "\n";
     rIF.labelAdd (os.str().c_str());
-    if (theApp->getSetModifyNewDocs())
-      pPolarDoc->Modify(true);
+    pPolarDoc->Modify (true);
     pPolarDoc->UpdateAllViews ();
     pPolarDoc->getView()->OnUpdate (this, NULL);
     pPolarDoc->getView()->getFrame()->Show(true);
@@ -2366,8 +2338,7 @@ ProjectionFileView::OnReconstructFBP (wxCommandEvent& event)
         }
       }
       delete pReconstruct;
-      if (theApp->getSetModifyNewDocs())
-        pReconDoc->Modify(true);
+      pReconDoc->Modify (true);
       pReconDoc->UpdateAllViews (this);
       if (ImageFileView* rasterView = pReconDoc->getView()) {
         rasterView->OnUpdate (rasterView, NULL);
@@ -2569,6 +2540,7 @@ ProjectionFileView::OnUpdate (wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint)
 bool 
 ProjectionFileView::OnClose (bool deleteWindow)
 {
+  GetDocumentManager()->ActivateView (this, false, true);
   if (! GetDocument() || ! GetDocument()->Close())
     return false;
   
@@ -2586,9 +2558,11 @@ ProjectionFileView::OnClose (bool deleteWindow)
   Activate(false);
   
   if (deleteWindow) {
+//   delete m_pFrame;
     m_pFrame->Destroy();
     m_pFrame = NULL;
   }
+
   return true;
 }
 
@@ -2897,15 +2871,16 @@ PlotFileView::OnUpdate (wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint) )
 bool 
 PlotFileView::OnClose (bool deleteWindow)
 {
+  GetDocumentManager()->ActivateView (this, false, true);
   if (! GetDocument() || ! GetDocument()->Close())
     return false;
   
   if (m_pCanvas) {
-    m_pCanvas->Show(false);
+    //m_pCanvas->Show(false);
     m_pCanvas->setView (NULL);
     m_pCanvas = NULL;
   }
-    m_pFrame->Show(false);
+    //m_pFrame->Show(false);
   wxString s(wxTheApp->GetAppName());
   if (m_pFrame)
     m_pFrame->SetTitle(s);
@@ -2915,9 +2890,11 @@ PlotFileView::OnClose (bool deleteWindow)
   m_pFrame->SetView(NULL);
   SetFrame(NULL);
   if (deleteWindow) {
+    //delete m_pFrame;
     m_pFrame->Destroy();
     m_pFrame = NULL;
   }
+
   return true;
 }
 
@@ -2972,20 +2949,23 @@ TextFileView::OnClose (bool deleteWindow)
   // if (m_pFrame && m_pFrame->GetTitle() == "Log")
   return false;
   
+  GetDocumentManager()->ActivateView (this, false, true);
   if (! GetDocument() || ! GetDocument()->Close())
     return false;
   
-  m_pCanvas->Show(false);
-  m_pFrame->Show(false);
+  //m_pCanvas->Show(false);
+  //m_pFrame->Show(false);
   Activate(false);
   
   SetFrame(NULL);
   m_pFrame->SetView(NULL);
   if (deleteWindow) {
+    //delete m_pFrame;
     m_pFrame->Destroy();
     m_pFrame = NULL;
     
   }
+
   return TRUE;
 }