From 27baab81972b095035e92f958843f86bf2632f68 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Mon, 24 Sep 2001 11:29:41 +0000 Subject: [PATCH] r1022: no message --- libctsim/projections.cpp | 76 +++++++++++++------------- msvc/ctsim/ctsim.plg | 112 ++++++++++++++++++++++++--------------- 2 files changed, 107 insertions(+), 81 deletions(-) diff --git a/libctsim/projections.cpp b/libctsim/projections.cpp index d715b73..b2d3c4a 100644 --- a/libctsim/projections.cpp +++ b/libctsim/projections.cpp @@ -8,7 +8,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: projections.cpp,v 1.75 2001/09/24 11:20:08 kevin Exp $ +** $Id: projections.cpp,v 1.76 2001/09/24 11:29:41 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 @@ -238,30 +238,30 @@ Projections::Helical180LI_Equiangular(int interpView) // is there enough data in the data set? Should have 2(Pi+fanAngle) // coverage minimum - if ( m_nView < static_cast((2*( M_PI + fanAngle ) ) / dbeta) -1 ){ + if ( m_nView < static_cast((2*( PI + fanAngle ) ) / dbeta) -1 ){ std::cerr << "Data set does not include 360 +2*FanBeamAngle views" << std::endl; return (1); } - if (interpView < 0) // use default position at M_PI+fanAngle + if (interpView < 0) // use default position at PI+fanAngle { - interpView = static_cast ((M_PI+fanAngle)/dbeta); + interpView = static_cast ((PI+fanAngle)/dbeta); } else { - // check if there is M_PI+fanAngle data on either side of the + // check if there is PI+fanAngle data on either side of the // of the specified image plane - if ( interpView*dbeta < M_PI+fanAngle || - interpView*dbeta + M_PI + fanAngle > m_nView*dbeta) + if ( interpView*dbeta < PI+fanAngle || + interpView*dbeta + PI + fanAngle > m_nView*dbeta) { std::cerr << "There isn't PI+fanAngle of data on either side of the requested interpolation view" << std::endl; return(1); } - offsetView = interpView - static_cast((M_PI+fanAngle)/dbeta); + offsetView = interpView - static_cast((PI+fanAngle)/dbeta); } - int last_interp_view = static_cast ((M_PI+fanAngle)/dbeta); + int last_interp_view = static_cast ((PI+fanAngle)/dbeta); // make a new array for data... @@ -282,20 +282,20 @@ Projections::Helical180LI_Equiangular(int interpView) for ( int iDet = 0; iDet < m_nDet; iDet++) { double gamma = (iDet -(m_nDet-1)/2)* dgamma ; int newiView, newiDet; - if (beta < M_PI+fanAngle) { //if (M_PI +fanAngle - beta > dbeta ) + if (beta < PI+fanAngle) { //if (PI +fanAngle - beta > dbeta ) //newbeta = beta; //newgamma = gamma; newiDet = iDet; newiView = iView; } - else // (beta > M_PI+fanAngle) + else // (beta > PI+fanAngle) { //newbeta = beta +2*gamma - 180; //newgamma = -gamma; newiDet = -iDet + (m_nDet -1); - // newiView = nearest((beta + 2*gamma - M_PI)/dbeta); - //newiView = static_cast(( (iView*dbeta) + 2*(iDet-(m_nDet-1)/2)*dgamma - M_PI)/dbeta); - newiView = nearest(( (iView*dbeta) + 2*(iDet-(m_nDet-1)/2)*dgamma - M_PI)/dbeta); + // newiView = nearest((beta + 2*gamma - PI)/dbeta); + //newiView = static_cast(( (iView*dbeta) + 2*(iDet-(m_nDet-1)/2)*dgamma - PI)/dbeta); + newiView = nearest(( (iView*dbeta) + 2*(iDet-(m_nDet-1)/2)*dgamma - PI)/dbeta); } #ifdef DEBUG @@ -304,43 +304,43 @@ Projections::Helical180LI_Equiangular(int interpView) #endif if ( ( beta > fanAngle - 2*gamma) - && ( beta < 2*M_PI + fanAngle -2*gamma) ) + && ( beta < 2*PI + fanAngle -2*gamma) ) { // not in region 1 or 8 DetectorValue* detval = (m_projData[iView+offsetView])->detValues(); DetectorValue* newdetval = (newdetarray[newiView])->detValues(); if ( beta > fanAngle - 2*gamma && beta <= 2*fanAngle ) { // in region 2 newdetval[newiDet] += - (beta +2*gamma - fanAngle)/(M_PI+2*gamma) + (beta +2*gamma - fanAngle)/(PI+2*gamma) * detval[iDet]; } else if ( beta > 2*fanAngle - && beta <= M_PI - 2*gamma) { // in region 3 + && beta <= PI - 2*gamma) { // in region 3 newdetval[newiDet] += - (beta +2*gamma - fanAngle)/(M_PI+2*gamma) + (beta +2*gamma - fanAngle)/(PI+2*gamma) * detval[iDet]; } - else if ( beta > M_PI -2*gamma - && beta <= M_PI + fanAngle ) { // in region 4 + else if ( beta > PI -2*gamma + && beta <= PI + fanAngle ) { // in region 4 newdetval[newiDet] += - (beta +2*gamma - fanAngle)/(M_PI+2*gamma) + (beta +2*gamma - fanAngle)/(PI+2*gamma) * detval[iDet]; } - else if ( beta > M_PI + fanAngle - && beta <= M_PI +2*fanAngle -2*gamma) { // in region 5 + else if ( beta > PI + fanAngle + && beta <= PI +2*fanAngle -2*gamma) { // in region 5 newdetval[newiDet] += - (2*M_PI - beta - 2*gamma + fanAngle)/(M_PI-2*gamma) + (2*PI - beta - 2*gamma + fanAngle)/(PI-2*gamma) *detval[iDet]; } - else if ( beta > M_PI +2*fanAngle -2*gamma - && beta <= 2*M_PI) { // in region 6 + else if ( beta > PI +2*fanAngle -2*gamma + && beta <= 2*PI) { // in region 6 newdetval[newiDet] += - (2*M_PI - beta - 2*gamma + fanAngle)/(M_PI-2*gamma) + (2*PI - beta - 2*gamma + fanAngle)/(PI-2*gamma) *detval[iDet]; } - else if ( beta > 2*M_PI - && beta <= 2*M_PI + fanAngle -2*gamma){ // in region 7 + else if ( beta > 2*PI + && beta <= 2*PI + fanAngle -2*gamma){ // in region 7 newdetval[newiDet] += - (2*M_PI - beta -2*gamma + fanAngle)/(M_PI-2*gamma) + (2*PI - beta -2*gamma + fanAngle)/(PI-2*gamma) *detval[iDet]; } else @@ -374,7 +374,7 @@ Projections::HalfScanFeather(void) double fanAngle = m_dFanBeamAngle; // is there enough data? - if ( m_nView != static_cast(( M_PI+fanAngle ) / dbeta) +1 ){ + if ( m_nView != static_cast(( PI+fanAngle ) / dbeta) +1 ){ std::cerr << "Data set does seem have enough data to be a halfscan data set" << std::endl; return (1); } @@ -392,12 +392,12 @@ Projections::HalfScanFeather(void) double beta2 = iView2 * dbeta; for ( int iDet2 = 0; iDet2 < m_nDet; iDet2++) { double gamma2 = (iDet2 -(m_nDet-1)/2)* dgamma ; - if ( ( beta2 >= M_PI - 2*gamma2) ) { // in redundant data region + if ( ( beta2 >= PI - 2*gamma2) ) { // in redundant data region int iView1, iDet1; iDet1 = (m_nDet -1) - iDet2; - //iView1 = nearest((beta2 + 2*gamma2 - M_PI)/dbeta); + //iView1 = nearest((beta2 + 2*gamma2 - PI)/dbeta); iView1 = nearest(( (iView2*dbeta) - + 2*(iDet2-(m_nDet-1)/2)*dgamma - M_PI)/dbeta); + + 2*(iDet2-(m_nDet-1)/2)*dgamma - PI)/dbeta); DetectorValue* detval2 = (m_projData[iView2])->detValues(); @@ -410,10 +410,10 @@ Projections::HalfScanFeather(void) gamma1 = -gamma2; if ( beta1 <= (fanAngle - 2*gamma1) ) x = beta1 / ( fanAngle - 2*gamma1); - else if ( (fanAngle - 2*gamma1 <= beta1 ) && beta1 <= M_PI - 2*gamma1) + else if ( (fanAngle - 2*gamma1 <= beta1 ) && beta1 <= PI - 2*gamma1) x = 1; - else if ( (M_PI - 2*gamma1 <= beta1 ) && ( beta1 <=M_PI + fanAngle) ) - x = (M_PI +fanAngle - beta1)/(fanAngle + 2*gamma1); + else if ( (PI - 2*gamma1 <= beta1 ) && ( beta1 <=PI + fanAngle) ) + x = (PI +fanAngle - beta1)/(fanAngle + 2*gamma1); else { std::cerr << "Shouldn't be here!"<< std::endl; return(4); @@ -427,7 +427,7 @@ Projections::HalfScanFeather(void) } } // heuristic scaling, why this factor? - double scalefactor = m_nView * m_rotInc / M_PI; + double scalefactor = m_nView * m_rotInc / PI; for ( int iView = 0 ; iView < m_nView; iView++) { DetectorValue* detval = (m_projData[iView])->detValues(); for ( int iDet = 0; iDet < m_nDet; iDet++) { diff --git a/msvc/ctsim/ctsim.plg b/msvc/ctsim/ctsim.plg index f6e4c6f..c0aba02 100644 --- a/msvc/ctsim/ctsim.plg +++ b/msvc/ctsim/ctsim.plg @@ -3,54 +3,80 @@
 

Build Log

---------------------Configuration: ctsim - Win32 Debug-------------------- +--------------------Configuration: libctsim - Win32 Debug--------------------

Command Lines

-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP12.tmp" with contents +Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP25.tmp" with contents [ -/nologo /G6 /MTd /W3 /Gm /Gi /GR /GX /Zi /Od /Gy /I "\wx2.2.6\include" /I "..\..\..\fftw-2.1.3\fftw" /I "\wx2.2.6\src\png" /I "\wx2.2.6\src\zlib" /I "..\..\include" /I "..\..\getopt" /I "..\..\..\fftw-2.1.3\rfftw" /I "\dicom\ctn\include" /D "_DEBUG" /D CTSIMVERSION=\"3.5.0\" /D "__WXMSW__" /D "HAVE_SGP" /D "HAVE_PNG" /D "HAVE_WXWINDOWS" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "HAVE_STRING_H" /D "HAVE_FFTW" /D "HAVE_RFFTW" /D "HAVE_GETOPT_H" /D "MSVC" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "HAVE_CTN_DICOM" /D CTSIMVERSION=\"3.0.0alpha5\" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX"ctsim.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c -"C:\ctsim\src\ctsim.cpp" +/nologo /G6 /MTd /W3 /Gm /Gi /GR /GX /Zi /Od /Gy /I "..\..\..\wx2.2.5\src\png" /I "..\..\..\wx2.2.5\src\zlib" /I "\wx2.2.6\src\png" /I "\wx2.2.6\src\zlib" /I "..\..\INCLUDE" /I "..\..\getopt" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /I "..\..\..\wx2.2.6\include" /I "\dicom\ctn\include" /D "_DEBUG" /D "HAVE_WXWIN" /D "HAVE_STRING_H" /D "HAVE_GETOPT_H" /D "WIN32" /D "_MBCS" /D "_LIB" /D "MSVC" /D "HAVE_FFTW" /D "HAVE_PNG" /D "HAVE_SGP" /D "HAVE_WXWINDOWS" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "HAVE_CTN_DICOM" /D VERSION=\"3.1.0\" /FR"Debug/" /Fp"Debug/libctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c +"C:\ctsim\libctsim\projections.cpp" ] -Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP12.tmp" -Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP13.tmp" with contents +Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP25.tmp" +Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP26.tmp" with contents [ -winmm.lib rpcrt4.lib ws2_32.lib ../libctsim/Debug/libctsim.lib libcmtd.lib ..\..\..\fftw-2.1.3\Win32\FFTW2st\Debug\FFTW2st.lib ..\..\..\fftw-2.1.3\Win32\RFFTW2st\Debug\RFFTW2st.lib wxd.lib xpmd.lib tiffd.lib zlibd.lib pngd.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib htmlhelp.lib ctn_lib.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/ctsim.pdb" /debug /machine:I386 /out:"Debug/ctsim.exe" /pdbtype:sept /libpath:"\wx2.2.6\lib" /libpath:"\dicom\ctn\winctn\ctn_lib\Debug" -.\Debug\backgroundmgr.obj -.\Debug\backgroundsupr.obj -.\Debug\ctsim.obj -.\Debug\dialogs.obj -.\Debug\dlgezplot.obj -.\Debug\dlgprojections.obj -.\Debug\dlgreconstruct.obj -.\Debug\docs.obj -.\Debug\graph3dview.obj -.\Debug\threadproj.obj -.\Debug\threadraster.obj -.\Debug\threadrecon.obj -.\Debug\tips.obj -.\Debug\views.obj -.\Debug\ctsim.res -\ctsim\msvc\libctsim\Debug\libctsim.lib -"\fftw-2.1.3\Win32\FFTW2st\Debug\FFTW2st.lib" -"\fftw-2.1.3\Win32\RFFTW2st\Debug\RFFTW2st.lib" -\dicom\ctn\winctn\ctn_lib\Debug\ctn_lib.lib -\wx2.2.6\lib\jpegd.lib -\wx2.2.6\lib\pngd.lib -\wx2.2.6\lib\tiffd.lib -\wx2.2.6\lib\wxd.lib -\wx2.2.6\lib\xpmd.lib -\wx2.2.6\lib\zlibd.lib +/nologo /out:"Debug\libctsim.lib" +.\Debug\array2dfile.obj +.\Debug\backprojectors.obj +.\Debug\clip.obj +.\Debug\consoleio.obj +.\Debug\ctndicom.obj +.\Debug\ezplot.obj +.\Debug\ezset.obj +.\Debug\ezsupport.obj +.\Debug\filter.obj +.\Debug\fnetorderstream.obj +.\Debug\fourier.obj +.\Debug\getopt.obj +.\Debug\getopt1.obj +.\Debug\globalvars.obj +.\Debug\hashtable.obj +.\Debug\imagefile.obj +.\Debug\interpolator.obj +.\Debug\mathfuncs.obj +.\Debug\phantom.obj +.\Debug\plotfile.obj +.\Debug\pol.obj +.\Debug\procsignal.obj +.\Debug\projections.obj +.\Debug\reconstruct.obj +.\Debug\scanner.obj +.\Debug\sgp.obj +.\Debug\strfuncs.obj +.\Debug\syserror.obj +.\Debug\trace.obj +.\Debug\transformmatrix.obj +.\Debug\xform.obj ] -Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP13.tmp" +Creating command line "link.exe -lib @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP26.tmp"

Output Window

Compiling... -ctsim.cpp -Linking... - - - -

Results

-ctsim.exe - 0 error(s), 0 warning(s) -
- - +projections.cpp +Creating library... +

+--------------------Configuration: ctsim - Win32 Debug-------------------- +

+

Command Lines

+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP27.tmp" with contents +[ +/nologo /G6 /MTd /W3 /Gm /Gi /GR /GX /Zi /Od /Gy /I "\wx2.2.6\include" /I "..\..\..\fftw-2.1.3\fftw" /I "\wx2.2.6\src\png" /I "\wx2.2.6\src\zlib" /I "..\..\include" /I "..\..\getopt" /I "..\..\..\fftw-2.1.3\rfftw" /I "\dicom\ctn\include" /D "_DEBUG" /D CTSIMVERSION=\"3.5.0\" /D "__WXMSW__" /D "HAVE_SGP" /D "HAVE_PNG" /D "HAVE_WXWINDOWS" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "HAVE_STRING_H" /D "HAVE_FFTW" /D "HAVE_RFFTW" /D "HAVE_GETOPT_H" /D "MSVC" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "HAVE_CTN_DICOM" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX"ctsim.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c +"C:\ctsim\src\backgroundmgr.cpp" +"C:\ctsim\src\backgroundsupr.cpp" +"C:\ctsim\src\dlgezplot.cpp" +"C:\ctsim\src\graph3dview.cpp" +"C:\ctsim\src\threadproj.cpp" +"C:\ctsim\src\threadraster.cpp" +"C:\ctsim\src\threadrecon.cpp" +] +Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP27.tmp" +Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP28.tmp" with contents +[ +/nologo /G6 /MTd /W3 /Gm /Gi /GR /GX /Zi /Od /Gy /I "\wx2.2.6\include" /I "..\..\..\fftw-2.1.3\fftw" /I "\wx2.2.6\src\png" /I "\wx2.2.6\src\zlib" /I "..\..\include" /I "..\..\getopt" /I "..\..\..\fftw-2.1.3\rfftw" /I "\dicom\ctn\include" /D "_DEBUG" /D CTSIMVERSION=\"3.5.0\" /D "__WXMSW__" /D "HAVE_SGP" /D "HAVE_PNG" /D "HAVE_WXWINDOWS" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "HAVE_STRING_H" /D "HAVE_FFTW" /D "HAVE_RFFTW" /D "HAVE_GETOPT_H" /D "MSVC" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "HAVE_CTN_DICOM" /D CTSIMVERSION=\"3.0.0alpha5\" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX"ctsim.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c +"C:\ctsim\src\ctsim.cpp" +"C:\ctsim\src\dialogs.cpp" +"C:\ctsim\src\dlgprojections.cpp" +"C:\ctsim\src\dlgreconstruct.cpp" +"C:\ctsim\src\docs.cpp" +"C:\ctsim\src\views.cpp" +] +Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP28.tmp" +Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP29.tmp" with co \ No newline at end of file -- 2.34.1