- Projections* pProjections = new Projections (m_iNDet, m_iNView);
-#if 0
- ImageFileArray pArray = pImageFile->getArray();
-
- int i;
- for (i = 0; i < getNumWorkers(); i++) {
- ImageFileArrayConst pChildArray = m_vecpChildImageFile[i]->getArray();
- for (int ix = 0; ix < m_iImageNX; ix++)
- for (int iy = 0; iy < m_iImageNY; iy++)
- pArray[ix][iy] += pChildArray[ix][iy];
+ Projections* pProjections = new Projections (*m_pScanner);
+
+ int iGlobalView = 0;
+ size_t detArraySize = pProjections->nDet() * sizeof (DetectorValue);
+ for (int iw = 0; iw < getNumWorkers(); iw++) {
+ for (int iView = 0; iView < m_vecpChildProjections[iw]->nView(); iView++) {
+ DetectorArray& childDetArray = m_vecpChildProjections[iw]->getDetectorArray(iView);
+ DetectorArray& globalDetArray = pProjections->getDetectorArray(iGlobalView);
+ globalDetArray.setViewAngle (childDetArray.viewAngle());
+ DetectorValue* childDetval = childDetArray.detValues();
+ DetectorValue* globalDetval = globalDetArray.detValues();
+ memcpy (globalDetval, childDetval, detArraySize);
+ iGlobalView++;
+ }