- m_iNumThreads = theApp->getNumberCPU();
-// ++m_iNumThreads;
- m_iTotalViews = m_pProjView->GetDocument()->getProjections().nView();
- int iBaseViews = m_iTotalViews / m_iNumThreads;
- int iExtraViews = m_iTotalViews % m_iNumThreads;
-
- m_vecpChildImageFile.reserve (m_iNumThreads);
- m_vecpReconstructor.reserve (m_iNumThreads);
- m_vecpThread.reserve (m_iNumThreads);
-
- for (unsigned int iProc = 0; iProc < m_iNumThreads; iProc++) {
- m_vecpChildImageFile[iProc] = new ImageFile (iImageNX, iImageNY);
- m_vecpReconstructor[iProc] = new Reconstructor (m_pProjView->GetDocument()->getProjections(), *m_vecpChildImageFile[iProc],
- pszFilterName, dFilterParam, pszFilterMethod, iZeropad, pszFilterGenerationName,
- pszInterpName, iInterpParam, pszBackprojectName, Trace::TRACE_NONE);
-
- int iStartView = iProc * iBaseViews;
- int iNumViews = iBaseViews;
- if (iProc < iExtraViews)
- ++iNumViews;
- m_vecpThread[iProc] = new ReconstructionThread (this, m_vecpReconstructor[iProc], iProc, iStartView, iNumViews);
- if (m_vecpThread[iProc]->Create () != wxTHREAD_NO_ERROR) {
- m_bFail = true;
- break;
- }
- }
-
- m_pProjView->GetDocument()->addReconstructor (this);
- // m_pDialogProgress = new wxProgressDialog (_T("Filtered Backprojection"), _T("Reconstruction Progress"), m_iTotalViews, pProjView->getFrame(), wxPD_CAN_ABORT | wxPD_AUTO_HIDE);