X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fthreadrecon.cpp;h=e4bf3c5e558c249e7594113d027a6290a82f753d;hb=b361677a2f7d5b443641faec70b057f2a84dc77e;hp=0ec059bbcb2293be950c8731d8b29878deafe068;hpb=cd93aebb4dec4e0ae88d53f131c2320ae92d0cab;p=ctsim.git diff --git a/src/threadrecon.cpp b/src/threadrecon.cpp index 0ec059b..e4bf3c5 100644 --- a/src/threadrecon.cpp +++ b/src/threadrecon.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2001 Kevin Rosenberg ** -** $Id: threadrecon.cpp,v 1.20 2001/03/04 22:30:20 kevin Exp $ +** $Id: threadrecon.cpp,v 1.23 2001/03/09 03:54:25 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 @@ -55,10 +55,9 @@ ReconstructorSupervisorThread::ReconstructorSupervisorThread (ProjectionFileView 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) -: m_pProjView(pProjView), m_iNX(iNX), m_iNY(iNY), m_strFilterName(pszFilterName), m_dFilterParam(dFilterParam), +: 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), m_strLabel(pszLabel), - SupervisorThread() + m_strInterpName(pszInterpName), m_iInterpParam(iInterpParam), m_strBackprojectName(pszBackprojectName), m_strLabel(pszLabel) { } @@ -86,11 +85,7 @@ ReconstructorSupervisorThread::Entry() reconSupervisor.onDone(); reconSupervisor.deleteWorkers(); - while (! reconSupervisor.workersDeleted()) { - Sleep(50); - } - - return reinterpret_cast(0); + return static_cast(0); } void @@ -109,12 +104,12 @@ ReconstructorSupervisor::ReconstructorSupervisor (SupervisorThread* pThread, Pro 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) - : m_pProjView(pProjView), m_pProjDoc(pProjView->GetDocument()), + : BackgroundSupervisor (pThread, pProjView->GetFrame(), pProjView->GetDocument(), "Reconstructing", pProjView->GetDocument()->getProjections().nView()), + 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), - BackgroundSupervisor (pThread, pProjView->GetFrame(), pProjView->GetDocument(), "Reconstructing", pProjView->GetDocument()->getProjections().nView()) + m_iInterpParam(iInterpParam), m_pszBackprojectName(pszBackprojectName), m_pszLabel(pszLabel) { m_vecpChildImageFile.reserve (getNumWorkers()); for (int iThread = 0; iThread < getNumWorkers(); iThread++) {