From 11ea72090da18aa290e2c3ab217f1d27736bca50 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 20 Feb 2001 17:44:14 +0000 Subject: [PATCH] r560: no message --- ChangeLog | 7 ++++ images/SplashScreen.psd | Bin 241098 -> 241198 bytes include/projections.h | 4 +- libctsim/projections.cpp | 18 +++++---- libctsim/scanner.cpp | 39 ++++++++++++------- msvc/ctsim/ctsim.plg | 81 ++++++++++++--------------------------- src/dialogs.cpp | 18 ++++----- src/splash.xpm | 28 +++++++------- src/views.cpp | 36 ++++++++++------- 9 files changed, 115 insertions(+), 116 deletions(-) diff --git a/ChangeLog b/ChangeLog index b587ea8..8db424a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +3.0.2 - Released 2/21/01 + + * scanner.cpp: Fixed bug when number of detectors was even. + + * ctsim: Improved error handling when trying to convert + divergent projections into polar form. + 3.0.1 - Released 2/19/01 * ctsim: Fixed dialog box for reconstruction so that diff --git a/images/SplashScreen.psd b/images/SplashScreen.psd index cddfa03c9c426bb4081e341240f104d3ec917c72..e16c0f9f9feacab375a95c6209b2da2fe2fa1d0a 100644 GIT binary patch delta 1503 zcmai!ZEO@p7{{NPIeOPZ>760LqSA}Vo3y>9fDp9g1Pk@b32J$(EwrH_h%YIIh~Y~U z_#hFnKxv1U3dWRI3)hCksfl`!(~x+^#+sNjh15nXqSxMQZ+Gu*Z=Bt|&$ye(KF>4r z%;cB<{^y60nK$pv?4NHbtp@-kMw>a%W`Ir++E?9LV;L!F*)#sf3(LQ}z3%?Nm4O5A zj%b%NXEXnF6%YJ$wWq|>|JUI0Xv4awu3msYX&@LLGcyzbcMdpUKbL5z9KU8u>RCH?(`6O7-pqX5 zNl#SZE!HGhKoYGJ71*mM_MwQAuC2tc6xc085eaBlC9boj0NIC7M4}HWaZRBNSQ?Fh zq|xOrywjEg;*JbSS$fWeo2QGTIqGQF+M$^iNVq{vYh2^tXL}{Q&c^yy;fthn5gdWT z(2kx)vrrY9gDhw^T7W!gG27_I2N4^o#@q3uR}KBoE(EcaHTcIz?eb(T?pSY2aH6Ht zxfJdD1b;AH=188@!YH0o=#mcn{tTI0W0P_^9S_G8dc6Z5n67Y0XE~0AGb)>Z0zZMQ zagI~rw8}P|#KlGy4{IuW;}l+ktO<@YqLm%*#E&6cl9OC?LR0AF(>Pb4#~GPj>%t|- znlh#`?AvZ!hHNq?naPRF6#J9nwaAv^Bs~$$Bw58-JQo$^I1fWIn*xPxJ%`1Qm*Z*} zV(jDdxMzz_G!_U%Q*?36Ba z)DckGcZobvqhm~Ep=6$DShTXDRGuih#yO_Yd9qF<;$fLBQ1V22%AQyAM8huU@DyuF z=ZON&HN#1EJ(DMLz@h9>xWs$uW=?TVu##OenmY5oaL@PV-GBGuZ zZ>t_x=rs=!L?RB!tgnuk8tEy!vyqq@g*?@vDfYliOpSuo+d@euZ6c;d5**8(fdRH- zGch%ipp|vJO6Iw32_R0l+n%B~BdCJ@ev;G`%YfQOHI96C1?281T1=Zxkvd^s7^O_ z`jY4pb?7>JfU%+3h)Yb+N!Y=}#4Obh+7HAmTc(>~2}>4ZGfG=-%Z2uO?zxx2rAMn9%C0LrZ)EzHH+SCIIN4Wvp{?tLT=}oRUHua#-pl*PYHk6XFMV{lfE_MC z_j9pzk$Ou|Cn}{=CFpbhI8ur>vmQ6fLa3B+_@ofIY4?8gT_FCto%(I)!@#FI98~Q@ zQ_S3q@(X#{6TK+>qr(m*@GLmt6*veT&3a0m*xXHQzAn91;!Yym?oC~*Ruc&mrsz>T+MGxj|Gia54_pI?1wE6PJVkOL9)C@MmG(RSv0 z0Z;#r{tjZ(RoIIka*DL)p{G#(l?ryK2Jfpzcj?ck@Nr8*#hHjK(_Q`em{nFyN-C=1 zFa7v!OHxfoK$h9=FYqR0Sx~XUCHCr~BYSCkApK8*PfmsXVsC~W*J9%<#?o91=z zQTs`mUZ2;!hsG*2Y>VmM?Ql|NH)4kO5SLggZg>~8e!=iAs6sZpYec}>V+{0XAXI>** ppcDetValue, double** ppdDet, double** ppdView, unsigned int nView, unsigned int nDet, int iInterpolate); diff --git a/libctsim/projections.cpp b/libctsim/projections.cpp index 970b437..d80579e 100644 --- a/libctsim/projections.cpp +++ b/libctsim/projections.cpp @@ -8,7 +8,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: projections.cpp,v 1.47 2001/02/08 06:25:07 kevin Exp $ +** $Id: projections.cpp,v 1.48 2001/02/20 17:44:14 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 @@ -687,7 +687,8 @@ Projections::convertPolar (ImageFile& rIF, int iInterpolationID) double** ppdView = adView.getArray(); double** ppdDet = adDet.getArray(); - calcArrayPolarCoordinates (nx, ny, ppdView, ppdDet); + if (! calcArrayPolarCoordinates (nx, ny, ppdView, ppdDet)) + return false; std::complex** ppcDetValue = new std::complex* [m_nView]; unsigned int iView; @@ -750,20 +751,21 @@ Projections::convertFFTPolar (ImageFile& rIF, int iInterpolationID, int iZeropad fftw_destroy_plan (plan); delete [] pcIn; - calcArrayPolarCoordinates (nx, ny, ppdView, ppdDet); + bool bError = calcArrayPolarCoordinates (nx, ny, ppdView, ppdDet); - interpolatePolar (v, vImag, nx, ny, ppcDetValue, ppdView, ppdDet, m_nView, m_nDet, iInterpolationID); + if (! bError) + interpolatePolar (v, vImag, nx, ny, ppcDetValue, ppdView, ppdDet, m_nView, m_nDet, iInterpolationID); for (iView = 0; iView < m_nView; iView++) delete [] ppcDetValue[iView]; delete [] ppcDetValue; - return true; + return bError; #endif } -void +bool Projections::calcArrayPolarCoordinates (unsigned int nx, unsigned int ny, double** ppdView, double** ppdDet) { double xMin = -phmLen() / 2; @@ -778,7 +780,7 @@ Projections::calcArrayPolarCoordinates (unsigned int nx, unsigned int ny, double if (m_geometry != Scanner::GEOMETRY_PARALLEL) { sys_error (ERR_WARNING, "convertPolar supports Parallel only"); - return; + return false; } // Calculates polar coordinates (view#, det#) for each point on phantom grid @@ -800,6 +802,8 @@ Projections::calcArrayPolarCoordinates (unsigned int nx, unsigned int ny, double ppdDet[ix][iy] = (r / m_detInc) + iDetCenter; } } + + return true; } void diff --git a/libctsim/scanner.cpp b/libctsim/scanner.cpp index 7081903..6dbfec8 100644 --- a/libctsim/scanner.cpp +++ b/libctsim/scanner.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: scanner.cpp,v 1.30 2001/02/08 06:25:07 kevin Exp $ +** $Id: scanner.cpp,v 1.31 2001/02/20 17:44:14 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 @@ -119,20 +119,25 @@ Scanner::Scanner (const Phantom& phm, const char* const geometryName, m_rotLen = rot_anglen; m_rotInc = m_rotLen / m_nView; if (m_idGeometry == GEOMETRY_PARALLEL) { + m_dFanBeamAngle = 0; m_detLen = m_dScanDiameter; m_detInc = m_detLen / m_nDet; - if (m_nDet % 2 == 0) // Adjust for Even number of detectors - m_detInc = m_detLen / (m_nDet - 1); // center detector = (nDet/2)-1 - - m_dFanBeamAngle = 0; + double dDetectorArrayEndOffset = 0; + // For even number of detectors, make detInc slightly larger so that center lies + // at nDet/2. Also, extend detector array by one detInc so that all of the phantom is scanned + if (m_nDet % 2 == 0) { // Adjust for Even number of detectors + m_detInc = m_detLen / (m_nDet - 1); // center detector = (nDet/2) + dDetectorArrayEndOffset = m_detInc; + } + double dHalfDetLen = m_detLen / 2; m_initPos.xs1 = m_dXCenter - dHalfDetLen; m_initPos.ys1 = m_dYCenter + m_dFocalLength; - m_initPos.xs2 = m_dXCenter + dHalfDetLen; + m_initPos.xs2 = m_dXCenter + dHalfDetLen + dDetectorArrayEndOffset; m_initPos.ys2 = m_dYCenter + m_dFocalLength; m_initPos.xd1 = m_dXCenter - dHalfDetLen; m_initPos.yd1 = m_dYCenter - m_dFocalLength; - m_initPos.xd2 = m_dXCenter + dHalfDetLen; + m_initPos.xd2 = m_dXCenter + dHalfDetLen + dDetectorArrayEndOffset; m_initPos.yd2 = m_dYCenter - m_dFocalLength; m_initPos.angle = 0.0; } else if (m_idGeometry == GEOMETRY_EQUILINEAR) { @@ -146,8 +151,11 @@ Scanner::Scanner (const Phantom& phm, const char* const geometryName, m_detLen = dHalfDetLen * 2; m_detInc = m_detLen / m_nDet; - if (m_nDet % 2 == 0) // Adjust for Even number of detectors - m_detInc = m_detLen / (m_nDet - 1); // center detector = (nDet/2)-1 + double dDetectorArrayEndOffset = 0; + if (m_nDet % 2 == 0) { // Adjust for Even number of detectors + m_detInc = m_detLen / (m_nDet - 1); // center detector = (nDet/2) + dDetectorArrayEndOffset = m_detInc; + } m_dFanBeamAngle = dAngle * 2; m_initPos.angle = 0.0; @@ -157,7 +165,7 @@ Scanner::Scanner (const Phantom& phm, const char* const geometryName, m_initPos.ys2 = m_dYCenter + m_dFocalLength; m_initPos.xd1 = m_dXCenter - dHalfDetLen; m_initPos.yd1 = m_dYCenter - m_dFocalLength; - m_initPos.xd2 = m_dXCenter + dHalfDetLen; + m_initPos.xd2 = m_dXCenter + dHalfDetLen + dDetectorArrayEndOffset; m_initPos.yd2 = m_dYCenter - m_dFocalLength; m_initPos.angle = 0.0; } else if (m_idGeometry == GEOMETRY_EQUIANGULAR) { @@ -170,10 +178,13 @@ Scanner::Scanner (const Phantom& phm, const char* const geometryName, m_detLen = 2 * dAngle; m_detInc = m_detLen / m_nDet; - if (m_nDet % 2 == 0) // Adjust for Even number of detectors - m_detInc = m_detLen / (m_nDet - 1); // center detector = (nDet/2)-1 - m_dAngularDetIncrement = m_detInc * 2; // Angular Position 2x gamma angle - m_dAngularDetLen = m_detLen * 2; + double dDetectorArrayEndOffset = 0; + if (m_nDet % 2 == 0) { // Adjust for Even number of detectors + m_detInc = m_detLen / (m_nDet - 1); // center detector = (nDet/2) + dDetectorArrayEndOffset = m_detInc; + } + m_dAngularDetIncrement = 2 * m_detInc; // Angular Position 2x gamma angle + m_dAngularDetLen = 2 * m_detLen + 2 * dDetectorArrayEndOffset; m_initPos.dAngularDet = -m_dAngularDetLen / 2; m_dFanBeamAngle = dAngle * 2; diff --git a/msvc/ctsim/ctsim.plg b/msvc/ctsim/ctsim.plg index f0425e3..9b2015d 100644 --- a/msvc/ctsim/ctsim.plg +++ b/msvc/ctsim/ctsim.plg @@ -3,73 +3,42 @@
 

Build Log

---------------------Configuration: ctsim - Win32 Release-------------------- +--------------------Configuration: ctsim - Win32 Debug--------------------

Command Lines

-Creating command line "rc.exe /l 0x409 /fo"Release/ctsim.res" /i "\wx2.2.5\include" /d "NDEBUG" "C:\ctsim\msvc\ctsim\ctsim.rc"" -Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP273.tmp" with contents +Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP5F2.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\" /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" +/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.1\" /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\RSP273.tmp" -Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP274.tmp" with contents +Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP5F2.tmp" +Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP5F3.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" +winmm.lib rpcrt4.lib ws2_32.lib ../libctsim/Debug/libctsim.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 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: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 +.\Debug\dlgreconstruct.obj +.\Debug\docs.obj +.\Debug\graph3dview.obj +.\Debug\views.obj +.\Debug\ctsim.res +\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.2.5\lib\jpegd.lib +\wx2.2.5\lib\pngd.lib +\wx2.2.5\lib\wxd.lib +\wx2.2.5\lib\xpmd.lib +\wx2.2.5\lib\zlibd.lib +\wx2.2.5\lib\tiffd.lib ] -Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP274.tmp" -Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP275.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\RSP275.tmp" -Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP276.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 -.\Release\dialogs.obj -.\Release\dlgprojections.obj -.\Release\dlgreconstruct.obj -.\Release\docs.obj -.\Release\graph3dview.obj -.\Release\views.obj -.\Release\ctsim.res -\ctsim\msvc\libctsim\Release\libctsim.lib -"\fftw-2.1.3\Win32\FFTW2st\Release\FFTW2st.lib" -"\fftw-2.1.3\Win32\RFFTW2st\Release\RFFTW2st.lib" -\wx2.2.5\lib\jpeg.lib -\wx2.2.5\lib\png.lib -\wx2.2.5\lib\wx.lib -\wx2.2.5\lib\xpm.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\RSP276.tmp" +Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP5F3.tmp"

Output Window

-Compiling resources... 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 - - +cl.exe terminated at user request. -

Results

-ctsim.exe - 0 error(s), 1 warning(s)
diff --git a/src/dialogs.cpp b/src/dialogs.cpp index f25952c..6d20898 100644 --- a/src/dialogs.cpp +++ b/src/dialogs.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: dialogs.cpp,v 1.36 2001/02/19 20:23:17 kevin Exp $ +** $Id: dialogs.cpp,v 1.37 2001/02/20 17:44:14 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 @@ -1303,17 +1303,9 @@ DialogGetConvertPolarParameters::DialogGetConvertPolarParameters (wxWindow* pPar wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL); - pTopSizer->Add (new wxStaticText (this, -1, pszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5); - + pTopSizer->Add (new wxStaticText (this, -1, pszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5); pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5); - std::ostringstream os; - os << iDefaultXSize; - m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0); - std::ostringstream osYSize; - osYSize << iDefaultYSize; - m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0); - wxFlexGridSizer* pGridSizer = new wxFlexGridSizer (1); m_pRadioBoxInterpolation = new StringValueAndTitleRadioBox (this, _T("Interpolation"), Projections::getInterpCount(), Projections::getInterpTitleArray(), Projections::getInterpNameArray()); @@ -1321,8 +1313,14 @@ DialogGetConvertPolarParameters::DialogGetConvertPolarParameters (wxWindow* pPar pGridSizer->Add (m_pRadioBoxInterpolation, 0, wxALL | wxALIGN_CENTER); wxFlexGridSizer* pTextGridSizer = new wxFlexGridSizer (2); + std::ostringstream os; + os << iDefaultXSize; + m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0); pTextGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); pTextGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); + std::ostringstream osYSize; + osYSize << iDefaultYSize; + m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0); pTextGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); pTextGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); #ifdef DEBUG diff --git a/src/splash.xpm b/src/splash.xpm index 7aba63c..e08b5fe 100644 --- a/src/splash.xpm +++ b/src/splash.xpm @@ -497,20 +497,20 @@ static char *splash[] = { "88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888", "88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888", "88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888", -"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", +"88888888888888888888888888888888888888888888888822278888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888722288888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888O>>$888888888888888>>;88888888888888;>>O88888888888", +"8888888888#uuu#8885uuu68888888888888888888888888uuu#8888888888888888888883uuu.8888#uuuu8888888888888888uuuuuuu-.=888888888888888888888888888888888888888888888888888#uuu8888888888888888888888888888888888888888888888888888888#uuu-8888ryuuu#8888888882uuuuuu2Xr88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888@<48888888888888888888888888888888>@<<<>:&<;888888888><@9>4>,88888q<$88888888", +"8888888888#uuu#riuui88888862uuy1#88.22X888r222r82227885226*iuy588888888883uuuu-883uuuuu8888888888888888uuu3888iuu28888#1yuu268888862uuui.7888=.-uui3r88822273-u-6888#uuu=.yui78888r3iuu-.=8885226=52688*iuu15225888888888888888#uuuuu=8#uuuuu#8888888882uu28887yuu-8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888,<;8888+<:8889@<<,>888$q+;wqw8;%&<&,988$q+888O%&<&%O888+q$4e<48888888888888884<>88888888", +"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<48888:<488@&88888&@884<>8888<488888<48888O&<&,4$888><4888888<488888>>>>>>88><488888O:q&<<%88><4888888<4888888888$@<$8><488ee88888ee884<>8888<48888888888$e&$888888888888", +"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:&@$8888888888888", +"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>4888<<48888>@<<<<4888$e<<88888888+&<<888<<<<<<<>;8888888888888O>>;888888888888$>$8888888888888888888888888;>>O888888888888888>>;88888888888888888888888888888", "8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888883u-22uuuu=8ruu688888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888", "8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888883uuuuuu-*88*u-888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888", diff --git a/src/views.cpp b/src/views.cpp index 557bc2f..d944e29 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.108 2001/02/20 04:48:45 kevin Exp $ +** $Id: views.cpp,v 1.109 2001/02/20 17:44:14 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 @@ -2281,21 +2281,26 @@ ProjectionFileView::OnConvertPolar (wxCommandEvent& event) m_iDefaultPolarNX = dialogPolar.getXSize(); m_iDefaultPolarNY = dialogPolar.getYSize(); ImageFileDocument* pPolarDoc = theApp->newImageDoc(); - ImageFile& rIF = pPolarDoc->getImageFile(); + ImageFile* pIF = new ImageFile (m_iDefaultPolarNX, m_iDefaultPolarNY); + m_iDefaultPolarInterpolation = Projections::convertInterpNameToID (strInterpolation.c_str()); + if (! rProj.convertPolar (*pIF, m_iDefaultPolarInterpolation)) { + delete pIF; + *theApp->getLog() << "Error converting to Polar\n"; + return; + } + pPolarDoc = theApp->newImageDoc (); if (! pPolarDoc) { sys_error (ERR_SEVERE, "Unable to create image file"); return; } - rIF.setArraySize (m_iDefaultPolarNX, m_iDefaultPolarNY); - m_iDefaultPolarInterpolation = Projections::convertInterpNameToID (strInterpolation.c_str()); - rProj.convertPolar (rIF, m_iDefaultPolarInterpolation); - rIF.labelAdd (rProj.getLabel().getLabelString().c_str(), rProj.calcTime()); + pPolarDoc->setImageFile (pIF); + pIF->labelAdd (rProj.getLabel().getLabelString().c_str(), rProj.calcTime()); std::ostringstream os; os << "Convert projection file " << GetFrame()->GetTitle().c_str() << " to polar image: xSize=" << m_iDefaultPolarNX << ", ySize=" << m_iDefaultPolarNY << ", interpolation=" << strInterpolation.c_str(); *theApp->getLog() << os.str().c_str() << "\n"; - rIF.labelAdd (os.str().c_str()); + pIF->labelAdd (os.str().c_str()); if (theApp->getAskDeleteNewDocs()) pPolarDoc->Modify (true); pPolarDoc->UpdateAllViews (); @@ -2315,22 +2320,27 @@ ProjectionFileView::OnConvertFFTPolar (wxCommandEvent& event) m_iDefaultPolarNX = dialogPolar.getXSize(); m_iDefaultPolarNY = dialogPolar.getYSize(); m_iDefaultPolarZeropad = dialogPolar.getZeropad(); + ImageFile* pIF = new ImageFile (m_iDefaultPolarNX, m_iDefaultPolarNY); + + m_iDefaultPolarInterpolation = Projections::convertInterpNameToID (strInterpolation.c_str()); + if (! rProj.convertFFTPolar (*pIF, m_iDefaultPolarInterpolation, m_iDefaultPolarZeropad)) { + delete pIF; + *theApp->getLog() << "Error converting to polar\n"; + return; + } ImageFileDocument* pPolarDoc = theApp->newImageDoc(); - ImageFile& rIF = pPolarDoc->getImageFile(); if (! pPolarDoc) { sys_error (ERR_SEVERE, "Unable to create image file"); return; } - rIF.setArraySize (m_iDefaultPolarNX, m_iDefaultPolarNY); - m_iDefaultPolarInterpolation = Projections::convertInterpNameToID (strInterpolation.c_str()); - rProj.convertFFTPolar (rIF, m_iDefaultPolarInterpolation, m_iDefaultPolarZeropad); - rIF.labelAdd (rProj.getLabel().getLabelString().c_str(), rProj.calcTime()); + pPolarDoc->setImageFile (pIF); + pIF->labelAdd (rProj.getLabel().getLabelString().c_str(), rProj.calcTime()); std::ostringstream os; os << "Convert projection file " << GetFrame()->GetTitle().c_str() << " to FFT polar image: xSize=" << m_iDefaultPolarNX << ", ySize=" << m_iDefaultPolarNY << ", interpolation=" << strInterpolation.c_str() << ", zeropad=" << m_iDefaultPolarZeropad; *theApp->getLog() << os.str().c_str() << "\n"; - rIF.labelAdd (os.str().c_str()); + pIF->labelAdd (os.str().c_str()); if (theApp->getAskDeleteNewDocs()) pPolarDoc->Modify (true); pPolarDoc->UpdateAllViews (); -- 2.34.1