r618: *** empty log message ***
[ctsim.git] / src / views.cpp
index 13774796c6d2206876a141250ae99c566dbb8ac6..54a12b8d764ea05f6d96d71015de8215fe3283cb 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: views.cpp,v 1.126 2001/03/04 22:30:20 kevin Exp $
+**  $Id: views.cpp,v 1.129 2001/03/07 22:30:16 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
@@ -1095,6 +1095,12 @@ ImageFileView::OnExport (wxCommandEvent& event)
         strExt = ".png";
         strWildcard = "PNG Files (*.png)|*.png";
       }
+#endif
+#ifdef HAVE_CTN_DICOM
+      else if (m_iDefaultExportFormatID == ImageFile::EXPORT_FORMAT_DICOM) {
+        strExt = "";
+        strWildcard = "DICOM Files (*.*)|*.*";
+      }
 #endif
       else {
         strExt = "";
@@ -1408,7 +1414,7 @@ ImageFileView::OnPlotFFTRow (wxCommandEvent& event)
       rPlotFile.addColumn (1, pYReal);
       rPlotFile.addColumn (2, pYImag);
       rPlotFile.addColumn (3, pYMag);
-      for (int iL = 0; iL < rIF.nLabels(); iL++)
+      for (unsigned int iL = 0; iL < rIF.nLabels(); iL++)
         rPlotFile.addDescription (rIF.labelGet(iL).getLabelString().c_str());
       os << " FFT Plot of " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
       *theApp->getLog() << os.str().c_str() << "\n";
@@ -1508,7 +1514,7 @@ ImageFileView::OnPlotFFTCol (wxCommandEvent& event)
       rPlotFile.addColumn (1, pYReal);
       rPlotFile.addColumn (2, pYImag);
       rPlotFile.addColumn (3, pYMag);
-      for (int iL = 0; iL < rIF.nLabels(); iL++)
+      for (unsigned int iL = 0; iL < rIF.nLabels(); iL++)
         rPlotFile.addDescription (rIF.labelGet(iL).getLabelString().c_str());
       os << " FFT Plot of " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
       *theApp->getLog() << os.str().c_str() << "\n";
@@ -1949,7 +1955,7 @@ PhantomFileView::OnProjections (wxCommandEvent& event)
     }
   } else {
 #if HAVE_WXTHREADS
-    if (theApp->getUseBackgroundTasks() || theApp->getNumberCPU() > 1) {
+    if (theApp->getUseBackgroundTasks()) {
       ProjectorSupervisorThread* pProjector = new ProjectorSupervisorThread (this, m_iDefaultNDet,
         m_iDefaultNView, sGeometry.c_str(), m_iDefaultNSample, dRotationRadians,
         m_dDefaultFocalLength, m_dDefaultCenterDetectorLength, m_dDefaultViewRatio, m_dDefaultScanRatio, os.str().c_str());
@@ -2032,7 +2038,7 @@ PhantomFileView::OnRasterize (wxCommandEvent& event)
     << m_iDefaultRasterNSamples;;
 
 #if HAVE_WXTHREADS
-  if (theApp->getUseBackgroundTasks() || theApp->getNumberCPU() > 1) {
+  if (theApp->getUseBackgroundTasks()) {
     RasterizerSupervisorThread* pThread = new RasterizerSupervisorThread (this, m_iDefaultRasterNX, m_iDefaultRasterNY,
       m_iDefaultRasterNSamples, m_dDefaultRasterViewRatio, os.str().c_str());
     if (pThread->Create() != wxTHREAD_NO_ERROR) {
@@ -2472,7 +2478,7 @@ ProjectionFileView::OnReconstructFBP (wxCommandEvent& event)
     delete pReconstructor;
   } else {
 #if HAVE_WXTHREADS
-    if (theApp->getUseBackgroundTasks() || theApp->getNumberCPU() > 1) {
+    if (theApp->getUseBackgroundTasks()) {
       ReconstructorSupervisorThread* pReconstructor = new ReconstructorSupervisorThread (this, 
         m_iDefaultNX, m_iDefaultNY, optFilterName.c_str(), 
         m_dDefaultFilterParam, optFilterMethodName.c_str(), m_iDefaultZeropad, optFilterGenerationName.c_str(),