r310: plotfile updates
authorKevin M. Rosenberg <kevin@rosenberg.net>
Thu, 21 Dec 2000 03:40:58 +0000 (03:40 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Thu, 21 Dec 2000 03:40:58 +0000 (03:40 +0000)
13 files changed:
ChangeLog
include/ctsupport.h
libctsim/imagefile.cpp
libctsim/phantom.cpp
libctsupport/mathfuncs.cpp
libctsupport/plotfile.cpp
msvc/ctsim/ctsim.plg
msvc/libctsim/libctsim.dsp
src/ctsim.h
src/dialogs.cpp
src/dialogs.h
src/views.cpp
src/views.h

index 029bd14091fbea12782224c5cd0db6d9f9257e7a..63c618d9feffedda14a80cff231cad6dd0572889 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
 2.5.1 - Released 12/30/00
 
-12/18/00  Added plotfile class
+       * Added PlotFile class
+       * Added plotting of rows & columns to ctsim
+       * Updated if2 to output plot files
+       * Added y-axis scaling to plotting in ctsim
+       * Reworked statistics to share between imagefile and plotfile class
+       * Fixed scaling bug in rasterizing Phantom with nsample > 2
        
 2.5.0 - 12/18/00 
    First Microsoft Windows GUI version
index cea4f14dc7e86e6211326f400aed3dc22be65030..460af416de8c3d04a4b1ac7ec187a40598a32fc1 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ctsupport.h,v 1.15 2000/12/20 20:08:48 kevin Exp $
+**  $Id: ctsupport.h,v 1.16 2000/12/21 03:40:58 kevin Exp $
 **
 **
 **  This program is free software; you can redistribute it and/or modify
@@ -236,7 +236,7 @@ void scale2d (double x[], double y[], int pts, double xfact, double yfact);
 // mathfuncs.cpp
 double normalizeAngle (double theta);
 double integrateSimpson (const double xmin, const double xmax, const double *y, const int np);
-void vectorNumericStatistics (std::vector<double> vec, double& min, double& max, double& mean, double& mode, double& median, double& stddev);\r
+void vectorNumericStatistics (std::vector<double> vec, const int nPoints, double& min, double& max, double& mean, double& mode, double& median, double& stddev);\r
 
 
 /*----------------------------------------------------------------------*/
index d4c973cc3a4a1aeeb1f7be4054c9f9ade7f581ff..b86ff794ae9cd0242201c21e33184bca9c513e3f 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: imagefile.cpp,v 1.22 2000/12/20 20:08:48 kevin Exp $
+**  $Id: imagefile.cpp,v 1.23 2000/12/21 03:40:58 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
@@ -233,13 +233,15 @@ ImageFile::statistics (double& min, double& max, double& mean, double& mode, dou
     if (v == NULL || nx == 0 || ny == 0)
                return;
 \r
-       std::vector<double> vecImage (nx * ny);\r
+       std::vector<double> vecImage;\r
+       int iVec = 0;\r
+       vecImage.resize (nx * ny);\r
     for (int ix = 0; ix < nx; ix++) {\r
                for (int iy = 0; iy < ny; iy++)\r
-                       vecImage.push_back (v[ix][iy]);\r
+                       vecImage[iVec++] = v[ix][iy];\r
        }\r
 \r
-       vectorNumericStatistics (vecImage, min, max, mean, mode, median, stddev);\r
+       vectorNumericStatistics (vecImage, nx * ny, min, max, mean, mode, median, stddev);\r
 }
 
 
index e6d4a6299fad95ee07d0af777f2c62ee2219247b..9125e36be718af7ea36959b42bf5461cd673f0ab 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: phantom.cpp,v 1.22 2000/12/16 06:12:47 kevin Exp $
+**  $Id: phantom.cpp,v 1.23 2000/12/21 03:40:58 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
@@ -482,7 +482,7 @@ Phantom::convertToImagefile (ImageFile& im, const int in_nsample, const int trac
     for (int iy = 0; iy < ny; iy++) {
       int iColStore = ix;
       if (bStoreAtColumnPos)
-       iColStore += colStart;
+               iColStore += colStart;
       v[iColStore][iy] = 0;
     }
 
@@ -499,7 +499,7 @@ Phantom::convertToImagefile (ImageFile& im, const int in_nsample, const int trac
          for (kx = 0, xi = x + kxofs; kx < nsample; kx++, xi += kxinc) {
            for (ky = 0, yi = y + kyofs; ky < nsample; ky++, yi += kyinc)
              if (rPElem.isPointInside (xi, yi, PHM_COORD) == TRUE)
-               v[iColStore][iy] += rPElem.atten();
+                       v[iColStore][iy] += rPElem.atten();
              } // for kx
          } /* for iy */
       }  /* for ix */
@@ -507,11 +507,16 @@ Phantom::convertToImagefile (ImageFile& im, const int in_nsample, const int trac
   
 
   if (nsample > 1) {
-    double factor = 1.0 / (nsample * nsample);
-
-    for (int ix = 0; ix < colCount; ix++)
-      for (int iy = 0; iy < ny; iy++)
-       v[ix][iy] *= factor;
+    double factor = 1.0 / static_cast<double>(nsample * nsample);
+
+\r
+    for (int ix = 0; ix < colCount; ix++) {
+               int iColStore = ix;\r
+               if (bStoreAtColumnPos)\r
+                       iColStore += colStart;\r
+               for (int iy = 0; iy < ny; iy++)
+                       v[iColStore][iy] *= factor;\r
+       }
   }
 }
 
index c07445253d3355a5f92df91b67842f7b44d6d904..2eaa55153c6f73c6325dd66e4335dad3c0fcd912 100644 (file)
@@ -2,7 +2,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: mathfuncs.cpp,v 1.3 2000/12/20 20:08:48 kevin Exp $
+**  $Id: mathfuncs.cpp,v 1.4 2000/12/21 03:40:58 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,17 +84,16 @@ normalizeAngle (double theta)
 \r
 \r
 void \r
-vectorNumericStatistics (std::vector<double> vec, double& min, double& max, double& mean, double& mode, double& median, double& stddev)\r
+vectorNumericStatistics (std::vector<double> vec, const int nPoints, double& min, double& max, double& mean, double& mode, double& median, double& stddev)\r
 {\r
-       int n = vec.size();\r
-       if (n <= 0)\r
+       if (nPoints <= 0)\r
                return;\r
 \r
     mean = 0;\r
     min = vec[0];\r
     max = vec[0];\r
        int i;\r
-    for (i = 0; i < n; i++) {\r
+    for (i = 0; i < nPoints; i++) {\r
                double v = vec[i];\r
                if (v > max)\r
                        max = v;\r
@@ -102,21 +101,21 @@ vectorNumericStatistics (std::vector<double> vec, double& min, double& max, doub
                        min = v;\r
                mean += v;\r
     }\r
-    mean /= n;\r
+    mean /= nPoints;\r
        \r
     static const int nbin = 1024;\r
     int hist[ nbin ] = {0};\r
     double spread = max - min;\r
     mode = 0;\r
     stddev = 0;\r
-    for (i = 0; i < n; i++) {\r
+    for (i = 0; i < nPoints; i++) {\r
                double v = vec[i];\r
                int b = static_cast<int>((((v - min) / spread) * (nbin - 1)) + 0.5);\r
                hist[b]++;\r
                double diff = (v - mean);\r
                stddev += diff * diff;\r
     }\r
-    stddev = sqrt (stddev / n);\r
+    stddev = sqrt (stddev / nPoints);\r
        \r
     int max_binindex = 0;\r
     int max_bin = -1;\r
@@ -131,8 +130,8 @@ vectorNumericStatistics (std::vector<double> vec, double& min, double& max, doub
        \r
        std::sort(vec.begin(), vec.end());\r
        \r
-       if (n % 2)  // Odd\r
-               median = vec[((n - 1) / 2)];\r
+       if (nPoints % 2)  // Odd\r
+               median = vec[((nPoints - 1) / 2)];\r
        else        // Even\r
-               median = (vec[ (n / 2) - 1 ] + vec[ n / 2 ]) / 2;\r
+               median = (vec[ (nPoints / 2) - 1 ] + vec[ nPoints / 2 ]) / 2;\r
 }\r
index 5a160cdbe4bbf31a1f18291b1f887e0962bc8c81..b9e8ac641b5a80a3b5e905600634bf4f41605473 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: plotfile.cpp,v 1.3 2000/12/20 20:08:48 kevin Exp $
+**  $Id: plotfile.cpp,v 1.4 2000/12/21 03:40:58 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
@@ -153,15 +153,17 @@ PlotFile::statistics (int iStartingCol, double& min, double& max, double& mean,
 \r
        int iOffset = iStartingCol * m_iNumRecords;\r
        int iNPoints = (m_iNumColumns - iStartingCol) * m_iNumRecords;\r
-       std::vector<double> vec (iNPoints);\r
+       std::vector<double> vec;\r
+       vec.resize (iNPoints);\r
 \r
+       int iVec = 0;\r
        for (int iCol = iStartingCol; iCol < m_iNumColumns; iCol++) {\r
                int iOffset = iCol * m_iNumRecords;\r
                for (int iRec = 0; iRec < m_iNumRecords; iRec++)\r
-                       vec.push_back( m_vecCurves[ iRec + iOffset ] );\r
+                       vec[iVec++] = m_vecCurves[ iRec + iOffset ];\r
        }\r
 \r
-       vectorNumericStatistics (vec, min, max, mean, mode, median, stddev);\r
+       vectorNumericStatistics (vec, iNPoints, min, max, mean, mode, median, stddev);\r
 \r
        return true;\r
 }\r
index dfc535a5722a54c5df8387e19b011066ce6b4e6a..9ec4c1f38718235d3f628eb96eb15af013905970 100644 (file)
@@ -6,14 +6,13 @@
 --------------------Configuration: ctsim - Win32 Debug--------------------\r
 </h3>\r
 <h3>Command Lines</h3>\r
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP16A.tmp" with contents\r
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1EF.tmp" with contents\r
 [\r
 /nologo /G6 /MTd /W3 /Gm /GR /GX /ZI /Od /I "\wx2\include" /I "." /I "..\..\include" /I "..\..\getopt" /I "..\..\..\lpng108" /I "..\..\..\zlib" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /D 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=\"2.5.0\" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c \r
-"C:\ctsim-2.0.6\src\dialogs.cpp"\r
 "C:\ctsim-2.0.6\src\views.cpp"\r
 ]\r
-Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP16A.tmp" \r
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP16B.tmp" with contents\r
+Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1EF.tmp" \r
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1F0.tmp" with contents\r
 [\r
 comctl32.lib winmm.lib rpcrt4.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../libctsim/Debug/libctsim.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\..\lpng108\msvc\win32\libpng\lib_dbg\libpng.lib ..\..\..\lpng108\msvc\win32\zlib\lib_dbg\zlib.lib libcmtd.lib ..\..\..\fftw-2.1.3\Win32\FFTW2st\Debug\FFTW2st.lib ..\..\..\fftw-2.1.3\Win32\RFFTW2st\Debug\RFFTW2st.lib ../../../wx2/lib/wxd.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/ctsim.pdb" /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrtd.lib" /out:"Debug/ctsim.exe" /pdbtype:sept /libpath:"..\..\..\lpng108\msvc\win32\libpng\lib" /libpath:"..\..\..\lpng108\msvc\win32\zlib\lib" \r
 ".\Debug\ctsim.obj"\r
@@ -28,20 +27,20 @@ comctl32.lib winmm.lib rpcrt4.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib w
 "\fftw-2.1.3\Win32\RFFTW2st\Debug\RFFTW2st.lib"\r
 "\wx2\lib\wxd.lib"\r
 ]\r
-Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP16B.tmp"\r
+Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP1F0.tmp"\r
 <h3>Output Window</h3>\r
 Compiling...\r
-dialogs.cpp\r
 views.cpp\r
 Linking...\r
 Creating command line "bscmake.exe /nologo /o"Debug/ctsim.bsc"  ".\Debug\ctsim.sbr" ".\Debug\dialogs.sbr" ".\Debug\dlgprojections.sbr" ".\Debug\dlgreconstruct.sbr" ".\Debug\docs.sbr" ".\Debug\views.sbr""\r
 Creating browse info file...\r
+BSCMAKE: warning BK4503 : minor error in .SBR file '.\Debug\views.sbr' ignored\r
 <h3>Output Window</h3>\r
 \r
 \r
 \r
 <h3>Results</h3>\r
-ctsim.exe - 0 error(s), 0 warning(s)\r
+ctsim.exe - 0 error(s), 1 warning(s)\r
 </pre>\r
 </body>\r
 </html>\r
index 9f377be8a3d8afaf18f1208852b8d99ec4e24fec..22f5b3bc5c1d734569029dc5708fb25b1774018b 100644 (file)
@@ -94,8 +94,19 @@ SOURCE=..\..\libctsim\array2dfile.cpp
 # Begin Source File\r
 \r
 SOURCE=..\..\libctsim\backprojectors.cpp\r
+\r
+!IF  "$(CFG)" == "libctsim - Win32 Release"\r
+\r
 # ADD CPP /GR-\r
 # SUBTRACT CPP /X\r
+\r
+!ELSEIF  "$(CFG)" == "libctsim - Win32 Debug"\r
+\r
+# ADD CPP /GR\r
+# SUBTRACT CPP /X\r
+\r
+!ENDIF \r
+\r
 # End Source File\r
 # Begin Source File\r
 \r
@@ -243,6 +254,10 @@ SOURCE=..\..\include\mpiworld.h
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\..\include\msvc_compat.h\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\..\include\phantom.h\r
 # End Source File\r
 # Begin Source File\r
index d925599edfae8b4d08ad097548d6dbefc8d1a92e..486224bafc3a02b50442062a9497c0f4152fa12a 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ctsim.h,v 1.10 2000/12/20 20:08:48 kevin Exp $
+**  $Id: ctsim.h,v 1.11 2000/12/21 03:40:58 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
@@ -135,7 +135,8 @@ enum {
        IFMENU_PLOT_ROW,\r
        IFMENU_PLOT_COL,
     IFMENU_VIEW_SCALE_AUTO,
-    IFMENU_VIEW_SCALE_MINMAX,
+    IFMENU_VIEW_SCALE_MINMAX,\r
+       IFMENU_COMPARE_IMAGES,
     PHMMENU_PROCESS_RASTERIZE,
     PHMMENU_PROCESS_PROJECTIONS,\r
        PLOTMENU_VIEW_SCALE_MINMAX,\r
index 622efb29f56773e553b41ab8b7c6f486ee091345..66191bb761ddd90d8a67d18ce577e18838574fe2 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: dialogs.cpp,v 1.18 2000/12/20 20:08:48 kevin Exp $
+**  $Id: dialogs.cpp,v 1.19 2000/12/21 03:40:58 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
 #endif\r
 \r
 
+///////////////////////////////////////////////////////////////////////\r
+// CLASS IMPLEMENTATION\r
+//    StringValueAndTitleListBox\r
+///////////////////////////////////////////////////////////////////////\r
+\r
 StringValueAndTitleListBox::StringValueAndTitleListBox (wxDialog* pParent, int nChoices, const char* aszTitle[], const char* aszValue[])
-  : wxListBox ()
+: wxListBox ()
 {
-    wxString* psTitle = new wxString [nChoices];
-    for (int i = 0; i < nChoices; i++)
-       psTitle[i] = aszTitle[i];
-
-    Create (pParent, -1, wxDefaultPosition, wxSize(200,-1), nChoices, psTitle, wxLB_SINGLE | wxLB_NEEDED_SB);
-
-    m_ppszValues = aszValue;\r
-       delete [] psTitle;
+  wxString* psTitle = new wxString [nChoices];
+  for (int i = 0; i < nChoices; i++)
+    psTitle[i] = aszTitle[i];
+  
+  Create (pParent, -1, wxDefaultPosition, wxSize(200,-1), nChoices, psTitle, wxLB_SINGLE | wxLB_NEEDED_SB);
+  
+  m_ppszValues = aszValue;\r
+  delete [] psTitle;
 };
 
 const char*
@@ -81,30 +86,34 @@ StringValueAndTitleListBox::getSelectionStringValue (void) const
 }
 
 
+///////////////////////////////////////////////////////////////////////\r
+// CLASS IMPLEMENTATION\r
+//    DialogGetPhantom\r
+///////////////////////////////////////////////////////////////////////\r
 
 DialogGetPhantom::DialogGetPhantom (wxFrame* pParent, int iDefaultPhantom)
-    : wxDialog (pParent, -1, "Select Phantom", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
+: wxDialog (pParent, -1, "Select Phantom", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
 {
   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
-
+  
   pTopSizer->Add (new wxStaticText (this, -1, "Select Phantom"), 0, wxALIGN_CENTER | wxALL, 5);
-                  
+  
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxALL, 5);
-
+  
   m_pListBoxPhantom = new StringValueAndTitleListBox (this, Phantom::getPhantomCount(), Phantom::getPhantomTitleArray(), Phantom::getPhantomNameArray());
   m_pListBoxPhantom->SetSelection (iDefaultPhantom);
   pTopSizer->Add (m_pListBoxPhantom, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
-
+  
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
-
+  
   wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
   wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
   wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
   pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
   pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
-
+  
   pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
-
+  
   SetAutoLayout (true);
   SetSizer (pTopSizer);
   pTopSizer->Fit (this);
@@ -114,7 +123,7 @@ DialogGetPhantom::DialogGetPhantom (wxFrame* pParent, int iDefaultPhantom)
 const char*
 DialogGetPhantom::getPhantom(void)
 {
-    return m_pListBoxPhantom->getSelectionStringValue();
+  return m_pListBoxPhantom->getSelectionStringValue();
 }
 
 \r
@@ -123,38 +132,38 @@ DialogGetPhantom::getPhantom(void)
 /////////////////////////////////////////////////////////////////////\r
 
 DialogGetMinMax::DialogGetMinMax (wxFrame* pParent, const char* const pszTitle, double dDefaultMin, double dDefaultMax)
-    : wxDialog (pParent, -1, pszTitle, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
+: wxDialog (pParent, -1, pszTitle, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
 {
   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
-
+  
   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 << dDefaultMin;
   m_pTextCtrlMin = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
   std::ostringstream osMax;
   osMax << dDefaultMax;
   m_pTextCtrlMax = new wxTextCtrl (this, -1, osMax.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-
+  
   wxFlexGridSizer *pGridSizer = new wxFlexGridSizer (2);
   pGridSizer->Add (new wxStaticText (this, -1, "Minimum"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
   pGridSizer->Add (m_pTextCtrlMin, 0, wxALIGN_CENTER_VERTICAL);
   pGridSizer->Add (new wxStaticText (this, -1, "Maximum"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
   pGridSizer->Add (m_pTextCtrlMax, 0, wxALIGN_CENTER_VERTICAL);
   pTopSizer->Add (pGridSizer, 1, wxALL, 10);
-
+  
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
-
+  
   wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
   wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
   wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
   pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
   pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
-
+  
   pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
-
+  
   SetAutoLayout (true);
   SetSizer (pTopSizer);
   pTopSizer->Fit (this);
@@ -168,23 +177,23 @@ DialogGetMinMax::~DialogGetMinMax (void)
 double
 DialogGetMinMax::getMinimum (void)
 {
-    wxString strCtrl = m_pTextCtrlMin->GetValue();
-    double dValue;
-    if (strCtrl.ToDouble (&dValue))
-       return dValue;
-    else
-       return (m_dDefaultMin);
+  wxString strCtrl = m_pTextCtrlMin->GetValue();
+  double dValue;
+  if (strCtrl.ToDouble (&dValue))
+    return dValue;
+  else
+    return (m_dDefaultMin);
 }
 
 double
 DialogGetMinMax::getMaximum (void)
 {
-    wxString strCtrl = m_pTextCtrlMax->GetValue();
-    double dValue;
-    if (strCtrl.ToDouble (&dValue))
-       return dValue;
-    else
-       return (m_dDefaultMax);
+  wxString strCtrl = m_pTextCtrlMax->GetValue();
+  double dValue;
+  if (strCtrl.ToDouble (&dValue))
+    return dValue;
+  else
+    return (m_dDefaultMax);
 }
 
 
@@ -193,23 +202,23 @@ DialogGetMinMax::getMaximum (void)
 /////////////////////////////////////////////////////////////////////\r
 \r
 DialogAutoScaleParameters::DialogAutoScaleParameters (wxFrame *pParent, double mean, double mode, double median, double stddev, double dDefaultScaleFactor)\r
-  : wxDialog (pParent, -1, "Auto Scale Parameters", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION), m_dMean(mean), m_dMode(mode), m_dMedian(median), m_dStdDev(stddev)\r
+: wxDialog (pParent, -1, "Auto Scale Parameters", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION), m_dMean(mean), m_dMode(mode), m_dMedian(median), m_dStdDev(stddev)\r
 {\r
   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);\r
-\r
+  \r
   pTopSizer->Add (new wxStaticText (this, -1, "Auto Scale Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);\r
-                  \r
+  \r
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);\r
-\r
+  \r
   wxString asTitle[3];\r
   asTitle[0] = "Median";\r
   asTitle[1] = "Mode";\r
   asTitle[2] = "Mean";\r
-\r
+  \r
   m_pListBoxCenter = new wxListBox (this, -1, wxDefaultPosition, wxDefaultSize, 3, asTitle, wxLB_SINGLE | wxLB_NEEDED_SB);\r
   m_pListBoxCenter->SetSelection (0);\r
   pTopSizer->Add (m_pListBoxCenter, 0, wxALL | wxALIGN_CENTER | wxEXPAND);\r
-\r
+  \r
   wxGridSizer *pGridSizer = new wxGridSizer (2);\r
   pGridSizer->Add (new wxStaticText (this, -1, "Standard Deviation Factor"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);\r
   std::ostringstream osDefaultFactor;\r
@@ -217,17 +226,17 @@ DialogAutoScaleParameters::DialogAutoScaleParameters (wxFrame *pParent, double m
   m_pTextCtrlStdDevFactor = new wxTextCtrl (this, -1, osDefaultFactor.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);\r
   pGridSizer->Add (m_pTextCtrlStdDevFactor, 0, wxALIGN_CENTER_VERTICAL);\r
   pTopSizer->Add (pGridSizer, 1, wxALL, 10);\r
-\r
+  \r
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);\r
-\r
+  \r
   wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);\r
   wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");\r
   wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");\r
   pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);\r
   pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);\r
-\r
+  \r
   pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);\r
-\r
+  \r
   SetAutoLayout (true);\r
   SetSizer (pTopSizer);\r
   pTopSizer->Fit (this);\r
@@ -248,13 +257,13 @@ DialogAutoScaleParameters::getMinMax (double* pMin, double* pMax)
   double dValue;\r
   if (! sStddevFactor.ToDouble (&dValue)) {\r
     *theApp->getLog() << "Error: Non-numeric Standard Deviation Factor of " << sStddevFactor << "\n";\r
-       return false;\r
+    return false;\r
   }\r
   double dHalfWidth = dValue * m_dStdDev / 2;\r
   *pMin = dCenter - dHalfWidth;\r
   *pMax = dCenter + dHalfWidth;\r
   *theApp->getLog() << "Setting minimum to " << *pMin << " and maximum to " << *pMax << "\n";\r
-\r
+  \r
   return true;\r
 }\r
 \r
@@ -266,7 +275,7 @@ DialogAutoScaleParameters::getAutoScaleFactor ()
   if (! sStddevFactor.ToDouble (&dValue)) {\r
     *theApp->getLog() << "Error: Non-numeric Standard Deviation Factor of " << sStddevFactor << "\n";\r
   }\r
-\r
+  \r
   return dValue;\r
 }\r
 \r
@@ -278,14 +287,14 @@ DialogAutoScaleParameters::getAutoScaleFactor ()
 /////////////////////////////////////////////////////////////////////
 
 DialogGetRasterParameters::DialogGetRasterParameters (wxFrame* pParent, int iDefaultXSize, int iDefaultYSize, int iDefaultNSamples)
-    : wxDialog (pParent, -1, "Set Rasterization Parameters", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
+: wxDialog (pParent, -1, "Set Rasterization Parameters", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
 {
   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
-
+  
   pTopSizer->Add (new wxStaticText (this, -1, "Set Rasterization Parameters"), 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);
@@ -295,7 +304,7 @@ DialogGetRasterParameters::DialogGetRasterParameters (wxFrame* pParent, int iDef
   std::ostringstream osNSamples;
   osNSamples << iDefaultNSamples;
   m_pTextCtrlNSamples = new wxTextCtrl (this, -1, osNSamples.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-
+  
   wxFlexGridSizer *pGridSizer = new wxFlexGridSizer (2);
   pGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
   pGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_CENTER_VERTICAL);
@@ -304,17 +313,17 @@ DialogGetRasterParameters::DialogGetRasterParameters (wxFrame* pParent, int iDef
   pGridSizer->Add (new wxStaticText (this, -1, "Samples per Pixel"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
   pGridSizer->Add (m_pTextCtrlNSamples, 0, wxALIGN_CENTER_VERTICAL);
   pTopSizer->Add (pGridSizer, 1, wxALL, 10);
-
+  
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
-
+  
   wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
   wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
   wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
   pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
   pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
-
+  
   pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
-
+  
   SetAutoLayout (true);
   SetSizer (pTopSizer);
   pTopSizer->Fit (this);
@@ -329,35 +338,35 @@ DialogGetRasterParameters::~DialogGetRasterParameters (void)
 unsigned int
 DialogGetRasterParameters::getXSize (void)
 {
-    wxString strCtrl = m_pTextCtrlXSize->GetValue();
-    unsigned long lValue;
-    if (strCtrl.ToULong (&lValue))
-       return lValue;
-    else
-       return (m_iDefaultXSize);
+  wxString strCtrl = m_pTextCtrlXSize->GetValue();
+  unsigned long lValue;
+  if (strCtrl.ToULong (&lValue))
+    return lValue;
+  else
+    return (m_iDefaultXSize);
 }
 
 unsigned int
 DialogGetRasterParameters::getYSize (void)
 {
-    wxString strCtrl = m_pTextCtrlYSize->GetValue();
-    unsigned long lValue;
-    if (strCtrl.ToULong (&lValue))
-       return lValue;
-    else
-       return (m_iDefaultYSize);
+  wxString strCtrl = m_pTextCtrlYSize->GetValue();
+  unsigned long lValue;
+  if (strCtrl.ToULong (&lValue))
+    return lValue;
+  else
+    return (m_iDefaultYSize);
 }
 
 
 unsigned int
 DialogGetRasterParameters::getNSamples (void)
 {
-    wxString strCtrl = m_pTextCtrlNSamples->GetValue();
-    unsigned long lValue;
-    if (strCtrl.ToULong (&lValue))
-       return lValue;
-    else
-       return (m_iDefaultNSamples);
+  wxString strCtrl = m_pTextCtrlNSamples->GetValue();
+  unsigned long lValue;
+  if (strCtrl.ToULong (&lValue))
+    return lValue;
+  else
+    return (m_iDefaultNSamples);
 }
 
 
@@ -370,10 +379,10 @@ DialogGetRasterParameters::getNSamples (void)
 
 
 DialogGetProjectionParameters::DialogGetProjectionParameters (wxFrame* pParent, int iDefaultNDet, int iDefaultNView, int iDefaultNSamples, double dDefaultRotAngle, double dDefaultFocalLength, double dDefaultFieldOfView, int iDefaultGeometry, int iDefaultTrace)
-  : wxDialog (pParent, -1, "Set Projection Parameters", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
+: wxDialog (pParent, -1, "Set Projection Parameters", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
 {
   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
-
+  
   m_dDefaultRotAngle = dDefaultRotAngle;
   m_dDefaultFocalLength = dDefaultFocalLength;
   m_dDefaultFieldOfView = dDefaultFieldOfView;
@@ -382,11 +391,11 @@ DialogGetProjectionParameters::DialogGetProjectionParameters (wxFrame* pParent,
   m_iDefaultNDet = iDefaultNDet;
   m_iDefaultTrace = iDefaultTrace;
   m_iDefaultGeometry = iDefaultGeometry;
-
+  
   pTopSizer->Add (new wxStaticText (this, -1, "Set Projection Parameters"), 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 << iDefaultNDet;
   m_pTextCtrlNDet = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
@@ -405,14 +414,14 @@ DialogGetProjectionParameters::DialogGetProjectionParameters (wxFrame* pParent,
   std::ostringstream osFieldOfView;
   osFieldOfView << dDefaultFieldOfView;
   m_pTextCtrlFieldOfView = new wxTextCtrl (this, -1, osFieldOfView.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-
+  
   wxFlexGridSizer* pGridSizer = new wxFlexGridSizer (2);
   pGridSizer->Add (new wxStaticText (this, -1, "Scanner Geometry"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
   m_pListBoxGeometry = new StringValueAndTitleListBox (this, Scanner::getGeometryCount(), Scanner::getGeometryTitleArray(), Scanner::getGeometryNameArray());
   m_pListBoxGeometry->SetSelection (iDefaultGeometry);
-
+  
   pGridSizer->Add (m_pListBoxGeometry, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
-
+  
   pGridSizer->Add (new wxStaticText (this, -1, "Detectors"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
   pGridSizer->Add (m_pTextCtrlNDet, 0, wxALIGN_CENTER_VERTICAL);
   pGridSizer->Add (new wxStaticText (this, -1, "Views"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
@@ -425,24 +434,24 @@ DialogGetProjectionParameters::DialogGetProjectionParameters (wxFrame* pParent,
   pGridSizer->Add (m_pTextCtrlFocalLength, 0, wxALIGN_CENTER_VERTICAL);
   pGridSizer->Add (new wxStaticText (this, -1, "Field of View (phantom diameter units)"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
   pGridSizer->Add (m_pTextCtrlFieldOfView, 0, wxALIGN_CENTER_VERTICAL);
-
+  
   m_pListBoxTrace = new StringValueAndTitleListBox (this, Trace::getTraceCount(), Trace::getTraceTitleArray(), Trace::getTraceNameArray());
   m_pListBoxTrace->SetSelection (iDefaultTrace);
-
+  
   pGridSizer->Add (new wxStaticText (this, -1, "Trace Level"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
   pGridSizer->Add (m_pListBoxTrace, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
   pTopSizer->Add (pGridSizer, 1, wxALL, 10);
-
+  
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
-
+  
   wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
   wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
   wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
   pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
   pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
-
+  
   pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
-
+  
   SetAutoLayout (true);
   SetSizer (pTopSizer);
   pTopSizer->Fit (this);
@@ -457,68 +466,68 @@ DialogGetProjectionParameters::~DialogGetProjectionParameters (void)
 unsigned int
 DialogGetProjectionParameters::getNDet (void)
 {
-    wxString strCtrl = m_pTextCtrlNDet->GetValue();
-    unsigned long lValue;
-    if (strCtrl.ToULong (&lValue))
-       return lValue;
-    else
-       return (m_iDefaultNDet);
+  wxString strCtrl = m_pTextCtrlNDet->GetValue();
+  unsigned long lValue;
+  if (strCtrl.ToULong (&lValue))
+    return lValue;
+  else
+    return (m_iDefaultNDet);
 }
 
 unsigned int
 DialogGetProjectionParameters::getNView (void)
 {
-    wxString strCtrl = m_pTextCtrlNView->GetValue();
-    unsigned long lValue;
-    if (strCtrl.ToULong (&lValue))
-       return lValue;
-    else
-       return (m_iDefaultNView);
+  wxString strCtrl = m_pTextCtrlNView->GetValue();
+  unsigned long lValue;
+  if (strCtrl.ToULong (&lValue))
+    return lValue;
+  else
+    return (m_iDefaultNView);
 }
 
 
 unsigned int
 DialogGetProjectionParameters::getNSamples (void)
 {
-    wxString strCtrl = m_pTextCtrlNSamples->GetValue();
-    unsigned long lValue;
-    if (strCtrl.ToULong (&lValue))
-       return lValue;
-    else
-       return (m_iDefaultNSamples);
+  wxString strCtrl = m_pTextCtrlNSamples->GetValue();
+  unsigned long lValue;
+  if (strCtrl.ToULong (&lValue))
+    return lValue;
+  else
+    return (m_iDefaultNSamples);
 }
 
 double
 DialogGetProjectionParameters::getRotAngle (void)
 {
-    wxString strCtrl = m_pTextCtrlRotAngle->GetValue();
-    double dValue;
-    if (strCtrl.ToDouble (&dValue))
-       return (dValue * PI);
-    else
-      return (m_dDefaultRotAngle);
+  wxString strCtrl = m_pTextCtrlRotAngle->GetValue();
+  double dValue;
+  if (strCtrl.ToDouble (&dValue))
+    return (dValue * PI);
+  else
+    return (m_dDefaultRotAngle);
 }
 
 double
 DialogGetProjectionParameters::getFocalLengthRatio (void)
 {
-    wxString strCtrl = m_pTextCtrlFocalLength->GetValue();
-    double dValue;
-    if (strCtrl.ToDouble (&dValue))
-       return (dValue);
-    else
-      return (m_dDefaultFocalLength);
+  wxString strCtrl = m_pTextCtrlFocalLength->GetValue();
+  double dValue;
+  if (strCtrl.ToDouble (&dValue))
+    return (dValue);
+  else
+    return (m_dDefaultFocalLength);
 }
 
 double
 DialogGetProjectionParameters::getFieldOfViewRatio (void)
 {
-    wxString strCtrl = m_pTextCtrlFieldOfView->GetValue();
-    double dValue;
-    if (strCtrl.ToDouble (&dValue))
-       return (dValue);
-    else
-      return (m_dDefaultFieldOfView);
+  wxString strCtrl = m_pTextCtrlFieldOfView->GetValue();
+  double dValue;
+  if (strCtrl.ToDouble (&dValue))
+    return (dValue);
+  else
+    return (m_dDefaultFieldOfView);
 }
 
 const char*
@@ -543,14 +552,14 @@ DialogGetProjectionParameters::getTrace (void)
 
 
 DialogGetReconstructionParameters::DialogGetReconstructionParameters (wxFrame* pParent, int iDefaultXSize, int iDefaultYSize, int iDefaultFilterID, double dDefaultFilterParam,  int iDefaultFilterMethodID, int iDefaultFilterGenerationID, int iDefaultZeropad, int iDefaultInterpID, int iDefaultInterpParam, int iDefaultBackprojectID, int iTrace)
-    : wxDialog (pParent, -1, "Set Reconstruction Parameters", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
+: wxDialog (pParent, -1, "Set Reconstruction Parameters", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
 {
   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
-
+  
   pTopSizer->Add (new wxStaticText (this, -1, "Set Reconstruction Parameters"), 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);
@@ -566,35 +575,35 @@ DialogGetReconstructionParameters::DialogGetReconstructionParameters (wxFrame* p
   std::ostringstream osInterpParam;
   osInterpParam << iDefaultInterpParam;
   m_pTextCtrlInterpParam = new wxTextCtrl (this, -1, osInterpParam.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-
+  
   wxFlexGridSizer* pGridSizer = new wxFlexGridSizer (6);
   pGridSizer->Add (new wxStaticText (this, -1, "Filter"), 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 5);
   m_pListBoxFilter = new StringValueAndTitleListBox (this, SignalFilter::getFilterCount(), SignalFilter::getFilterTitleArray(), SignalFilter::getFilterNameArray());
   m_pListBoxFilter->SetSelection (iDefaultFilterID);
   pGridSizer->Add (m_pListBoxFilter, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
-
+  
   m_pListBoxFilterMethod = new StringValueAndTitleListBox (this, ProcessSignal::getFilterMethodCount(), ProcessSignal::getFilterMethodTitleArray(), ProcessSignal::getFilterMethodNameArray());
   m_pListBoxFilterMethod->SetSelection (iDefaultFilterMethodID);
   pGridSizer->Add (new wxStaticText (this, -1, "Filter Method"), 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 5);
   pGridSizer->Add (m_pListBoxFilterMethod, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
-
+  
   m_pListBoxFilterGeneration = new StringValueAndTitleListBox (this, ProcessSignal::getFilterGenerationCount(), ProcessSignal::getFilterGenerationTitleArray(), ProcessSignal::getFilterGenerationNameArray());
   m_pListBoxFilterGeneration->SetSelection (iDefaultFilterGenerationID);
   pGridSizer->Add (new wxStaticText (this, -1, "Filter Generation"), 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 5);
   pGridSizer->Add (m_pListBoxFilterGeneration, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
-\r
+  \r
   
   m_pListBoxBackproject = new StringValueAndTitleListBox (this, Backprojector::getBackprojectCount(), Backprojector::getBackprojectTitleArray(), Backprojector::getBackprojectNameArray());
   m_pListBoxBackproject->SetSelection (iDefaultBackprojectID);
   pGridSizer->Add (new wxStaticText (this, -1, "Backprojection"), 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 5);
   pGridSizer->Add (m_pListBoxBackproject, 0, wxALL | wxALIGN_RIGHT | wxEXPAND);
-
+  
   m_pListBoxInterp = new StringValueAndTitleListBox (this, Backprojector::getInterpCount(), Backprojector::getInterpTitleArray(), Backprojector::getInterpNameArray());
   m_pListBoxInterp->SetSelection (iDefaultInterpID);
   pGridSizer->Add (new wxStaticText (this, -1, "Interpolation"), 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 5);
   pGridSizer->Add (m_pListBoxInterp, 0, wxALL | wxALIGN_RIGHT | wxEXPAND);
-
-
+  
+  
   pGridSizer->Add (new wxStaticText (this, -1, "Trace Level"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);\r
   static const char* aszTraceTitle[] = {"None", "Full"};\r
   static const char* aszTraceName[] = {"none", "full"};\r
@@ -602,7 +611,7 @@ DialogGetReconstructionParameters::DialogGetReconstructionParameters (wxFrame* p
   iTrace = clamp(iTrace, 0, 1);\r
   m_pListBoxTrace->SetSelection (iTrace);\r
   pGridSizer->Add (m_pListBoxTrace);\r
-\r
+  \r
   pGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
   pGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
   pGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
@@ -613,19 +622,19 @@ DialogGetReconstructionParameters::DialogGetReconstructionParameters (wxFrame* p
   pGridSizer->Add (m_pTextCtrlZeropad, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
   pGridSizer->Add (new wxStaticText (this, -1, "Interpolation Parameter"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
   pGridSizer->Add (m_pTextCtrlInterpParam, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
-
+  
   pTopSizer->Add (pGridSizer, 1, wxALL, 3);
-
+  
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
-
+  
   wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
   wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
   wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
   pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
   pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
-
+  
   pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
-
+  
   SetAutoLayout (true);
   SetSizer (pTopSizer);
   pTopSizer->Layout();
@@ -641,57 +650,57 @@ DialogGetReconstructionParameters::~DialogGetReconstructionParameters (void)
 unsigned int
 DialogGetReconstructionParameters::getXSize (void)
 {
-    wxString strCtrl = m_pTextCtrlXSize->GetValue();
-    unsigned long lValue;
-    if (strCtrl.ToULong (&lValue))
-       return lValue;
-    else
-       return (m_iDefaultXSize);
+  wxString strCtrl = m_pTextCtrlXSize->GetValue();
+  unsigned long lValue;
+  if (strCtrl.ToULong (&lValue))
+    return lValue;
+  else
+    return (m_iDefaultXSize);
 }
 
 unsigned int
 DialogGetReconstructionParameters::getYSize (void)
 {
-    wxString strCtrl = m_pTextCtrlYSize->GetValue();
-    unsigned long lValue;
-    if (strCtrl.ToULong (&lValue))
-       return lValue;
-    else
-       return (m_iDefaultYSize);
+  wxString strCtrl = m_pTextCtrlYSize->GetValue();
+  unsigned long lValue;
+  if (strCtrl.ToULong (&lValue))
+    return lValue;
+  else
+    return (m_iDefaultYSize);
 }
 
 unsigned int
 DialogGetReconstructionParameters::getZeropad (void)
 {
-    wxString strCtrl = m_pTextCtrlZeropad->GetValue();
-    unsigned long lValue;
-    if (strCtrl.ToULong (&lValue))
-       return lValue;
-    else
-       return (m_iDefaultZeropad);
+  wxString strCtrl = m_pTextCtrlZeropad->GetValue();
+  unsigned long lValue;
+  if (strCtrl.ToULong (&lValue))
+    return lValue;
+  else
+    return (m_iDefaultZeropad);
 }
 
 
 unsigned int
 DialogGetReconstructionParameters::getInterpParam (void)
 {
-    wxString strCtrl = m_pTextCtrlInterpParam->GetValue();
-    unsigned long lValue;
-    if (strCtrl.ToULong (&lValue))
-       return lValue;
-    else
-       return (m_iDefaultInterpParam);
+  wxString strCtrl = m_pTextCtrlInterpParam->GetValue();
+  unsigned long lValue;
+  if (strCtrl.ToULong (&lValue))
+    return lValue;
+  else
+    return (m_iDefaultInterpParam);
 }
 
 double
 DialogGetReconstructionParameters::getFilterParam (void)
 {
-    wxString strCtrl = m_pTextCtrlFilterParam->GetValue();
-    double dValue;
-    if (strCtrl.ToDouble (&dValue))
-       return (dValue);
-    else
-      return (m_dDefaultFilterParam);
+  wxString strCtrl = m_pTextCtrlFilterParam->GetValue();
+  double dValue;
+  if (strCtrl.ToDouble (&dValue))
+    return (dValue);
+  else
+    return (m_dDefaultFilterParam);
 }
 
 const char*
@@ -717,7 +726,7 @@ DialogGetReconstructionParameters::getTrace (void)
 {
   int iTrace = 0;
   if (strcmp("full", m_pListBoxTrace->getSelectionStringValue()) == 0)
-      iTrace = Trace::TRACE_PLOT;
+    iTrace = Trace::TRACE_PLOT;
   return iTrace;
 }
 
index b14fa78b42d8971f119708fa8bae39c471cc0be0..c4c66473ec7f82ca12cdd1e7a5cb5b503a8c0475 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: dialogs.h,v 1.14 2000/12/20 20:08:48 kevin Exp $
+**  $Id: dialogs.h,v 1.15 2000/12/21 03:40:58 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
@@ -35,7 +35,8 @@
 #include "scanner.h"
 #include "phantom.h"
 #include "procsignal.h"
-#include "filter.h"
+#include "filter.h"\r
+
 
 // CLASS StringValueAndTitleListBox
 //
@@ -65,6 +66,7 @@ class DialogGetPhantom : public wxDialog
  private:
     StringValueAndTitleListBox* m_pListBoxPhantom;
 };
+\r
 
 
 class ImageFile;
index 04adab9fba869a643254e697eae5e55609690544..68b03759361524e097517c4725b87ba3d5c27741 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: views.cpp,v 1.34 2000/12/20 20:08:48 kevin Exp $
+**  $Id: views.cpp,v 1.35 2000/12/21 03:40:58 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
@@ -165,7 +165,8 @@ BEGIN_EVENT_TABLE(ImageFileView, wxView)
 EVT_MENU(IFMENU_FILE_PROPERTIES, ImageFileView::OnProperties)
 EVT_MENU(IFMENU_VIEW_SCALE_MINMAX, ImageFileView::OnScaleMinMax)
 EVT_MENU(IFMENU_VIEW_SCALE_AUTO, ImageFileView::OnScaleAuto)\r
-EVT_MENU(IFMENU_PLOT_ROW, ImageFileView::OnPlotRow)
+EVT_MENU(IFMENU_COMPARE_IMAGES, ImageFileView::OnCompare)\r
+EVT_MENU(IFMENU_PLOT_ROW, ImageFileView::OnPlotRow)\r
 EVT_MENU(IFMENU_PLOT_COL, ImageFileView::OnPlotCol)\r
 END_EVENT_TABLE()
 
@@ -240,7 +241,31 @@ ImageFileView::OnScaleMinMax (wxCommandEvent& event)
                OnUpdate (this, NULL);
     }
 }
-
+\r
+void\r
+ImageFileView::OnCompare (wxCommandEvent& event)\r
+{\r
+  wxList& rListDocs = theApp->getDocManager()->GetDocuments();\r
+  std::vector<ImageFileDocument*> vecIF;\r
+  std::vector<std::string> vecFilename;\r
+  int nCompares = 0;\r
+  for (wxNode* pNode = rListDocs.GetFirst(); pNode != NULL; pNode = pNode->GetNext()) {\r
+    wxDocument* pDoc = reinterpret_cast<wxDocument*>(pNode->GetData());\r
+       ImageFileDocument* pIFDoc = dynamic_cast<ImageFileDocument*>(pDoc);\r
+       if (pIFDoc) {\r
+               if (pIFDoc->GetFirstView() != this) {\r
+                       std::string strFilename = pDoc->GetFilename();\r
+                       vecIF.push_back (pIFDoc);\r
+                       vecFilename.push_back (strFilename);\r
+                       nCompares++;\r
+               }\r
+       }\r
+  }\r
+  for (int i = 0; i < nCompares; i++) {\r
+         const std::string& s = vecFilename[i];\r
+         *theApp->getLog() << s.c_str() << "\n";\r
+  }\r
+}
 
 ImageFileCanvas* 
 ImageFileView::CreateCanvas (wxView *view, wxFrame *parent)
@@ -287,6 +312,9 @@ ImageFileView::CreateChildFrame(wxDocument *doc, wxView *view)
        plot_menu->Append (IFMENU_PLOT_ROW, "Plot &Row");\r
        plot_menu->Append (IFMENU_PLOT_COL, "Plot &Column");\r
        
+       wxMenu *compare_menu = new wxMenu;\r
+       compare_menu->Append (IFMENU_COMPARE_IMAGES, "&Compare Images");\r
+\r
     wxMenu *help_menu = new wxMenu;
     help_menu->Append(MAINMENU_HELP_ABOUT, "&About");
     
@@ -294,7 +322,8 @@ ImageFileView::CreateChildFrame(wxDocument *doc, wxView *view)
     
     menu_bar->Append(file_menu, "&File");
     menu_bar->Append(view_menu, "&View");\r
-       menu_bar->Append(plot_menu, "&Plot");
+       menu_bar->Append(plot_menu, "&Plot");\r
+       menu_bar->Append(compare_menu, "&Compare");
     menu_bar->Append(help_menu, "&Help");
     
     subframe->SetMenuBar(menu_bar);
@@ -1168,7 +1197,7 @@ EVT_MENU(PLOTMENU_VIEW_SCALE_AUTO, PlotFileView::OnScaleAuto)
 END_EVENT_TABLE()
 
 PlotFileView::PlotFileView(void) 
-: wxView(), m_canvas(NULL), m_frame(NULL), m_bMinSpecified(false), m_bMaxSpecified(false)
+: wxView(), m_canvas(NULL), m_frame(NULL)
 {
 }
 
@@ -1304,6 +1333,10 @@ PlotFileView::OnCreate(wxDocument *doc, long WXUNUSED(flags) )
     m_frame = CreateChildFrame(doc, this);
     SetFrame(m_frame);
     
+       m_bMinSpecified = false;\r
+       m_bMaxSpecified = false;\r
+    m_dAutoScaleFactor = 1.;\r
+\r
     int width, height;
     m_frame->GetClientSize(&width, &height);
     m_frame->SetTitle ("Plot File");
index 12daabd16241041937b6bd27769586d0cf0ac2cc..d06ffa38f4fedf3dc7c61a9a3024e876d340ee8a 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: views.h,v 1.14 2000/12/20 20:08:48 kevin Exp $
+**  $Id: views.h,v 1.15 2000/12/21 03:40:58 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
@@ -65,6 +65,7 @@ public:
     void OnUpdate(wxView *sender, wxObject *hint = NULL);
     bool OnClose (bool deleteWindow = true);
     void OnProperties (wxCommandEvent& event);
+    void OnCompare (wxCommandEvent& event);\r
     void OnScaleAuto (wxCommandEvent& event);
     void OnScaleMinMax (wxCommandEvent& event);
        void OnPlotRow (wxCommandEvent& event);\r