From: Kevin M. Rosenberg Date: Tue, 20 Feb 2001 04:48:45 +0000 (+0000) Subject: r557: no message X-Git-Tag: debian-4.5.3-3~460 X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=commitdiff_plain;h=3f6c94c6bd432ad7b7a55ad991d3b8223fb44f18 r557: no message --- diff --git a/ChangeLog b/ChangeLog index 7c56ff6..b587ea8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,15 @@ -3.0.0 - Release 2/19/01 +3.0.1 - Released 2/19/01 + + * ctsim: Fixed dialog box for reconstruction so that + rotation angle setting will stay fixed in-between use + of the dialog box. + + * syserror: Fixed display bug for trace messages + + * ctsim: MSVC optimization bug work-around, compiler + options changed. + +3.0.0 - Released 2/19/01 * ctsim: Massive update/fix to online help and print manual. @@ -6,15 +17,12 @@ * ctsim: Reformated all dialog boxes, much nicer now. + * ctsim: Improved accelerator key handling + * global: Added Hanning filter. - * global: Improved default parameters so that all defaults give + * global: Improved default parameters to that all defaults give sensible output. - - * ctsim: Improved accelerator key handling - - * ctsim,pjrec: Changed rotation angle to be a fraction of - a circle rather than a multiple of pi. 3.0.0beta1 - Released 2/11/01 diff --git a/doc/ctsim.prj b/doc/ctsim.prj index bc831ae..3293f2c 100644 --- a/doc/ctsim.prj +++ b/doc/ctsim.prj @@ -5,34 +5,34 @@ 1 ctsim.tex 18 -5 -0 +8 +4 -ctsim-gui.tex -TeX -268447738 0 43 18 43 18 176 176 1253 763 mytitle.sty DATA 5243570 0 9 1 8 22 66 66 1143 653 -ctsim-appendix.tex -TeX -12282 0 12 1 0 1 44 44 1121 631 ctsim-textui.tex TeX -12282 0 289 27 96 48 198 198 1275 785 +12282 0 297 15 0 1 198 198 1275 785 ctsim-install.tex TeX -12282 0 34 10 34 66 110 110 1187 697 -ctsim-concepts.tex +12282 0 34 10 42 1 110 110 1187 697 +ctsim-web.tex TeX -268447738 0 363 20 363 77 110 110 1187 697 +12283 0 24 50 0 60 88 88 1165 675 ctsim.tex TeX -402665466 0 86 36 105 25 22 22 1099 609 -ctsim-web.tex +402665466 0 68 19 98 23 22 22 1099 609 +ctsim-appendix.tex +TeX +12282 0 12 1 0 1 44 44 1121 631 +ctsim-gui.tex +TeX +12282 0 38 28 38 69 176 176 1253 763 +ctsim-concepts.tex TeX -268447739 0 24 50 0 60 88 88 1165 675 +12282 0 213 1 0 1 110 110 1187 697 tex2rtf.ini DATA 273777330 0 0 1 17 8 22 22 938 609 diff --git a/images/SplashScreen.psd b/images/SplashScreen.psd index c282eb0..cddfa03 100644 Binary files a/images/SplashScreen.psd and b/images/SplashScreen.psd differ diff --git a/include/phantom.h b/include/phantom.h index 5aa840e..ae5ba45 100644 --- a/include/phantom.h +++ b/include/phantom.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: phantom.h,v 1.23 2001/02/09 14:34:16 kevin Exp $ +** $Id: phantom.h,v 1.24 2001/02/20 04:48:45 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 @@ -174,7 +174,7 @@ class Phantom const std::string& name() const {return m_name;} const int id() const {return m_id;} -#if HAVE_SGP +#ifdef HAVE_SGP void show () const; void show (SGP& sgp) const; void draw (SGP& sgp) const; diff --git a/include/reconstruct.h b/include/reconstruct.h index 83d5476..54f19f0 100644 --- a/include/reconstruct.h +++ b/include/reconstruct.h @@ -8,7 +8,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: reconstruct.h,v 1.5 2001/01/29 23:11:32 kevin Exp $ +** $Id: reconstruct.h,v 1.6 2001/02/20 04:48:45 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 @@ -37,20 +37,6 @@ class ProcessSignal; class Reconstructor { -public: - Reconstructor (const Projections& rProj, ImageFile& rIF, const char* const filterName, double filt_param, const char* const filterMethodName, const int zeropad, const char* filterGenerationName, const char* const interpName, int interpFactor, const char* const backprojectName, const int trace, SGP* pSGP = NULL); - - ~Reconstructor (); - - bool fail() const {return m_bFail;} - const std::string& failMessage() const {return m_strFailMessage;} - - void plotFilter (SGP* pSGP = NULL); - - void reconstructAllViews (); - - void reconstructView (int iStartView = 0, int iViewCount = -1, SGP* pSGP = NULL, bool bBackprojectView = true, double dGraphWidth = 1.); - private: const Projections& m_rProj; ImageFile& m_rImagefile; @@ -63,6 +49,20 @@ public: std::string m_strFailMessage; double* m_adPlotXAxis; + + public: + Reconstructor (const Projections& rProj, ImageFile& rIF, const char* const filterName, double filt_param, const char* const filterMethodName, const int zeropad, const char* filterGenerationName, const char* const interpName, int interpFactor, const char* const backprojectName, const int trace, SGP* pSGP = NULL); + + ~Reconstructor (); + + bool fail() const {return m_bFail;} + const std::string& failMessage() const {return m_strFailMessage;} + + void plotFilter (SGP* pSGP = NULL); + + void reconstructAllViews (); + + void reconstructView (int iStartView = 0, int iViewCount = -1, SGP* pSGP = NULL, bool bBackprojectView = true, double dGraphWidth = 1.); }; #endif diff --git a/include/scanner.h b/include/scanner.h index 162e896..fea4dc4 100644 --- a/include/scanner.h +++ b/include/scanner.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: scanner.h,v 1.17 2001/02/08 06:25:07 kevin Exp $ +** $Id: scanner.h,v 1.18 2001/02/20 04:48:45 kevin Exp $ ** ** ** This program is free software; you can redistribute it and/or modify @@ -140,7 +140,7 @@ class Scanner GRFMTX_2D m_rotmtxIncrement; -#if HAVE_SGP +#ifdef HAVE_SGP SGP* m_pSGP; // Pointer to graphics device double m_dXMinWin; // Extent of graphics window double m_dXMaxWin; diff --git a/libctgraphics/ezplot.cpp b/libctgraphics/ezplot.cpp index b59d92d..ed1ca23 100644 --- a/libctgraphics/ezplot.cpp +++ b/libctgraphics/ezplot.cpp @@ -6,7 +6,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: ezplot.cpp,v 1.30 2001/01/28 19:10:18 kevin Exp $ +** $Id: ezplot.cpp,v 1.31 2001/02/20 04:48:45 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 @@ -36,14 +36,12 @@ static const int DEF_CURVE_CLR = C_RED; EZPlotCurve::EZPlotCurve (const double* xData, const double* yData, int n) -: x(NULL), y(NULL) +: x(new double[n]), y(new double[n]) { - x = new double [n]; - y = new double [n]; - - int copyCount = n * sizeof(double); - memcpy (x, xData, copyCount); - memcpy (y, yData, copyCount); + for (int i = 0; i < n; i++) { + x[i] = xData[i]; + y[i] = yData[i]; + } m_iPointCount = n; } @@ -94,7 +92,7 @@ EZPlot::addCurve (const float x[], const double y[], int num) } void -EZPlot::addCurve (const double x[], const float y[], int num) +EZPlot::addCurve (const double* const x, const float* const y, int num) { double* dy = new double [num]; @@ -108,7 +106,7 @@ EZPlot::addCurve (const double x[], const float y[], int num) void -EZPlot::addCurve (const double x[], const double y[], int num) +EZPlot::addCurve (const double* const x, const double* const y, int num) { if (num < 1) return; diff --git a/libctsim/reconstruct.cpp b/libctsim/reconstruct.cpp index e80cc4f..7bc6a83 100644 --- a/libctsim/reconstruct.cpp +++ b/libctsim/reconstruct.cpp @@ -8,7 +8,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: reconstruct.cpp,v 1.12 2001/02/11 04:56:37 kevin Exp $ +** $Id: reconstruct.cpp,v 1.13 2001/02/20 04:48:45 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,7 @@ Reconstructor::Reconstructor (const Projections& rProj, ImageFile& rIF, const ch return; } -#if HAVE_SGP +#ifdef HAVE_SGP m_adPlotXAxis = new double [m_rProj.nDet()]; double x = - ((m_rProj.nDet() - 1) / 2) * m_rProj.detInc(); double xInc = m_rProj.detInc(); @@ -112,7 +112,7 @@ Reconstructor::~Reconstructor () void Reconstructor::plotFilter (SGP* pSGP) { -#if HAVE_SGP +#ifdef HAVE_SGP int nVecFilter = m_pProcessSignal->getNFilterPoints(); double* adPlotXAxis = new double [nVecFilter]; @@ -183,35 +183,45 @@ Reconstructor::reconstructView (int iStartView, int iViewCount, SGP* pSGP, bool osXLength << "xlength " << dGraphWidth; ezplotProj.ezset ("clear"); - ezplotProj.ezset ("title Filtered Projection"); + ezplotProj.ezset ("title Raw Projection"); ezplotProj.ezset ("xticks major 5"); + ezplotProj.ezset ("yticks major 5"); ezplotProj.ezset ("xlabel "); ezplotProj.ezset ("ylabel "); - ezplotProj.ezset ("yticks major 5"); - ezplotProj.ezset ("yporigin 0.10"); + ezplotProj.ezset ("yporigin 0.55"); ezplotProj.ezset ("ylength 0.45"); ezplotProj.ezset (osXLength.str().c_str()); - ezplotProj.ezset ("box"); - ezplotProj.ezset ("grid"); - ezplotProj.addCurve (m_adPlotXAxis, adFilteredProj, m_nFilteredProjections); + ezplotProj.ezset ("box."); + ezplotProj.ezset ("grid."); +#if 0 // workaround c++ optimizer bug, now disabled by using /O1 in code + double* pdDetval = new double [m_rProj.nDet()]; + for (unsigned int id = 0; id < m_rProj.nDet(); id++) { + pdDetval[id] = detval[id]; + } + ezplotProj.addCurve (m_adPlotXAxis, pdDetval, m_rProj.nDet()); + delete pdDetval; +#else + ezplotProj.addCurve (m_adPlotXAxis, detval, m_rProj.nDet()); +#endif pSGP->setTextPointSize (12); ezplotProj.plot (pSGP); ezplotProj.ezset ("clear"); - ezplotProj.ezset ("title Raw Projection"); + ezplotProj.ezset ("title Filtered Projection"); ezplotProj.ezset ("xticks major 5"); - ezplotProj.ezset ("yticks major 5"); ezplotProj.ezset ("xlabel "); ezplotProj.ezset ("ylabel "); - ezplotProj.ezset ("yporigin 0.55"); + ezplotProj.ezset ("yticks major 5"); + ezplotProj.ezset ("yporigin 0.10"); ezplotProj.ezset ("ylength 0.45"); ezplotProj.ezset (osXLength.str().c_str()); - ezplotProj.ezset ("box."); - ezplotProj.ezset ("grid."); - ezplotProj.addCurve (m_adPlotXAxis, detval, m_rProj.nDet()); + ezplotProj.ezset ("box"); + ezplotProj.ezset ("grid"); + ezplotProj.addCurve (m_adPlotXAxis, adFilteredProj, m_nFilteredProjections); pSGP->setTextPointSize (12); ezplotProj.plot (pSGP); - } + +} #endif //HAVE_SGP } diff --git a/libctsupport/syserror.cpp b/libctsupport/syserror.cpp index d50471e..5b4e631 100644 --- a/libctsupport/syserror.cpp +++ b/libctsupport/syserror.cpp @@ -2,7 +2,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: syserror.cpp,v 1.20 2001/01/30 02:20:50 kevin Exp $ +** $Id: syserror.cpp,v 1.21 2001/02/20 04:48:45 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 @@ -41,7 +41,7 @@ * Can take 24 byte transfer */ -static int s_reportErrorLevel = ERR_WARNING; // Set error reporting level +static int s_reportErrorLevel = ERR_TRACE; // Set error reporting level void sys_error (int severity, const char *msg, ...) @@ -62,7 +62,7 @@ void sys_error (int severity, const char *msg, ...) } else #endif - std::cout << strOutput; + std::cout << strOutput << "\n"; va_end(arg); } @@ -78,7 +78,9 @@ void sys_verror (std::string& strOutput, int severity, const char *msg, va_list std::ostringstream os; - s_nErrorCount++; + if (severity > ERR_TRACE) + s_nErrorCount++; + if (severity != ERR_FATAL) { if (s_nErrorCount > MAX_ERROR_COUNT) return; @@ -120,11 +122,11 @@ void sys_verror (std::string& strOutput, int severity, const char *msg, va_list strncpy (errStr, sizeof(errStr), "Error message not available on this platform."); #endif - os << errStr << "\n"; + os << errStr; strOutput = os.str(); if (severity == ERR_FATAL) { - std::cerr << strOutput; + std::cerr << strOutput << "\n"; throw std::runtime_error (strOutput); } diff --git a/msvc/ctsim/ctsim.plg b/msvc/ctsim/ctsim.plg index 804c781..687b9af 100644 --- a/msvc/ctsim/ctsim.plg +++ b/msvc/ctsim/ctsim.plg @@ -6,13 +6,29 @@ --------------------Configuration: ctsim - Win32 Release--------------------

Command Lines

-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP151.tmp" with contents +Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP267.tmp" with contents [ -/nologo /G6 /MT /W3 /GR /GX /O2 /I "..\..\..\fftw-2.1.3\fftw" /I "\wx2.2.5\include" /I "\wx2.2.5\src\png" /I "\wx2.2.5\src\zlib" /I "..\..\include" /I "..\..\getopt" /I "..\..\..\fftw-2.1.3\rfftw" /D "NDEBUG" /D "__WXWIN__" /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"Release/" /Fp"Release/ctsim.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c +/nologo /G6 /MT /W3 /GR /GX /O2 /I "..\..\..\fftw-2.1.3\fftw" /I "\wx2.2.5\include" /I "\wx2.2.5\src\png" /I "\wx2.2.5\src\zlib" /I "..\..\include" /I "..\..\getopt" /I "..\..\..\fftw-2.1.3\rfftw" /D "NDEBUG" /D "__WXWIN__" /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.1\" /D CTSIMVERSION=\"3.0.0alpha5\" /FR"Release/" /Fp"Release/ctsim.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c "C:\ctsim\src\ctsim.cpp" +"C:\ctsim\src\dialogs.cpp" +"C:\ctsim\src\dlgprojections.cpp" +"C:\ctsim\src\docs.cpp" +"C:\ctsim\src\views.cpp" ] -Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP151.tmp" -Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP152.tmp" with contents +Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP267.tmp" +Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP268.tmp" with contents +[ +/nologo /G6 /MT /W3 /GR /GX /O1 /I "..\..\..\fftw-2.1.3\fftw" /I "\wx2.2.5\include" /I "\wx2.2.5\src\png" /I "\wx2.2.5\src\zlib" /I "..\..\include" /I "..\..\getopt" /I "..\..\..\fftw-2.1.3\rfftw" /D "NDEBUG" /D "__WXWIN__" /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.1\" /D CTSIMVERSION=\"3.0.0alpha5\" /FR"Release/" /Fp"Release/ctsim.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c +"C:\ctsim\src\dlgreconstruct.cpp" +] +Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP268.tmp" +Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP269.tmp" with contents +[ +/nologo /G6 /MT /W3 /GR /GX /O2 /I "..\..\..\fftw-2.1.3\fftw" /I "\wx2.2.5\include" /I "\wx2.2.5\src\png" /I "\wx2.2.5\src\zlib" /I "..\..\include" /I "..\..\getopt" /I "..\..\..\fftw-2.1.3\rfftw" /D "NDEBUG" /D "__WXWIN__" /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.1\" /FR"Release/" /Fp"Release/ctsim.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c +"C:\ctsim\src\graph3dview.cpp" +] +Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP269.tmp" +Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP26A.tmp" with contents [ wsock32.lib tiff.lib jpeg.lib png.lib zlib.lib xpm.lib comctl32.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 opengl32.lib glu32.lib htmlhelp.lib /nologo /subsystem:windows /incremental:no /pdb:"Release/ctsim.pdb" /machine:I386 /out:"Release/ctsim.exe" /libpath:"\wx2.2.5\lib" .\Release\ctsim.obj @@ -33,10 +49,18 @@ wsock32.lib tiff.lib jpeg.lib png.lib zlib.lib xpm.lib comctl32.lib kernel32.lib \wx2.2.5\lib\zlib.lib \wx2.2.5\lib\tiff.lib ] -Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP152.tmp" +Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP26A.tmp"

Output Window

Compiling... ctsim.cpp +dialogs.cpp +dlgprojections.cpp +docs.cpp +views.cpp +Compiling... +dlgreconstruct.cpp +Compiling... +graph3dview.cpp Linking... LINK : warning LNK4089: all references to "WSOCK32.dll" discarded by /OPT:REF diff --git a/src/dlgreconstruct.cpp b/src/dlgreconstruct.cpp index 1c467c1..9f1b950 100644 --- a/src/dlgreconstruct.cpp +++ b/src/dlgreconstruct.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: dlgreconstruct.cpp,v 1.16 2001/01/29 23:11:32 kevin Exp $ +** $Id: dlgreconstruct.cpp,v 1.17 2001/02/20 04:48:45 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 @@ -169,18 +169,21 @@ ReconstructDialog::showView (int iViewNumber, bool bBackprojectView) m_pSGP->setViewport (0, 0, 1, 1); m_pSGP->setWindow (0, 0, 1, 1); m_pSGP->setTextColor (C_LTRED, -1); - double dCharHeight = m_pSGP->getCharHeight(); - m_pSGP->setTextSize (dCharHeight * 2); + m_pSGP->setTextPointSize (20.); m_pSGP->moveAbs(0., m_pSGP->getCharHeight()); m_pSGP->drawText (szProgress); - m_pSGP->setTextSize (dCharHeight); + m_pSGP->setTextPointSize (10.); int iXDialog, iYDialog; GetClientSize (&iXDialog, &iYDialog); double dGraphWidth = (iXDialog - m_nxImage) / static_cast(iXDialog); m_rReconstructor.reconstructView (iViewNumber, 1, m_pSGP, bBackprojectView, dGraphWidth); - + ::wxYield(); +::wxYield(); +::wxYield(); +::wxYield(); + ImageFileArrayConst v = m_rImageFile.getArray(); int xBase = m_nxGraph; int yBase = 0; @@ -214,6 +217,8 @@ ReconstructDialog::showView (int iViewNumber, bool bBackprojectView) m_pSGP->getDriver().idWX()->DrawBitmap(bitmap, xBase, yBase, false); delete imageData; } + + ::wxYield(); } bool diff --git a/src/splash.xpm b/src/splash.xpm index 9c3cb79..7aba63c 100644 --- a/src/splash.xpm +++ b/src/splash.xpm @@ -497,21 +497,21 @@ static char *splash[] = { "88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888", "88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888", "88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888", -"88888888888888888888888888888888888888888888888822278888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888722288888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888O>>$888888888888888>>;888888888888888>>;88888888888", -"8888888888#uuu#8885uuu68888888888888888888888888uuu#8888888888888888888883uuu.8888#uuuu8888888888888888uuuuuuu-.=888888888888888888888888888888888888888888888888888#uuu8888888888888888888888888888888888888888888888888888888#uuu-8888ryuuu#8888888882uuuuuu2Xr88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888@<48888888888888888888888888888888>@<<<>:&<;888888888><@9>4<@9>4888$q+;wqw8;%&<&,988$q+888O%&<&%O888+q$4e<4888888888<488888888", -"8888888888#uuu#1uu-r8888riuuuuuuu*83uu-8886uu288uuu#882uuyuuuuu38888888883uuyuu68-uyuuu8888888888888888uuu3888iuu18886uuuuuuu.888iuuuuuuu3886uuuuuuui888uuuyuuuuu#88#uuuyuuuuy=887yuuuuuuy=882uu2yuu386uuuuuuuu2888888888888888#uuuyu.8.uyuuu#8888888882uu288886uuu7888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888+<:8888,<;88w9@<>88><488O@<%4%<@O884<&ew4&<>88888888888888;@@O88888888;<<4O8;:<98888>88><4884<:888:<4884<%888888888888q@&%O888888888><488888<488888<48888:<488@&88888&@884<>8888<488888<488888<48888O&<&,4$888><4888888<488888<488888>>>>>>88><488888O:q&<<%88><4888888<4888888888$@<$8><488ee88888ee884<>8888<4888888888<488888888", -"8888888888#uuu#8#uuuy7882uui*88=X-888=uuuuu68888uuu#882uu388#uuu8888888883uu28888883uuu8882uu3888888888uuu388iuuu588#uuu#8=-uu383-6=886uuy8#uuu3=88*.388uuu#883uu288#uuur8#yuu38ryuu1788751882uu38888ryuuu2-uuu2888uuu#88888888#uuu888888#uuu#883uu28882uu-331uuuy7888uuu#88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888$<%e&8888+<,88888$88><48888$O88884<>8><488%<>888><%884<>888888888:+qq88><488884&w>>:&e88><488;&&:>+&&;884<>8888>w<&O888q<>888><@9>4888><@9>4<48888>@<<<<4888$e<<88888888+&<<8888+&<<>;8888888888888O>>;888888888888$>$8888888888888888888888888;>>O888888888888888>>;888888888888888>>;88888888888", +"88888888888888888888888888888888888888888888888822278888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888722288888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888O>>$888888888888888>>;88888888888888888888888888888", +"8888888888#uuu#8885uuu68888888888888888888888888uuu#8888888888888888888883uuu.8888#uuuu8888888888888888uuuuuuu-.=888888888888888888888888888888888888888888888888888#uuu8888888888888888888888888888888888888888888888888888888#uuu-8888ryuuu#8888888882uuuuuu2Xr88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888@<48888888888888888888888888888888>@<<<>:&<;888888888><@9>4+@<488888888888", +"8888888888#uuu#87yuu.88888888888888888888888888888888888888888888888888883uuuu388=uuuuu8888888888888888uuu2332uuu.88888888888888888888888888888888888888888888888888#uuu8888888888888888888888888888888888888888888888888888888#uuuu2888-uuuu#8888888882uu-331uuuu#888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888;888$q+;wqw8;%&<&,988$q+888O%&<&%O888+q$4e<4888888888888><488888888888", +"8888888888#uuu#1uu-r8888riuuuuuuu*83uu-8886uu288uuu#882uuyuuuuu38888888883uuyuu68-uyuuu8888888888888888uuu3888iuu18886uuuuuuu.888iuuuuuuu3886uuuuuuui888uuuyuuuuu#88#uuuyuuuuy=887yuuuuuuy=882uu2yuu386uuuuuuuu2888888888888888#uuuyu.8.uyuuu#8888888882uu288886uuu7888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888+<:8888,<;88w9@<>88><488O@<%4%<@O884<&ew4&<>88888888888888;@@O88888888;<488888888888", +"8888888888#uuu2uuy7888885uui*#1uu-8=uuu*881uu688uuu#882uuy.3yuu-8888888883uu2iu26uu5uuu8888888888888888uuu.##1uuu*88=uuu3#6yuu686uu-6##5-38=yuu3#6yuu688uuu-55uuu.88#uuui3.uuu.88iuu1#*iuu.882uuu-223ryuui*#1uu2888888888888888#uuu5uy7uu5uuu#8888888882uu28888ruuu3888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888O&@888O<<4O8;:<98888>88><4884<:888:<4884<%888888888888q@&%O888888888><488888<488888888888", +"8888888888#uuuuuuy=88888uuu=88ruuu782uu.8ruuy888uuu#882uu3886uuu8888888883uu26uu-u.3uuu8888888888888888uuuuuuuuu58885uui8885uui83uuy67888=83uu.8885uu188uuu#88.uu288#uuu8885uu-8#uu-888*uuy882uu388886uuyr883uu2888888888888888#uuu=uu-u-#uuu#8888888882uu288888uuu38888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888%<$88:<+88w<48888:<488@&88888&@884<>8888<488888<488888888888", +"8888888888#uuuuuuui8888#uuuuuuuuuu#86uuy8Xuu.888uuu#882uu388#uuu8888888883uu28yuuu73uuu8888888888888888uuuuuuuuX88882uu3888#uuu87uuuuuuiX882uuuuuuuuu288uuu#883uu288#uuu888#uuu83uuuuuuuuuu882uu388883uu28883uu2888888888888888#uuu81uuuX#uuu#8888888882uu28888ruuuX88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888889<48888O&<&,4$888><4888888<488888<488888888888", +"8888888888#uuuX2uuu5888#uuu2222222788yuu*iuu7888uuu#882uu388#uuu8888888883uu285uui83uuu8888888888888888uuu.Xuuuyr8882uu3888#uuu88*-uuuuuu582uu-222222588uuu#883uu288#uuu888#uuu83uuy2222222882uu388883uu28883uu2888888888888888#uuu8*uuur#uuu#8888888882uu288886uuu788888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888ee8;<%888q<>>>>>>>88><488888O:q&<<%88><4888888<488888888888", +"8888888888#uuu#ryuuu*88=uuu=8888888885uu2uui8888uuu#882uu388#uuu8888888883uu28=uu683uuu888633#888888888uuu385uuu2888.uu18886uu-8=88765-uuu8.uu.888888888uuu#883uu288#uuu888Xuui86uu-8888888882uu38888*uuu7885uu2888633*88888888#uuu88-u.8#uuu#88#3368882uu28887yuui888333=88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888w<$4<9888%<$88888888><4888888888$@<$8><488ee88888ee884<>8888<4888888888888><488888888888", +"8888888888#uuu#8#uuuy7882uui*88=X-888=uuuuu68888uuu#882uu388#uuu8888888883uu28888883uuu8882uu3888888888uuu388iuuu588#uuu#8=-uu383-6=886uuy8#uuu3=88*.388uuu#883uu288#uuur8#yuu38ryuu1788751882uu38888ryuuu2-uuu2888uuu#88888888#uuu888888#uuu#883uu28882uu-331uuuy7888uuu#88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888$<%e&8888+<,88888$88><48888$O88884<>8><488%<>888><%884<>888888888:<488888888888", +"8888888888#uuu#883uuuir87yuuuuuuuu8888iuuuyr8888uuu#882uu388#uuu8888888883uu28888883uuu8882uu3888888888uuu388=yuuu*88.uuuuuuuir83uuuuuuuu388.uuuuuuuu388uuu#883uu288#uuuuuuuu-r886uuuuuuuu2882uu3888886uuuuuyuu288#uu2888888888#uuu888888#uuu#883uu28882uuuuuuuuy#8888uuu#888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888@&+qq88><488884&w>>:&e88><488;&&:>+&&;884<>8888>w<&O888q<>888><@9>48888>>:<%>>O88888888", +"8888888888#uuu#8882uuu.88=.uuuuuy.88886uuu.88888uuu#882uu388#uuu8888888883uu28888883uuu8882uu3888888888uuu3888*uuuy7883yuuuu.r88#iuuuuu-*88886-uuuuui#88uuu#883uu288#uuu2uuu278888#2uuuuu-X882uu3888888#.2163uu2883uu*888888888#uuu888888#uuu#883uu28882uuuuuy2Xr88888uuu#888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888:<<$88888Ow<<<<48888>@<<<<4888$e<<88888888+&<<8888<<<<<<<>88888888", +"88888888888888888888888888887##=88888888888888888888888888888888888888888888888888888888888888888888888888888888888888887##88888888###=88888888r###8888888888888888888888=#=888888888###r8888888888888=r888r-uu588iu-88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888>>;8888888888888O>>;888888888888$>$8888888888888888888888888;>>O888888888888888>>;88888888888888888888888888888", "8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888883u-22uuuu=8ruu688888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888", "8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888883uuuuuu-*88*u-888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888", "888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888r#X333#8888=#=888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888", diff --git a/src/views.cpp b/src/views.cpp index 8721cd4..557bc2f 100644 --- a/src/views.cpp +++ b/src/views.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: views.cpp,v 1.107 2001/02/19 20:23:17 kevin Exp $ +** $Id: views.cpp,v 1.108 2001/02/20 04:48:45 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 @@ -1901,7 +1901,7 @@ PhantomFileView::OnProjections (wxCommandEvent& event) return; } pProj->initFromScanner (theScanner); - m_dDefaultRotation /= PI; // convert back to PI units + m_dDefaultRotation /= TWOPI; // convert back to fraction of a circle Timer timer; if (m_iDefaultTrace > Trace::TRACE_CONSOLE) { @@ -2371,26 +2371,29 @@ ProjectionFileView::OnReconstructFBP (wxCommandEvent& event) wxString optBackprojectName = dialogReconstruction.getBackprojectName(); m_iDefaultBackprojector = Backprojector::convertBackprojectNameToID (optBackprojectName.c_str()); m_iDefaultTrace = dialogReconstruction.getTrace(); + if (m_iDefaultNX > 0 && m_iDefaultNY > 0) { const Projections& rProj = GetDocument()->getProjections(); - ImageFile* pImageFile = new ImageFile; pImageFile->setArraySize (m_iDefaultNX, m_iDefaultNY); - Reconstructor* pReconstructor = new Reconstructor (rProj, *pImageFile, optFilterName.c_str(), m_dDefaultFilterParam, optFilterMethodName.c_str(), m_iDefaultZeropad, optFilterGenerationName.c_str(), optInterpName.c_str(), m_iDefaultInterpParam, optBackprojectName.c_str(), m_iDefaultTrace); + Reconstructor* pReconstructor = new Reconstructor (rProj, *pImageFile, optFilterName.c_str(), + m_dDefaultFilterParam, optFilterMethodName.c_str(), m_iDefaultZeropad, optFilterGenerationName.c_str(), + optInterpName.c_str(), m_iDefaultInterpParam, optBackprojectName.c_str(), m_iDefaultTrace); Timer timerRecon; if (m_iDefaultTrace > Trace::TRACE_CONSOLE) { ReconstructDialog* pDlgReconstruct = new ReconstructDialog (*pReconstructor, rProj, *pImageFile, m_iDefaultTrace, getFrameForChild()); for (int iView = 0; iView < rProj.nView(); iView++) { ::wxYield(); - if (pDlgReconstruct->isCancelled() || ! pDlgReconstruct->reconstructView (iView)) { + if (pDlgReconstruct->isCancelled() || ! pDlgReconstruct->reconstructView (iView, true)) { delete pDlgReconstruct; delete pReconstructor; delete pImageFile; return; } ::wxYield(); + ::wxYield(); while (pDlgReconstruct->isPaused()) { ::wxYield(); ::wxUsleep(50); @@ -2399,9 +2402,9 @@ ProjectionFileView::OnReconstructFBP (wxCommandEvent& event) delete pDlgReconstruct; } else { wxProgressDialog dlgProgress (wxString("Reconstruction"), wxString("Reconstruction Progress"), rProj.nView() + 1, getFrameForChild(), wxPD_CAN_ABORT); - for (int i = 0; i < rProj.nView(); i++) { - pReconstructor->reconstructView (i, 1); - if (! dlgProgress.Update (i + 1)) { + for (int iView = 0; iView < rProj.nView(); iView++) { + pReconstructor->reconstructView (iView, 1); + if (! dlgProgress.Update (iView + 1)) { delete pReconstructor; delete pImageFile; return;