Used by CTSim (src/*) graphic front-end. Platform independent for
GTK, Motif, and Windows32 API's.
-g2 (http://g2.sourceforge.net)
- Currently, used partially by SGP (Simple Graphics Package) for
- graphical display by command-line tools (tools/*). This library
- will likely be deprecated in favor of wxWindows.
+ctn (http://www.erl.wustl.edu/DICOM/ctn.html)
+ Used by CTSim for DICOM file import and export
lam (http://www.mpi.nd.edu/lam/)
There is support is MPI clustering. I use this code at home for my
Used for debugging memory allocation.\\
\urlref{Web site}{http://www.dmalloc.com}
+ \item \textbf{ctn}\\
+ DICOM library used to support import/export of DICOM files
+ \urlref{Web site}{http://www.erl.wustl.edu/DICOM/ctn.html}
+
\end{itemize}
1
ctsim.tex
21
+4
3
-1
ctsim-algorithms.tex
4091 0 65 52 0 43 44 44 960 631
ctsim-concepts.tex
TeX
-268447738 0 302 40 280 44 110 110 1187 697
+12282 0 302 40 280 44 110 110 1187 697
ctsim.tex
TeX
-134230010 2 50 12 50 22 22 22 1099 609
+134230010 0 50 12 33 1 22 22 1099 609
+ctsim-install.tex
+TeX
+268447738 0 70 62 71 1 110 110 1187 697
tex2rtf.ini
DATA
273777330 0 0 1 26 8 22 22 938 609
ctsim-gui.tex
TeX
268447738 0 145 21 144 1 176 176 1253 763
-ctsim-install.tex
-TeX
-268447738 1 0 1 4 1 110 110 1187 697
psbox.tex
TeX
268439546 0 0 1 0 1 88 88 1004 675
<pre>
<h1>Build Log</h1>
<h3>
---------------------Configuration: libctsim - Win32 Debug--------------------
+--------------------Configuration: ctsim - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPB5.tmp" with contents
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPA9D.tmp" with contents
[
-/nologo /G6 /MTd /W3 /Gm /Gi /GR /GX /Zi /Od /Gy /I "..\..\..\wx2.2.5\src\png" /I "..\..\..\wx2.2.5\src\zlib" /I "..\..\INCLUDE" /I "..\..\getopt" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /I "..\..\..\wx2.2.5\include" /I "\dicom\ctn\include" /D "_DEBUG" /D "HAVE_WXWIN" /D "HAVE_STRING_H" /D "HAVE_GETOPT_H" /D "WIN32" /D "_MBCS" /D "_LIB" /D "MSVC" /D "HAVE_FFTW" /D "HAVE_PNG" /D "HAVE_SGP" /D "HAVE_WXWINDOWS" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "HAVE_CTN_DICOM" /FR"Debug/" /Fp"Debug/libctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
-"C:\ctsim\libctsim\ctndicom.cpp"
-"C:\ctsim\libctsim\projections.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" /I "\dicom\ctn\include" /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.1.0\" /D "HAVE_CTN_DICOM" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
+"D:\ctsim\src\backgroundmgr.cpp"
+"D:\ctsim\src\backgroundsupr.cpp"
+"D:\ctsim\src\graph3dview.cpp"
+"D:\ctsim\src\threadproj.cpp"
+"D:\ctsim\src\threadraster.cpp"
+"D:\ctsim\src\threadrecon.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPB5.tmp"
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPB6.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPA9D.tmp"
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPA9E.tmp" with contents
[
-/nologo /out:"Debug\libctsim.lib"
-.\Debug\array2dfile.obj
-.\Debug\backprojectors.obj
-.\Debug\clip.obj
-.\Debug\consoleio.obj
-.\Debug\ctndicom.obj
-.\Debug\dlgezplot.obj
-.\Debug\ezplot.obj
-.\Debug\ezset.obj
-.\Debug\ezsupport.obj
-.\Debug\filter.obj
-.\Debug\fnetorderstream.obj
-.\Debug\fourier.obj
-.\Debug\getopt.obj
-.\Debug\getopt1.obj
-.\Debug\globalvars.obj
-.\Debug\hashtable.obj
-.\Debug\imagefile.obj
-.\Debug\interpolator.obj
-.\Debug\mathfuncs.obj
-.\Debug\phantom.obj
-.\Debug\plotfile.obj
-.\Debug\pol.obj
-.\Debug\procsignal.obj
-.\Debug\projections.obj
-.\Debug\reconstruct.obj
-.\Debug\scanner.obj
-.\Debug\sgp.obj
-.\Debug\strfuncs.obj
-.\Debug\syserror.obj
-.\Debug\trace.obj
-.\Debug\transformmatrix.obj
-.\Debug\xform.obj
+/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" /I "\dicom\ctn\include" /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.1.0\" /D "HAVE_CTN_DICOM" /D CTSIMVERSION=\"3.0.0alpha5\" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
+"D:\ctsim\src\ctsim.cpp"
+"D:\ctsim\src\dialogs.cpp"
+"D:\ctsim\src\docs.cpp"
+"D:\ctsim\src\views.cpp"
]
-Creating command line "link.exe -lib @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPB6.tmp"
-<h3>Output Window</h3>
-Compiling...
-ctndicom.cpp
-projections.cpp
-Creating library...
-<h3>
---------------------Configuration: ctsim - Win32 Debug--------------------
-</h3>
-<h3>Command Lines</h3>
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPB7.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPA9E.tmp"
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPA9F.tmp" with contents
[
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 ctn_lib.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/ctsim.pdb" /debug /machine:I386 /out:"Debug/ctsim.exe" /pdbtype:sept /libpath:"\wx2.2.5\lib" /libpath:"\dicom\ctn\winctn\ctn_lib\Debug"
.\Debug\backgroundmgr.obj
\wx2.2.5\lib\zlibd.lib
\wx2.2.5\lib\tiffd.lib
]
-Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPB7.tmp"
+Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPA9F.tmp"
<h3>Output Window</h3>
+Compiling...
+backgroundsupr.cpp
+threadproj.cpp
+threadraster.cpp
+threadrecon.cpp
+backgroundmgr.cpp
+graph3dview.cpp
+Compiling...
+ctsim.cpp
+dialogs.cpp
+docs.cpp
+views.cpp
Linking...
** This is part of the CTSim program
** Copyright (C) 1983-2001 Kevin Rosenberg
**
-** $Id: backgroundsupr.cpp,v 1.9 2001/02/27 03:59:30 kevin Exp $
+** $Id: backgroundsupr.cpp,v 1.10 2001/03/02 21:11:50 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
#include "backgroundsupr.h"
#include "backgroundmgr.h"
-#if defined(HAVE_CONFIG_H)
-#include "config.h"
-#endif
-
+#ifdef HAVE_WXTHREADS
////////////////////////////////////////////////////////////////////////////
//
BackgroundSupervisor::BackgroundSupervisor (SupervisorThread* pMyThread, wxFrame* pParentFrame, wxDocument* pDocument, const char* const pszProcessTitle, int iTotalUnits)
- : m_pMyThread(pMyThread), m_pParentFrame(pParentFrame), m_pDocument(pDocument), m_pDialogProgress(NULL), m_strProcessTitle(pszProcessTitle),
+ : m_pMyThread(pMyThread), m_pParentFrame(pParentFrame), m_pDocument(pDocument), m_strProcessTitle(pszProcessTitle),
m_iTotalUnits(iTotalUnits), m_iNumThreads(0), m_bDone(false), m_bFail(false), m_bCancelled(false),
m_pTimer(NULL), m_bBackgroundTaskAdded(false), m_bWorkersDeleted(false),
wxEvtHandler()
}
delete m_pTimer;
- delete m_pDialogProgress;
}
void
m_pTimer = new Timer;
- if (! theApp->getUseBackgroundTasks())
- m_pDialogProgress = new wxProgressDialog (_T("Filtered Backprojection"), _T("Reconstruction Progress"),
- m_iTotalUnits, m_pParentFrame, wxPD_CAN_ABORT | wxPD_AUTO_HIDE);
- else {
- std::string strLabel (m_strProcessTitle);
- strLabel += " ";
- strLabel += m_pParentFrame->GetTitle();
- wxCommandEvent addTaskEvent (wxEVT_COMMAND_MENU_SELECTED, MSG_BACKGROUND_SUPERVISOR_ADD);
- addTaskEvent.SetString (strLabel.c_str());
- addTaskEvent.SetInt (m_iTotalUnits);
- addTaskEvent.SetClientData (this);
- wxPostEvent (theApp->getBackgroundManager(), addTaskEvent);
- wxPostEvent (m_pDocument, addTaskEvent);
- m_bBackgroundTaskAdded = true;
- }
+ std::string strLabel (m_strProcessTitle);
+ strLabel += " ";
+ strLabel += m_pParentFrame->GetTitle();
+ wxCommandEvent addTaskEvent (wxEVT_COMMAND_MENU_SELECTED, MSG_BACKGROUND_SUPERVISOR_ADD);
+ addTaskEvent.SetString (strLabel.c_str());
+ addTaskEvent.SetInt (m_iTotalUnits);
+ addTaskEvent.SetClientData (this);
+ wxPostEvent (theApp->getBackgroundManager(), addTaskEvent);
+ wxPostEvent (m_pDocument, addTaskEvent);
+ m_bBackgroundTaskAdded = true;
m_iRunning = m_iNumThreads;
m_iUnitsDone = 0;
*theApp->getLog() << "Units done: " << static_cast<int>(m_iUnitsDone) <<"\n";
#endif
- if (m_pDialogProgress) {
- if (! m_pDialogProgress->Update (m_iUnitsDone - 1)) {
- wxCommandEvent dummy;
- OnCancel (dummy);
- }
- } else {
- wxCommandEvent addTaskEvent (wxEVT_COMMAND_MENU_SELECTED, MSG_BACKGROUND_SUPERVISOR_UNIT_TICK);
- addTaskEvent.SetInt (m_iUnitsDone - 1);
- addTaskEvent.SetClientData (this);
- wxPostEvent (theApp->getBackgroundManager(), addTaskEvent);
- }
+ wxCommandEvent addTaskEvent (wxEVT_COMMAND_MENU_SELECTED, MSG_BACKGROUND_SUPERVISOR_UNIT_TICK);
+ addTaskEvent.SetInt (m_iUnitsDone - 1);
+ addTaskEvent.SetClientData (this);
+ wxPostEvent (theApp->getBackgroundManager(), addTaskEvent);
}
void
OnCancel(dummy);
}
+#endif // HAVE_WXTHREADS
** This is part of the CTSim program
** Copyright (C) 1983-2001 Kevin Rosenberg
**
-** $Id: backgroundsupr.h,v 1.5 2001/02/26 17:36:56 kevin Exp $
+** $Id: backgroundsupr.h,v 1.6 2001/03/02 21:11:50 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
wxFrame* m_pParentFrame;
wxDocument* m_pDocument;
const std::string m_strProcessTitle;
- wxProgressDialog* m_pDialogProgress;
-
+
volatile bool m_bFail;
std::string m_strFailMessage;
int m_iNumThreads;
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: ctsim.cpp,v 1.91 2001/03/02 02:08:14 kevin Exp $
+** $Id: ctsim.cpp,v 1.92 2001/03/02 21:11:50 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
#endif
-static const char* rcsindent = "$Id: ctsim.cpp,v 1.91 2001/03/02 02:08:14 kevin Exp $";
+static const char* rcsindent = "$Id: ctsim.cpp,v 1.92 2001/03/02 21:11:50 kevin Exp $";
struct option CTSimApp::ctsimOptions[] =
{
m_dDefaultFilterOutputScale = 1.;
m_iDefaultImportFormat = ImageFile::IMPORT_FORMAT_PPM;
- wxAcceleratorEntry accelEntries[16];
+ wxAcceleratorEntry accelEntries[15];
accelEntries[0].Set (wxACCEL_CTRL, static_cast<int>('O'), wxID_OPEN);
- accelEntries[2].Set (wxACCEL_CTRL, static_cast<int>('P'), MAINMENU_FILE_CREATE_PHANTOM);
- accelEntries[3].Set (wxACCEL_CTRL, static_cast<int>('F'), MAINMENU_FILE_CREATE_FILTER);
- accelEntries[4].Set (wxACCEL_CTRL, static_cast<int>('I'), MAINMENU_IMPORT);
- accelEntries[5].Set (wxACCEL_NORMAL, WXK_F1, MAINMENU_HELP_CONTENTS);
+ accelEntries[1].Set (wxACCEL_CTRL, static_cast<int>('P'), MAINMENU_FILE_CREATE_PHANTOM);
+ accelEntries[2].Set (wxACCEL_CTRL, static_cast<int>('F'), MAINMENU_FILE_CREATE_FILTER);
+ accelEntries[3].Set (wxACCEL_CTRL, static_cast<int>('I'), MAINMENU_IMPORT);
+ accelEntries[4].Set (wxACCEL_NORMAL, WXK_F1, MAINMENU_HELP_CONTENTS);
#ifndef CTSIM_MDI
for (i = 0; i < 10; i++)
accelEntries[i+5].Set (wxACCEL_CTRL, static_cast<int>('0'+i), MAINMENU_WINDOW_BASE+i);
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: ctsim.h,v 1.53 2001/03/01 20:02:18 kevin Exp $
+** $Id: ctsim.h,v 1.54 2001/03/02 21:11:50 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
#include <dmalloc.h>
#endif
+#ifdef MSVC
+#define HAVE_WXTHREADS 1
+#else
+#undef HAVE_WXTHREADS
+#endif
+
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: dialogs.cpp,v 1.45 2001/03/01 20:02:18 kevin Exp $
+** $Id: dialogs.cpp,v 1.46 2001/03/02 21:11:50 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
m_pCBUseBackgroundTasks = new wxCheckBox (this, -1, "Put Tasks in Background", wxDefaultPosition, wxSize(250, 25), 0);
m_pCBUseBackgroundTasks->SetValue (bUseBackgroundTasks);
+#ifdef HAVE_WXTHREADS
pTopSizer->Add (m_pCBUseBackgroundTasks, 0, wxALIGN_CENTER_VERTICAL);
+#endif
pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
** This is part of the CTSim program
** Copyright (C) 1983-2001 Kevin Rosenberg
**
-** $Id: threadproj.cpp,v 1.6 2001/03/01 07:30:49 kevin Exp $
+** $Id: threadproj.cpp,v 1.7 2001/03/02 21:11:50 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
#include "wx/wx.h"
#endif
+#if defined(HAVE_CONFIG_H)
+#include "config.h"
+#endif
+
#include "ct.h"
#include "ctsim.h"
#include "docs.h"
#include "backgroundmgr.h"
#include "backgroundsupr.h"
-#if defined(HAVE_CONFIG_H)
-#include "config.h"
-#endif
+#ifdef HAVE_WXTHREADS
+
wxCriticalSection doneSection;
wxCriticalSectionLocker critsect (doneSection);
+ Projections* pProjections = getProjections();
+
+ wxMutexGuiEnter();
ProjectionFileDocument* pProjDoc = theApp->newProjectionDoc();
if (! pProjDoc) {
sys_error (ERR_SEVERE, "Unable to create projection file");
return;
- }
-
- Projections* pProjections = getProjections();
+ }
pProjDoc->setProjections (pProjections);
- if (theApp->getAskDeleteNewDocs())
- pProjDoc->Modify (true);
pProjDoc->UpdateAllViews (NULL);
if (ProjectionFileView* projView = pProjDoc->getView()) {
projView->OnUpdate (projView, NULL);
projView->getFrame()->Show(true);
}
*theApp->getLog() << m_pszLabel << "\n";
+ wxMutexGuiLeave();
+
+ if (theApp->getAskDeleteNewDocs())
+ pProjDoc->Modify (true);
pProjections->setRemark (m_pszLabel);
pProjections->setCalcTime (getTimerEnd());
ProjectorWorker::OnExit ()
{
}
+
+#endif // HAVE_WXTHREADS
** This is part of the CTSim program
** Copyright (C) 1983-2001 Kevin Rosenberg
**
-** $Id: threadproj.h,v 1.4 2001/03/01 07:30:49 kevin Exp $
+** $Id: threadproj.h,v 1.5 2001/03/02 21:11:50 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
#ifndef _THREADPROJ_H
#define _THREADPROJ_H
+#ifdef HAVE_WXTHREADS
+
#include <vector>
#include <wx/thread.h>
#include <wx/progdlg.h>
};
-#endif
+#endif // HAVE_WXTHREADS
+#endif // _THREADPROJ_H_
** This is part of the CTSim program
** Copyright (C) 1983-2001 Kevin Rosenberg
**
-** $Id: threadraster.cpp,v 1.1 2001/02/27 03:59:30 kevin Exp $
+** $Id: threadraster.cpp,v 1.2 2001/03/02 21:11:50 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
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
******************************************************************************/
+
+#if defined(HAVE_CONFIG_H)
+#include "config.h"
+#endif
+
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "ctsim.h"
#include "docs.h"
#include "views.h"
+
+
+#ifdef HAVE_WXTHREADS
+
+
#include "threadraster.h"
#include "backgroundmgr.h"
#include "backgroundsupr.h"
-#if defined(HAVE_CONFIG_H)
-#include "config.h"
-#endif
-
-
/////////////////////////////////////////////////////////////////////
//
wxCriticalSection doneSection;
wxCriticalSectionLocker critsect (doneSection);
+ ImageFile* pImageFile = getImageFile();
+
+ wxMutexGuiEnter();
ImageFileDocument* pImageDoc = theApp->newImageDoc();
if (! pImageDoc) {
sys_error (ERR_SEVERE, "Unable to create image file");
return;
- }
-
- ImageFile* pImageFile = getImageFile();
+ }
pImageDoc->setImageFile (pImageFile);
- if (theApp->getAskDeleteNewDocs())
- pImageDoc->Modify (true);
pImageDoc->UpdateAllViews (NULL);
if (ImageFileView* imageView = pImageDoc->getView()) {
imageView->OnUpdate (imageView, NULL);
imageView->getFrame()->Show(true);
}
*theApp->getLog() << m_pszLabel << "\n";
+ wxMutexGuiLeave();
pImageFile->labelAdd (m_pszLabel, getTimerEnd());
+ if (theApp->getAskDeleteNewDocs())
+ pImageDoc->Modify (true);
setDone();
}
RasterizerWorker::OnExit ()
{
}
+
+#endif // HAVE_WXTHREADS
** This is part of the CTSim program
** Copyright (C) 1983-2001 Kevin Rosenberg
**
-** $Id: threadraster.h,v 1.1 2001/02/27 03:59:30 kevin Exp $
+** $Id: threadraster.h,v 1.2 2001/03/02 21:11:50 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
#ifndef _THREADRASTER_H
#define _THREADRASTER_H
+#ifdef HAVE_WXTHREADS
+
#include <vector>
#include <wx/thread.h>
#include <wx/progdlg.h>
virtual void OnExit();
};
-
-#endif
+#endif // HAVE_WXTHREADS
+#endif // _THREADRASTER_H_
** This is part of the CTSim program
** Copyright (C) 1983-2001 Kevin Rosenberg
**
-** $Id: threadrecon.cpp,v 1.14 2001/02/27 03:59:30 kevin Exp $
+** $Id: threadrecon.cpp,v 1.15 2001/03/02 21:11:50 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
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
******************************************************************************/
+
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "backgroundmgr.h"
#include "backgroundsupr.h"
-#if defined(HAVE_CONFIG_H)
-#include "config.h"
-#endif
+#ifdef HAVE_WXTHREADS
+
wxCriticalSection doneSection;
wxCriticalSectionLocker critsect (doneSection);
+ ImageFile* pImageFile = getImageFile();
+
+ wxMutexGuiEnter();
ImageFileDocument* pReconDoc = theApp->newImageDoc();
if (! pReconDoc) {
sys_error (ERR_SEVERE, "Unable to create image file");
return;
- }
-
- ImageFile* pImageFile = getImageFile();
+ }
pReconDoc->setImageFile (pImageFile);
- if (theApp->getAskDeleteNewDocs())
- pReconDoc->Modify (true);
pReconDoc->UpdateAllViews (m_pProjView);
if (ImageFileView* rasterView = pReconDoc->getView()) {
rasterView->OnUpdate (rasterView, NULL);
rasterView->getFrame()->Show(true);
}
*theApp->getLog() << m_pszLabel << "\n";
+ wxMutexGuiLeave();
+
+ if (theApp->getAskDeleteNewDocs())
+ pReconDoc->Modify (true);
pImageFile->labelAdd (m_pProjView->GetDocument()->getProjections().getLabel());
pImageFile->labelAdd (m_pszLabel, getTimerEnd());
ReconstructorWorker::OnExit ()
{
}
+
+#endif // HAVE_WXTHREADS
** This is part of the CTSim program
** Copyright (C) 1983-2001 Kevin Rosenberg
**
-** $Id: threadrecon.h,v 1.10 2001/02/25 19:24:01 kevin Exp $
+** $Id: threadrecon.h,v 1.11 2001/03/02 21:11:50 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
#ifndef _THREADRECON_H
#define _THREADRECON_H
+#ifdef HAVE_WXTHREADS
+
+
#include <vector>
#include <wx/thread.h>
#include <wx/progdlg.h>
virtual void OnExit();
};
-
-#endif
+#endif // HAVE_WXTHREADS
+#endif // _THREADRECON_H_
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: views.cpp,v 1.124 2001/03/02 20:20:09 kevin Exp $
+** $Id: views.cpp,v 1.125 2001/03/02 21:11:50 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
}
}
} else {
+#if HAVE_WXTHREADS
if (theApp->getUseBackgroundTasks() || theApp->getNumberCPU() > 1) {
ProjectorSupervisorThread* pProjector = new ProjectorSupervisorThread (this, m_iDefaultNDet,
m_iDefaultNView, sGeometry.c_str(), m_iDefaultNSample, dRotationRadians,
pProjector->SetPriority(60);
pProjector->Run();
return;
- } else {
+ } else
+#endif // HAVE_WXTHREADS
+ {
pProj = new Projections;
pProj->initFromScanner (theScanner);
wxProgressDialog dlgProgress (wxString("Projection"), wxString("Projection Progress"), pProj->nView() + 1, getFrameForChild(), wxPD_CAN_ABORT );
<< m_iDefaultRasterNY << ", ViewRatio=" << m_dDefaultRasterViewRatio << ", nSamples="
<< m_iDefaultRasterNSamples;;
+#if HAVE_WXTHREADS
if (theApp->getUseBackgroundTasks() || theApp->getNumberCPU() > 1) {
RasterizerSupervisorThread* pThread = new RasterizerSupervisorThread (this, m_iDefaultRasterNX, m_iDefaultRasterNY,
m_iDefaultRasterNSamples, m_dDefaultRasterViewRatio, os.str().c_str());
}
pThread->SetPriority (60);
pThread->Run();
- } else {
+ } else
+#endif
+ {
ImageFile* pImageFile = new ImageFile (m_iDefaultRasterNX, m_iDefaultRasterNY);
wxProgressDialog dlgProgress (wxString("Rasterize"), wxString("Rasterization Progress"),
pImageFile->nx() + 1, getFrameForChild(), wxPD_CAN_ABORT );
delete pDlgReconstruct;
delete pReconstructor;
} else {
+#if HAVE_WXTHREADS
if (theApp->getUseBackgroundTasks() || theApp->getNumberCPU() > 1) {
ReconstructorSupervisorThread* pReconstructor = new ReconstructorSupervisorThread (this,
m_iDefaultNX, m_iDefaultNY, optFilterName.c_str(),
pReconstructor->SetPriority (60);
pReconstructor->Run();
return;
- } else {
+ } else
+#endif
+ {
pImageFile = new ImageFile (m_iDefaultNX, m_iDefaultNY);
Reconstructor* pReconstructor = new Reconstructor (rProj, *pImageFile, optFilterName.c_str(),
m_dDefaultFilterParam, optFilterMethodName.c_str(), m_iDefaultZeropad, optFilterGenerationName.c_str(),