X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=libctsim%2Fprojections.cpp;h=f5f9c6af9761f4fb7816420584a1a5d9a32e55d2;hb=ec73e3f9aa11aea5ba6a4255489fdca63d2b4990;hp=995c1649ec5327da84ad3890d3d6ad12e003b622;hpb=7f8f356151b0c8db0dbbf1c1896cc22630d6c774;p=ctsim.git diff --git a/libctsim/projections.cpp b/libctsim/projections.cpp index 995c164..f5f9c6a 100644 --- a/libctsim/projections.cpp +++ b/libctsim/projections.cpp @@ -8,7 +8,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: projections.cpp,v 1.43 2001/01/12 16:41:56 kevin Exp $ +** $Id: projections.cpp,v 1.45 2001/01/16 20:55:29 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 @@ -637,6 +637,8 @@ Projections::printProjectionData (int startView, int endView) if (m_projData != NULL) { if (startView < 0) startView = 0; + if (endView < 0) + endView = m_nView - 1; if (startView > m_nView - 1) startView = m_nView - 1; if (endView > m_nView - 1) @@ -687,7 +689,8 @@ Projections::convertPolar (ImageFile& rIF, int iInterpolationID) calcArrayPolarCoordinates (nx, ny, ppdView, ppdDet); std::complex** ppcDetValue = new std::complex* [m_nView]; - for (unsigned int iView = 0; iView < m_nView; iView++) { + unsigned int iView; + for (iView = 0; iView < m_nView; iView++) { ppcDetValue[iView] = new std::complex [m_nDet]; for (unsigned int iDet = 0; iDet < m_nDet; iDet++) ppcDetValue[iView][iDet] = std::complex(getDetectorArray (iView).detValues()[iDet], 0);