X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=libctsim%2Fprojections.cpp;h=7d3e814967394d885dd3b494ea0c626f351157df;hp=a29d7c5a6ca967ab5e569349a46acc0ef2082797;hb=08a5cd04c3994d5ea24713b9b000791bd2e406fe;hpb=e4c1f7f8eb87558c3abf3bf1d20732361f425351 diff --git a/libctsim/projections.cpp b/libctsim/projections.cpp index a29d7c5..7d3e814 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.15 2000/07/15 08:36:13 kevin Exp $ +** $Id: projections.cpp,v 1.18 2000/07/29 19:50: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 @@ -515,7 +515,6 @@ Projections::reconstruct (ImageFile& im, const char* const filterName, double fi cout << "Reconstruct: filter="<= TRACE_TEXT) { @@ -553,30 +557,7 @@ Projections::reconstruct (ImageFile& im, const char* const filterName, double fi 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); - } -#endif //HAVE_SGP + #ifdef HAVE_BSPLINE_INTERP if (interp_type == I_BSPLINE) @@ -594,10 +575,34 @@ Projections::reconstruct (ImageFile& im, const char* const filterName, double fi #ifdef HAVE_SGP if (trace >= TRACE_PLOT) { + SGPDriver sgpDriverProj ("Projection"); + SGP sgpProj (sgpDriverProj); + EZPlot ezplotProj (sgpProj); + + ezplotProj.ezset ("clear"); + ezplotProj.ezset ("title Filtered Projection"); + ezplotProj.ezset ("xticks major 5."); + ezplotProj.ezset ("xlabel "); + ezplotProj.ezset ("ylabel "); + ezplotProj.ezset ("yporigin .5."); + ezplotProj.ezset ("ylength .5."); + ezplotProj.ezset ("box."); + ezplotProj.ezset ("grid."); + ezplotProj.addCurve (plot_xaxis, detval, m_nDet); + ezplotProj.plot(); + ezplotProj.ezset ("clear"); + ezplotProj.ezset ("xticks major 5."); + ezplotProj.ezset ("xlabel "); + ezplotProj.ezset ("ylabel "); + ezplotProj.ezset ("ylength .5."); + ezplotProj.ezset ("box"); + ezplotProj.ezset ("grid"); + ezplotProj.addCurve (plot_xaxis, filteredProj, n_filteredProj); + ezplotProj.plot(); + + cout << "Do you want to exit with current pic (y/n)? " << flush; 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; }