X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=libctsim%2Fprojections.cpp;fp=libctsim%2Fprojections.cpp;h=d50582d5fd7bde8fc8bf447b0aa625e927f2ddee;hp=4d4a02d2ed560990419e565490fe8cfd0b3e142c;hb=efbcfaa2fd1ae55b27b1826e7cd84ee007e7ecb9;hpb=3ea498d51ce4597e9649cd21f155b51175ea0bea diff --git a/libctsim/projections.cpp b/libctsim/projections.cpp index 4d4a02d..d50582d 100644 --- a/libctsim/projections.cpp +++ b/libctsim/projections.cpp @@ -8,7 +8,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: projections.cpp,v 1.68 2001/03/21 21:45:31 kevin Exp $ +** $Id: projections.cpp,v 1.69 2001/03/22 02:30:00 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 @@ -697,21 +697,21 @@ Projections::convertPolar (ImageFile& rIF, int iInterpolationID) double** ppdView = adView.getArray(); double** ppdDet = adDet.getArray(); - std::complex** ppcDetValue = new std::complex* [m_nView]; + std::complex** ppcDetValue = new std::complex* [pProj->m_nView]; unsigned int iView; - for (iView = 0; iView < m_nView; iView++) { - ppcDetValue[iView] = new std::complex [m_nDet]; + for (iView = 0; iView < pProj->m_nView; iView++) { + ppcDetValue[iView] = new std::complex [pProj->m_nDet]; DetectorValue* detval = pProj->getDetectorArray (iView).detValues(); - for (unsigned int iDet = 0; iDet < m_nDet; iDet++) + for (unsigned int iDet = 0; iDet < pProj->m_nDet; iDet++) ppcDetValue[iView][iDet] = std::complex(detval[iDet], 0); } - pProj->calcArrayPolarCoordinates (nx, ny, ppdView, ppdDet, m_nDet, 1., m_detInc); + pProj->calcArrayPolarCoordinates (nx, ny, ppdView, ppdDet, pProj->m_nDet, 1., pProj->m_detInc); pProj->interpolatePolar (v, vImag, nx, ny, ppcDetValue, ppdView, ppdDet, pProj->m_nView, pProj->m_nDet, pProj->m_nDet, iInterpolationID); - for (iView = 0; iView < m_nView; iView++) + for (iView = 0; iView < pProj->m_nView; iView++) delete [] ppcDetValue[iView]; delete [] ppcDetValue; @@ -1038,7 +1038,7 @@ Projections::interpolateToParallel () const int iLastFloor = -1; for (int iV = 0; iV < pProjNew->nView(); iV++, dViewAngle += pProjNew->m_rotInc) { DetectorValue* detValues = pProjNew->getDetectorArray (iV).detValues(); - LinearInterpolator interp (pdThetaValuesForT, pdRaysumsForT, pProjNew->nView()); + LinearInterpolator interp (pdThetaValuesForT, pdRaysumsForT, pProjNew->nView(), false); detValues[iD] = interp.interpolate (dViewAngle, &iLastFloor); } } @@ -1057,11 +1057,11 @@ Projections::interpolateToParallel () const detArray.setViewAngle (dViewAngle); for (int i = 0; i < pProjNew->nDet(); i++) - pdDetValueCopy[i] = detValues[i]; + pdDetValueCopy[i] = detValues[i]; double dDetPos = pProjNew->m_detStart; int iLastFloor = -1; - LinearInterpolator interp (pdOriginalDetPositions, pdDetValueCopy, pProjNew->nDet()); + LinearInterpolator interp (pdOriginalDetPositions, pdDetValueCopy, pProjNew->nDet(), false); for (int iD = 0; iD < pProjNew->nDet(); iD++, dDetPos += pProjNew->m_detInc) detValues[iD] = interp.interpolate (dDetPos, &iLastFloor); }