** Date Started: February 2001
**
** This is part of the CTSim program
-** Copyright (C) 1983-2001 Kevin Rosenberg
-**
-** $Id$
+** Copyright (C) 1983-2009 Kevin Rosenberg
**
** 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
ReconstructorSupervisorThread::ReconstructorSupervisorThread (ProjectionFileView* pProjView, int iNX, int iNY,
const char* pszFilterName, double dFilterParam, const char* pszFilterMethod, int iZeropad,
const char* pszFilterGenerationName, const char* pszInterpName, int iInterpParam,
- const char* pszBackprojectName, const char* const pszLabel, ReconstructionROI* pROI, bool bRebinToParallel)
+ const char* pszBackprojectName, wxChar const* pszLabel, ReconstructionROI* pROI, bool bRebinToParallel)
: SupervisorThread(), m_pProjView(pProjView), m_iNX(iNX), m_iNY(iNY), m_strFilterName(pszFilterName), m_dFilterParam(dFilterParam),
m_strFilterMethod(pszFilterMethod), m_iZeropad(iZeropad), m_strFilterGenerationName(pszFilterGenerationName),
m_strInterpName(pszInterpName), m_iInterpParam(iInterpParam), m_strBackprojectName(pszBackprojectName),
ReconstructorSupervisor reconSupervisor (this, pProj, m_pProjView, m_iNX, m_iNY,
m_strFilterName.c_str(), m_dFilterParam, m_strFilterMethod.c_str(), m_iZeropad, m_strFilterGenerationName.c_str(),
- m_strInterpName.c_str(), m_iInterpParam, m_strBackprojectName.c_str(), m_strLabel.c_str(), &m_reconROI);
+ m_strInterpName.c_str(), m_iInterpParam, m_strBackprojectName.c_str(), m_strLabel, &m_reconROI);
reconSupervisor.start();
while (! reconSupervisor.workersDone() && ! reconSupervisor.fail() && ! reconSupervisor.cancelled()) {
}
if (reconSupervisor.fail())
{
- wxString msg ("Error starting reconstructor supervisor: ");
- msg += reconSupervisor.getFailMessage().c_str();
- msg += "\n";
+ wxString msg (_T("Error starting reconstructor supervisor: "));
+ msg += reconSupervisor.getFailMessage();
+ msg += _T("\n");
wxCommandEvent eventLog (wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
eventLog.SetString( msg );
wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event
ReconstructorSupervisor::ReconstructorSupervisor (SupervisorThread* pThread, Projections* pProj,
ProjectionFileView* pProjView, int iImageNX, int iImageNY, const char* pszFilterName, double dFilterParam,
const char* pszFilterMethod, int iZeropad, const char* pszFilterGenerationName,
- const char* pszInterpName, int iInterpParam, const char* pszBackprojectName, const char* const pszLabel,
+ const char* pszInterpName, int iInterpParam, const char* pszBackprojectName, wxChar const* pszLabel,
ReconstructionROI* pROI)
- : BackgroundSupervisor (pThread, pProjView->GetFrame(), pProjView->GetDocument(), "Reconstructing", pProjView->GetDocument()->getProjections().nView()),
+ : BackgroundSupervisor (pThread, pProjView->GetFrame(), pProjView->GetDocument(),
+ _T("Reconstructing"),
+ pProjView->GetDocument()->getProjections().nView()),
m_pProj(pProj), m_pProjView(pProjView), m_pProjDoc(pProjView->GetDocument()),
m_iImageNX(iImageNX), m_iImageNY(iImageNY),
m_pszFilterName(pszFilterName), m_dFilterParam(dFilterParam), m_pszFilterMethod(pszFilterMethod),
m_iZeropad(iZeropad), m_pszFilterGenerationName(pszFilterGenerationName), m_pszInterpName(pszInterpName),
- m_iInterpParam(iInterpParam), m_pszBackprojectName(pszBackprojectName), m_pszLabel(pszLabel),
+ m_iInterpParam(iInterpParam), m_pszBackprojectName(pszBackprojectName), m_strLabel(pszLabel),
m_pReconROI(pROI)
{
m_vecpChildImageFile.reserve (getNumWorkers());
ImageFile* pImageFile = getImageFile();
pImageFile->labelAdd (m_pProj->getLabel());
- pImageFile->labelAdd (m_pszLabel, getTimerEnd());
+ pImageFile->labelAdd (m_strLabel.mb_str(wxConvUTF8), getTimerEnd());
wxCommandEvent eventLog (wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
- wxString msg (m_pszLabel);
- msg += "\n";
+ wxString msg (m_strLabel);
+ msg += _T("\n");
eventLog.SetString( msg );
wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event
m_iInterpParam, m_pszBackprojectName, Trace::TRACE_NONE, m_pReconROI, false);
bool bFail = pReconstructor->fail();
- std::string failMsg;
+ wxString failMsg;
if (bFail) {
- failMsg = "Unable to make reconstructor: ";
- failMsg += pReconstructor->failMessage().c_str();
+ failMsg = _T("Unable to make reconstructor: ");
+ failMsg += wxConvUTF8.cMB2WX(pReconstructor->failMessage().c_str());
wxCommandEvent event( wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
- event.SetString( failMsg.c_str() );
+ event.SetString( failMsg );
wxPostEvent( theApp->getMainFrame(), event );
}
else
#ifdef DEBUG
if (theApp->getVerboseLogging()) {
wxString msg;
- msg.Printf("Worker thread: Received destroy message at work unit #%d\n", iUnit);
+ msg.Printf(_T("Worker thread: Received destroy message at work unit #%d\n"), iUnit);
wxCommandEvent event( wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
event.SetString( msg );
wxPostEvent( theApp->getMainFrame(), event );