X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=libctsim%2Fscanner.cpp;h=59bcf943fa1eefd17fdbd1a74b8dae5c5bdf4330;hp=77fbb1e7510ba0e9af77b1a70a168b739d9485d3;hb=dc034c9d0b7d9c3874a324a4c2c189a02945adc8;hpb=a762ea1d114c21d3f832c21ea86ed20f453c57a3 diff --git a/libctsim/scanner.cpp b/libctsim/scanner.cpp index 77fbb1e..59bcf94 100644 --- a/libctsim/scanner.cpp +++ b/libctsim/scanner.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: scanner.cpp,v 1.16 2000/12/03 12:22:46 kevin Exp $ +** $Id: scanner.cpp,v 1.20 2000/12/16 06:12:47 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 @@ -260,7 +260,7 @@ Scanner::collectProjections (Projections& proj, const Phantom& phm, const int tr } void -Scanner::collectProjections (Projections& proj, const Phantom& phm, const int iStartView, const int iNumViews, bool bStoreAtViewPosition, const int trace, SGP* pSGP = NULL) +Scanner::collectProjections (Projections& proj, const Phantom& phm, const int iStartView, const int iNumViews, bool bStoreAtViewPosition, const int trace, SGP* pSGP) { m_trace = trace; double start_angle = iStartView * proj.rotInc(); @@ -303,7 +303,7 @@ Scanner::collectProjections (Projections& proj, const Phantom& phm, const int iS if (pSGP && m_trace >= Trace::TRACE_PHANTOM) { m_pSGP = pSGP; m_pSGP->eraseWindow(); - double dWindowSize = max(m_detLen, m_dFocalLength * 2) * SQRT2; + double dWindowSize = dmax (m_detLen, m_dFocalLength * 2) * SQRT2; double dHalfWindowSize = dWindowSize / 2; m_dXMinWin = m_dXCenter - dHalfWindowSize; m_dXMaxWin = m_dXCenter + dHalfWindowSize; @@ -365,7 +365,7 @@ Scanner::collectProjections (Projections& proj, const Phantom& phm, const int iS traceShowParam ("Current View:", "%d (%.0f%%)", PROJECTION_TRACE_ROW_CURR_VIEW, C_RED, iView + iStartView, (iView + iStartView) / static_cast(m_nView) * 100.); #endif if (m_trace == Trace::TRACE_CONSOLE) - cout << "Current View: " << iView+iStartView << endl; + std::cout << "Current View: " << iView+iStartView << std::endl; projectSingleView (phm, detArray, xd1, yd1, xd2, yd2, xs1, ys1, xs2, ys2, viewAngle + 3 * HALFPI); detArray.setViewAngle (viewAngle); @@ -532,7 +532,11 @@ Scanner::traceShowParamRasterOp (int iRasterOp, const char *szLabel, const char { char szValue[256]; +#ifdef MSVC + vsprintf (szValue, fmt, args); +#else vsnprintf (szValue, sizeof(szValue), fmt, args); +#endif // cio_set_cpos (raysum_trace_menu_column, row); // cio_set_text_clr (color - 8, 0);