X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=libctsim%2Fscanner.cpp;h=aeb51975e82fd7e8436a542aae971d1203617245;hp=a90ca4444129059c6a0b6a3809ae7157570ccbc6;hb=87f312d59cabca5080b481a20314601ea476c4be;hpb=bd1d464294e037da19ccc80d8cc60475768eb2ca diff --git a/libctsim/scanner.cpp b/libctsim/scanner.cpp index a90ca44..aeb5197 100644 --- a/libctsim/scanner.cpp +++ b/libctsim/scanner.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: scanner.cpp,v 1.39 2001/09/24 09:40:42 kevin Exp $ +** $Id: scanner.cpp,v 1.44 2003/07/04 21:39:40 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 @@ -32,19 +32,22 @@ const int Scanner::GEOMETRY_INVALID = -1; const int Scanner::GEOMETRY_PARALLEL = 0; const int Scanner::GEOMETRY_EQUIANGULAR = 1; const int Scanner::GEOMETRY_EQUILINEAR = 2; +const int Scanner::GEOMETRY_LINOGRAM = 3; -const char* Scanner::s_aszGeometryName[] = +const char* const Scanner::s_aszGeometryName[] = { - {"parallel"}, - {"equiangular"}, - {"equilinear"}, + "parallel", + "equiangular", + "equilinear", + "linogram", }; -const char* Scanner::s_aszGeometryTitle[] = +const char* const Scanner::s_aszGeometryTitle[] = { - {"Parallel"}, - {"Equiangular"}, - {"Equilinear"}, + "Parallel", + "Equiangular", + "Equilinear", + "Linogram", }; const int Scanner::s_iGeometryCount = sizeof(s_aszGeometryName) / sizeof(const char*); @@ -283,15 +286,18 @@ Scanner::collectProjections (Projections& proj, const Phantom& phm, const int tr } void -Scanner::collectProjections (Projections& proj, const Phantom& phm, const int iStartView, const int iNumViews, const int iOffsetView, bool bStoreAtViewPosition, const int trace, SGP* pSGP) +Scanner::collectProjections (Projections& proj, const Phantom& phm, const int iStartView, + const int iNumViews, const int iOffsetView, bool bStoreAtViewPosition, + const int trace, SGP* pSGP) { int iStorageOffset = (bStoreAtViewPosition ? iStartView : 0); collectProjections (proj, phm, iStartView, iNumViews, iOffsetView, iStorageOffset, trace, pSGP); } void -Scanner::collectProjections (Projections& proj, const Phantom& phm, const int iStartView, const int iNumViews, const int iOffsetView, - int iStorageOffset, const int trace, SGP* pSGP) +Scanner::collectProjections (Projections& proj, const Phantom& phm, const int iStartView, + const int iNumViews, const int iOffsetView, int iStorageOffset, + const int trace, SGP* pSGP) { m_trace = trace; double start_angle = (iStartView + iOffsetView) * proj.rotInc(); @@ -349,14 +355,18 @@ Scanner::collectProjections (Projections& proj, const Phantom& phm, const int iS m_pSGP->setColor (C_GREEN); m_pSGP->drawCircle (m_dFocalLength); m_pSGP->setColor (C_BLUE); +#if MSVC m_pSGP->setTextPointSize (9); +#else + m_pSGP->setTextPointSize (14); +#endif phm.draw (*m_pSGP); m_dTextHeight = m_pSGP->getCharHeight (); traceShowParam ("Phantom:", "%s", PROJECTION_TRACE_ROW_PHANT_ID, C_BLACK, phm.name().c_str()); traceShowParam ("Geometry:", "%s", PROJECTION_TRACE_ROW_GEOMETRY, C_BLUE, convertGeometryIDToName(m_idGeometry)); traceShowParam ("Focal Length Ratio:", "%.2f", PROJECTION_TRACE_ROW_FOCAL_LENGTH, C_BLUE, m_dFocalLengthRatio); -// traceShowParam ("Field Of View Ratio:", "%.2f", PROJECTION_TRACE_ROW_FIELD_OF_VIEW, C_BLUE, m_dFieldOfViewRatio); + // traceShowParam ("Field Of View Ratio:", "%.2f", PROJECTION_TRACE_ROW_FIELD_OF_VIEW, C_BLUE, m_dFieldOfViewRatio); traceShowParam ("Num Detectors:", "%d", PROJECTION_TRACE_ROW_NDET, C_BLUE, proj.nDet()); traceShowParam ("Num Views:", "%d", PROJECTION_TRACE_ROW_NVIEW, C_BLUE, proj.nView()); traceShowParam ("Samples / Ray:", "%d", PROJECTION_TRACE_ROW_SAMPLES, C_BLUE, m_nSample);