X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=libctsim%2Fprojections.cpp;h=35d8418a070edd3029684246f8e8eea645d1ffff;hb=711cae0ee02e046370fdb4d6c6f440596ff71980;hp=69c4d0807a5065d3136e015ad65740ed5465db79;hpb=3fba6928127cd65870bdcd96c8114ad5894247ae;p=ctsim.git diff --git a/libctsim/projections.cpp b/libctsim/projections.cpp index 69c4d08..35d8418 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.14 2000/07/13 07:03:21 kevin Exp $ +** $Id: projections.cpp,v 1.16 2000/07/28 08:28:08 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 @@ -486,7 +486,7 @@ Projections::printScanInfo (void) const */ bool -Projections::reconstruct (ImageFile& im, const char* const filterName, double filt_param, const char* const filterMethodName, const int zeropad, const char* const interpName, int interpFactor, const char* const backprojectName, const int trace) +Projections::reconstruct (ImageFile& im, const char* const filterName, double filt_param, const char* const filterMethodName, const int zeropad, const char* const interpName, int interpFactor, const char* const backprojectName, const int trace) const { double detInc = m_detInc; int n_filteredProj = m_nDet * interpFactor; @@ -515,7 +515,6 @@ Projections::reconstruct (ImageFile& im, const char* const filterName, double fi cout << "Reconstruct: filter="<= TRACE_TEXT) { @@ -548,33 +550,37 @@ Projections::reconstruct (ImageFile& im, const char* const filterName, double fi if (trace >= TRACE_TEXT) printf ("Reconstructing view %d (last = %d)\n", iview, m_nView - 1); - DetectorArray& darray = getDetectorArray (iview); - DetectorValue* detval = darray.detValues(); + const DetectorArray& darray = getDetectorArray (iview); + const DetectorValue* detval = darray.detValues(); filter.filterSignal (detval, filteredProj); #ifdef HAVE_SGP if (trace >= TRACE_PLOT) { - ezset ("clear."); - ezset ("xticks major 5."); - ezset ("xlabel "); - ezset ("ylabel "); - ezset ("xlength .5."); - ezset ("box."); - ezset ("grid."); - ezset ("ufinish yes."); - ezplot (detval, plot_xaxis, m_nDet); - ezset ("clear."); - ezset ("xticks major 5."); - ezset ("xlabel "); - ezset ("ylabel "); - ezset ("ustart yes."); - ezset ("xporigin .5."); - ezset ("xlength .5."); - ezset ("box"); - - ezset ("grid"); - gid = ezplot (filteredProj, plot_xaxis, n_filteredProj); + SGPDriver sgpDriverProj ("Projection"); + SGP sgpProj (sgpDriverProj); + EZPlot ezplotProj (sgpProj); + + ezplotProj.ezset ("clear"); + ezplotProj.ezset ("xticks major 5."); + ezplotProj.ezset ("xlabel "); + ezplotProj.ezset ("ylabel "); + ezplotProj.ezset ("xlength .5."); + ezplotProj.ezset ("box."); + ezplotProj.ezset ("grid."); + ezplotProj.addCurve (detval, plot_xaxis, m_nDet); + ezplotProj.ezset ("clear."); + ezplotProj.ezset ("xticks major 5."); + ezplotProj.ezset ("xlabel "); + ezplotProj.ezset ("ylabel "); + ezplotProj.ezset ("xporigin .5."); + ezplotProj.ezset ("xlength .5."); + ezplotProj.ezset ("box"); + ezplotProj.ezset ("grid"); + ezplotProj.addCurve (filteredProj, plot_xaxis, n_filteredProj); + ezplotProj.plot (); + cout << "Press enter to continue\n"; + cio_kb_getc(); } #endif //HAVE_SGP @@ -597,7 +603,6 @@ Projections::reconstruct (ImageFile& im, const char* const filterName, double fi char str[256]; printf ("Do you want to exit with current pic (y/n) -- "); fgets(str, sizeof(str), stdin); - sgp2_close (sgp2_get_active_win()); if (tolower(str[0]) == 'y') { break; }