X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=libctsupport%2Fplotfile.cpp;h=b8744515cfc61ef8ac0a66e524e9dfecd1f1fed5;hp=588c014180f9b5db7f48e307b573e29d7fa213eb;hb=739e435359d44546dd812fff8c86b815a214d587;hpb=89997e727ff5d4d8828f6fdaee435d809b623ffe diff --git a/libctsupport/plotfile.cpp b/libctsupport/plotfile.cpp index 588c014..b874451 100644 --- a/libctsupport/plotfile.cpp +++ b/libctsupport/plotfile.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: plotfile.cpp,v 1.1 2000/12/19 21:37:10 kevin Exp $ +** $Id: plotfile.cpp,v 1.2 2000/12/20 14:39:09 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 @@ -104,6 +104,19 @@ PlotFile::addColumn (int iCol, const float* const pdColData) return true; } +void +PlotFile::getColumn (int iCol, double* pdColData) const +{ + if (iCol < 0 || iCol >= m_iNumColumns) { + sys_error (ERR_SEVERE, "Illegal column number %d [PlotFile::addColumn]", iCol); + return; + } + + for (int iRec = 0; iRec < m_iNumRecords; iRec++) + pdColData[iRec] = m_vecCurves[ iRec + (iCol * m_iNumRecords) ]; + +} + bool PlotFile::fileWrite (const char* const filename) {