** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: nographics.h,v 1.1 2001/03/29 21:25:49 kevin Exp $
+** $Id: nographics.h,v 1.2 2001/03/30 19:17:32 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
#ifdef HAVE_WXWINDOWS
class EZPlot;
class wxWindow;
+class wxEZPlotDialog;
+
class EZPlotDialog
{
private:
- void* m_pDummy;
+ wxEZPlotDialog* m_pDialog;
public:
EZPlotDialog (wxWindow *parent = NULL, bool bCancelButton = false);
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: procsignal.cpp,v 1.31 2001/03/29 21:25:49 kevin Exp $
+** $Id: procsignal.cpp,v 1.32 2001/03/30 19:17:32 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
if (iZeropad > 0) {
double dLogBase2 = log(n) / log(2);
int iLogBase2 = static_cast<int>(floor (dLogBase2));
- if (dLogBase2 != floor(dLogBase2))
- iLogBase2++; // raise up to next power of 2
- n = 1 << (iLogBase2 + (iZeropad - 1));
+ int iPaddedN = 1 << (iLogBase2 + iZeropad);
+#ifdef DEBUG
+ sys_error (ERR_TRACE, "Zeropadding %d to %d", n, iPaddedN);
+#endif
+ return iPaddedN;
}
return n;
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: projections.cpp,v 1.72 2001/03/29 21:25:49 kevin Exp $
+** $Id: projections.cpp,v 1.73 2001/03/30 19:17:32 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
if (! v || nx == 0 || ny == 0)
return false;
- if (m_geometry != Scanner::GEOMETRY_PARALLEL) {
- sys_error (ERR_WARNING, "convertFFTPolar supports Parallel only");
- return false;
- }
+ Projections* pProj = this;
+ if (m_geometry == Scanner::GEOMETRY_EQUIANGULAR || m_geometry == Scanner::GEOMETRY_EQUILINEAR)
+ pProj = interpolateToParallel();
int iInterpDet = nx;
+// int iInterpDet = pProj->m_nDet;
int iNumInterpDetWithZeros = ProcessSignal::addZeropadFactor (iInterpDet, iZeropad);
double dZeropadRatio = static_cast<double>(iNumInterpDetWithZeros) / static_cast<double>(iInterpDet);
fftw_plan plan = fftw_create_plan (iNumInterpDetWithZeros, FFTW_FORWARD, FFTW_IN_PLACE | FFTW_ESTIMATE | FFTW_USE_WISDOM);
fftw_complex* pcIn = new fftw_complex [iNumInterpDetWithZeros];
- std::complex<double>** ppcDetValue = new std::complex<double>* [m_nView];
- double dInterpScale = (m_nDet-1) / static_cast<double>(iInterpDet-1) / SQRT2;
+ std::complex<double>** ppcDetValue = new std::complex<double>* [pProj->m_nView];
+ double dInterpScale = (pProj->m_nDet-1) / static_cast<double>(iInterpDet-1) / SQRT2;
double dFFTScale = 1. / static_cast<double>(iInterpDet * iInterpDet);
int iMidPoint = iInterpDet / 2;
double dMidPoint = static_cast<double>(iInterpDet) / 2.;
int iZerosAdded = iNumInterpDetWithZeros - iInterpDet;
+
+ // For each view, interpolate to nx length, shift to center at origin, and FFt transform
for (unsigned int iView = 0; iView < m_nView; iView++) {
- DetectorValue* detval = getDetectorArray(iView).detValues();
- LinearInterpolator<DetectorValue> projInterp (detval, m_nDet);
+ DetectorValue* detval = pProj->getDetectorArray(iView).detValues();
+ LinearInterpolator<DetectorValue> projInterp (detval, pProj->m_nDet);
for (unsigned int iDet = 0; iDet < iInterpDet; iDet++) {
double dInterpPos = (m_nDet / 2.) + (iDet - dMidPoint) * dInterpScale;
pcIn[iDet].re = projInterp.interpolate (dInterpPos) * dInterpScale;
pcIn[iDet].im = 0;
}
+
Fourier::shuffleFourierToNaturalOrder (pcIn, iInterpDet);
if (iZerosAdded > 0) {
for (unsigned int iDet1 = iMidPoint; iDet1 < iInterpDet; iDet1++)
Array2d<double> adDet (nx, ny);
double** ppdView = adView.getArray();
double** ppdDet = adDet.getArray();
- calcArrayPolarCoordinates (nx, ny, ppdView, ppdDet, iNumInterpDetWithZeros, dZeropadRatio,
- m_detInc * dInterpScale);
+ pProj->calcArrayPolarCoordinates (nx, ny, ppdView, ppdDet, iNumInterpDetWithZeros, dZeropadRatio,
+ pProj->m_detInc * dInterpScale);
+
+ pProj->interpolatePolar (v, vImag, nx, ny, ppcDetValue, ppdView, ppdDet, pProj->m_nView, pProj->m_nDet,
+ iNumInterpDetWithZeros, iInterpolationID);
- interpolatePolar (v, vImag, nx, ny, ppcDetValue, ppdView, ppdDet, m_nView, m_nDet, iNumInterpDetWithZeros,
- iInterpolationID);
+ if (m_geometry == Scanner::GEOMETRY_EQUIANGULAR || m_geometry == Scanner::GEOMETRY_EQUILINEAR)
+ delete pProj;
for (int i = 0; i < m_nView; i++)
delete [] ppcDetValue[i];
<pre>
<h1>Build Log</h1>
<h3>
---------------------Configuration: ctsim - Win32 Release--------------------
+--------------------Configuration: libctsim - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPB8.tmp" with contents
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPAE.tmp" with contents
[
-/nologo /G6 /MT /W3 /GR /GX /O2 /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 "NDEBUG" /D "__WXWIN__" /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.5.0\" /FR"Release/" /Fp"Release/ctsim.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c
-"C:\ctsim\src\dlgezplot.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\RSPB8.tmp"
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPB9.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPAE.tmp"
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPAF.tmp" with contents
[
-wsock32.lib tiff.lib jpeg.lib png.lib zlib.lib xpm.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:no /pdb:"Release/ctsim.pdb" /machine:I386 /out:"Release/ctsim.exe" /libpath:"\wx2.2.6\lib" /libpath:"\dicom\ctn\winctn\ctn_lib\Release"
-.\Release\backgroundmgr.obj
-.\Release\backgroundsupr.obj
-.\Release\ctsim.obj
-.\Release\dialogs.obj
-.\Release\dlgezplot.obj
-.\Release\dlgprojections.obj
-.\Release\dlgreconstruct.obj
-.\Release\docs.obj
-.\Release\graph3dview.obj
-.\Release\threadproj.obj
-.\Release\threadraster.obj
-.\Release\threadrecon.obj
-.\Release\tips.obj
-.\Release\views.obj
-.\Release\ctsim.res
-\ctsim\msvc\libctsim\Release\libctsim.lib
-"\fftw-2.1.3\Win32\FFTW2st\Release\FFTW2st.lib"
-"\fftw-2.1.3\Win32\RFFTW2st\Release\RFFTW2st.lib"
-\dicom\ctn\winctn\ctn_lib\Release\ctn_lib.lib
-\wx2.2.6\lib\jpeg.lib
-\wx2.2.6\lib\png.lib
-\wx2.2.6\lib\tiff.lib
-\wx2.2.6\lib\wx.lib
-\wx2.2.6\lib\xpm.lib
-\wx2.2.6\lib\zlib.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\RSPB9.tmp"
+Creating command line "link.exe -lib @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPAF.tmp"
<h3>Output Window</h3>
Compiling...
-dlgezplot.cpp
+projections.cpp
+Creating library...
+<h3>
+--------------------Configuration: ctsim - Win32 Debug--------------------
+</h3>
+<h3>Command Lines</h3>
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPB0.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
+]
+Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPB0.tmp"
+<h3>Output Window</h3>
Linking...
-LINK : warning LNK4089: all references to "WSOCK32.dll" discarded by /OPT:REF
<h3>Results</h3>
-ctsim.exe - 0 error(s), 1 warning(s)
+ctsim.exe - 0 error(s), 0 warning(s)
</pre>
</body>
</html>
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\tools\nographics.h
-# End Source File
# End Group
# Begin Group "Resource Files"
# End Source File
# Begin Source File
+SOURCE=..\..\include\nographics.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\include\phantom.h
# End Source File
# Begin Source File
#define IDH_DLG_COMPARISON 8611
#define IDH_DLG_PREFERENCES 8612
#define IDH_DLG_POLAR 8613
+#define IDH_DLG_FFT_POLAR 8614
+#define IDH_DLG_RECON_FOURIER 8615
// Need to add to .tex file
#define IDH_DLG_IMPORT 8614
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: ctsim.cpp,v 1.100 2001/03/29 21:25:50 kevin Exp $
+** $Id: ctsim.cpp,v 1.101 2001/03/30 19:17:32 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
#endif
#endif
-static const char* rcsindent = "$Id: ctsim.cpp,v 1.100 2001/03/29 21:25:50 kevin Exp $";
+static const char* rcsindent = "$Id: ctsim.cpp,v 1.101 2001/03/30 19:17:32 kevin Exp $";
struct option CTSimApp::ctsimOptions[] =
{
if (lFreeMem > 0)
*theApp->getLog() << ", Free Memory: " << lFreeMem << " MB";
*theApp->getLog() << ", wxWindows: " << wxVERSION_STRING;
+#ifdef __TIMESTAMP__
+ *theApp->getLog() << ", Build Date: " << __TIMESTAMP__;
+#endif
#if defined(DEBUG)
- *theApp->getLog() << ", Debug version";
+ *theApp->getLog() << ", CTSim Debug version";
#else
- *theApp->getLog() << ", Release version";
+ *theApp->getLog() << ", CTSim Release version";
#endif
*theApp->getLog() << "\n";
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: dialogs.cpp,v 1.53 2001/03/29 21:25:50 kevin Exp $
+** $Id: dialogs.cpp,v 1.54 2001/03/30 19:17:32 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
/////////////////////////////////////////////////////////////////////
DialogGetConvertPolarParameters::DialogGetConvertPolarParameters (wxWindow* pParent, const char* const pszTitle,
- int iDefaultXSize, int iDefaultYSize, int iDefaultInterpolationID, int iDefaultZeropad)
+ int iDefaultXSize, int iDefaultYSize, int iDefaultInterpolationID, int iDefaultZeropad, int iHelpID)
: wxDialog (pParent, -1, _T(pszTitle), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
{
m_iDefaultXSize = iDefaultXSize;
pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
- CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_POLAR);
+ CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, iHelpID);
pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: dialogs.h,v 1.35 2001/03/13 04:44:25 kevin Exp $
+** $Id: dialogs.h,v 1.36 2001/03/30 19:17:32 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
#include "procsignal.h"
#include "filter.h"
#include "projections.h"
+#include "ctsim-map.h"
class CTSimHelpButton : public wxButton
public:
DialogGetConvertPolarParameters (wxWindow* pParent, const char* const pszTitle, int iDefaultXSize = 0,
int iDefaultYSize = 0, int iDefaultInterpolationID = Projections::POLAR_INTERP_BILINEAR,
- int iDefaultZeropad = 1);
+ int iDefaultZeropad = 1, int iHelpID = IDH_DLG_POLAR);
virtual ~DialogGetConvertPolarParameters ();
unsigned int getXSize();
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: views.cpp,v 1.142 2001/03/30 19:15:23 kevin Exp $
+** $Id: views.cpp,v 1.143 2001/03/30 19:17:32 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
{
Projections& rProj = GetDocument()->getProjections();
DialogGetConvertPolarParameters dialogPolar (getFrameForChild(), "Convert Polar", m_iDefaultPolarNX, m_iDefaultPolarNY,
- m_iDefaultPolarInterpolation, -1);
+ m_iDefaultPolarInterpolation, -1, IDH_DLG_POLAR);
if (dialogPolar.ShowModal() == wxID_OK) {
wxProgressDialog dlgProgress (wxString("Convert Polar"), wxString("Conversion Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
wxString strInterpolation (dialogPolar.getInterpolationName());
{
Projections& rProj = GetDocument()->getProjections();
DialogGetConvertPolarParameters dialogPolar (getFrameForChild(), "Convert to FFT Polar", m_iDefaultPolarNX, m_iDefaultPolarNY,
- m_iDefaultPolarInterpolation, m_iDefaultPolarZeropad);
+ m_iDefaultPolarInterpolation, m_iDefaultPolarZeropad, IDH_DLG_FFT_POLAR);
if (dialogPolar.ShowModal() == wxID_OK) {
wxProgressDialog dlgProgress (wxString("Convert FFT Polar"), wxString("Conversion Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
wxString strInterpolation (dialogPolar.getInterpolationName());
{
Projections& rProj = GetDocument()->getProjections();
DialogGetConvertPolarParameters dialogPolar (getFrameForChild(), "Fourier Reconstruction", m_iDefaultPolarNX, m_iDefaultPolarNY,
- m_iDefaultPolarInterpolation, m_iDefaultPolarZeropad);
+ m_iDefaultPolarInterpolation, m_iDefaultPolarZeropad, IDH_DLG_RECON_FOURIER);
if (dialogPolar.ShowModal() == wxID_OK) {
wxProgressDialog dlgProgress (wxString("Reconstruction Fourier"), wxString("Reconstruction Progress"), 1, getFrameForChild(), wxPD_APP_MODAL);
wxString strInterpolation (dialogPolar.getInterpolationName());