# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /G6 /MT /W3 /GR /GX /O2 /I "...\..\..\fftw-2.1.3\fftw" /I "\wx2.2.5\include" /I "\wx2.2.5\src\png" /I "\wx2.2.5\src\zlib" /I "..\..\include" /I "..\..\getopt" /I "..\..\..\fftw-2.1.3\rfftw" /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 CTSIMVERSION=\"3.0.0beta1\" /FR /YX /FD /c
+# ADD CPP /nologo /G6 /MT /W3 /GR /GX /O2 /I "..\..\..\fftw-2.1.3\fftw" /I "\wx2.2.5\include" /I "\wx2.2.5\src\png" /I "\wx2.2.5\src\zlib" /I "..\..\include" /I "..\..\getopt" /I "..\..\..\fftw-2.1.3\rfftw" /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 CTSIMVERSION=\"3.0.0beta1\" /FR /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
-# ADD LINK32 kernel32.lib user32.lib wsock32.lib comctl32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tiff.lib jpeg.lib png.lib zlib.lib xpm.lib /nologo /subsystem:windows /machine:I386
+# ADD LINK32 kernel32.lib user32.lib wsock32.lib comctl32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tiff.lib jpeg.lib png.lib zlib.lib xpm.lib opengl32.lib glu32.lib /nologo /subsystem:windows /machine:I386 /libpath:"\wx2.2.5\lib"
!ELSEIF "$(CFG)" == "ctsim - Win32 Debug"
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 comctl32.lib winmm.lib rpcrt4.lib ws2_32.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 ../libctsim/Debug/libctsim.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 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 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"\wx2.2.5\lib"
+# ADD LINK32 comctl32.lib winmm.lib rpcrt4.lib ws2_32.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 ../libctsim/Debug/libctsim.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 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 opengl32.lib glu32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"\wx2.2.5\lib"
# SUBTRACT LINK32 /nodefaultlib
!ENDIF
# Begin Source File
SOURCE=..\..\src\ctsim.cpp
+
+!IF "$(CFG)" == "ctsim - Win32 Release"
+
+# ADD CPP /I "..\..\..\fftw-2.1.3\fftw" /D CTSIMVERSION=\"3.0.0alpha5\"
+# SUBTRACT CPP /D CTSIMVERSION=\"3.0.0beta1\"
+
+!ELSEIF "$(CFG)" == "ctsim - Win32 Debug"
+
# ADD CPP /D CTSIMVERSION=\"3.0.0alpha5\"
# SUBTRACT CPP /D CTSIMVERSION=\"3.0.0beta1\"
+
+!ENDIF
+
# End Source File
# Begin Source File
SOURCE=..\..\src\dialogs.cpp
+
+!IF "$(CFG)" == "ctsim - Win32 Release"
+
+# ADD CPP /I "..\..\..\fftw-2.1.3\fftw" /D CTSIMVERSION=\"3.0.0alpha5\"
+# SUBTRACT CPP /D CTSIMVERSION=\"3.0.0beta1\"
+
+!ELSEIF "$(CFG)" == "ctsim - Win32 Debug"
+
# ADD CPP /D CTSIMVERSION=\"3.0.0alpha5\"
# SUBTRACT CPP /D CTSIMVERSION=\"3.0.0beta1\"
+
+!ENDIF
+
# End Source File
# Begin Source File
SOURCE=..\..\src\dlgprojections.cpp
+
+!IF "$(CFG)" == "ctsim - Win32 Release"
+
+# ADD CPP /I "..\..\..\fftw-2.1.3\fftw" /D CTSIMVERSION=\"3.0.0alpha5\"
+# SUBTRACT CPP /D CTSIMVERSION=\"3.0.0beta1\"
+
+!ELSEIF "$(CFG)" == "ctsim - Win32 Debug"
+
# ADD CPP /D CTSIMVERSION=\"3.0.0alpha5\"
# SUBTRACT CPP /D CTSIMVERSION=\"3.0.0beta1\"
+
+!ENDIF
+
# End Source File
# Begin Source File
SOURCE=..\..\src\dlgreconstruct.cpp
+
+!IF "$(CFG)" == "ctsim - Win32 Release"
+
+# ADD CPP /I "..\..\..\fftw-2.1.3\fftw" /D CTSIMVERSION=\"3.0.0alpha5\"
+# SUBTRACT CPP /D CTSIMVERSION=\"3.0.0beta1\"
+
+!ELSEIF "$(CFG)" == "ctsim - Win32 Debug"
+
# ADD CPP /D CTSIMVERSION=\"3.0.0alpha5\"
# SUBTRACT CPP /D CTSIMVERSION=\"3.0.0beta1\"
+
+!ENDIF
+
# End Source File
# Begin Source File
SOURCE=..\..\src\docs.cpp
+
+!IF "$(CFG)" == "ctsim - Win32 Release"
+
+# ADD CPP /I "..\..\..\fftw-2.1.3\fftw" /D CTSIMVERSION=\"3.0.0alpha5\"
+# SUBTRACT CPP /D CTSIMVERSION=\"3.0.0beta1\"
+
+!ELSEIF "$(CFG)" == "ctsim - Win32 Debug"
+
# ADD CPP /D CTSIMVERSION=\"3.0.0alpha5\"
# SUBTRACT CPP /D CTSIMVERSION=\"3.0.0beta1\"
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\graph3dview.cpp
+
+!IF "$(CFG)" == "ctsim - Win32 Release"
+
+# ADD CPP /I "..\..\..\fftw-2.1.3\fftw"
+
+!ELSEIF "$(CFG)" == "ctsim - Win32 Debug"
+
+!ENDIF
+
# End Source File
# Begin Source File
SOURCE=..\..\src\views.cpp
+
+!IF "$(CFG)" == "ctsim - Win32 Release"
+
+# ADD CPP /I "..\..\..\fftw-2.1.3\fftw" /D CTSIMVERSION=\"3.0.0alpha5\"
+# SUBTRACT CPP /D CTSIMVERSION=\"3.0.0beta1\"
+
+!ELSEIF "$(CFG)" == "ctsim - Win32 Debug"
+
# ADD CPP /D CTSIMVERSION=\"3.0.0alpha5\"
# SUBTRACT CPP /D CTSIMVERSION=\"3.0.0beta1\"
+
+!ENDIF
+
# End Source File
# End Group
# Begin Group "Header Files"
# End Source File
# Begin Source File
+SOURCE=..\..\src\graph3dview.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\src\views.h
# End Source File
# End Group
--------------------Configuration: ctsim - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP8EB.tmp" with contents
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPA82.tmp" with contents
[
-/nologo /G6 /MTd /W3 /Gm /Gi /GR /GX /Zi /Od /Gy /I "\wx2.2.5\include" /I "..\..\..\fftw-2.1.3\fftw" /I "\wx2.2.5\src\png" /I "\wx2.2.5\src\zlib" /I "..\..\include" /I "..\..\getopt" /I "..\..\..\fftw-2.1.3\rfftw" /D VERSION=\"3.0.0beta1\" /D "_DEBUG" /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 CTSIMVERSION=\"3.0.0alpha5\" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
-"C:\ctsim\src\docs.cpp"
+/nologo /G6 /MTd /W3 /Gm /Gi /GR /GX /Zi /Od /Gy /I "\wx2.2.5\include" /I "..\..\..\fftw-2.1.3\fftw" /I "\wx2.2.5\src\png" /I "\wx2.2.5\src\zlib" /I "..\..\include" /I "..\..\getopt" /I "..\..\..\fftw-2.1.3\rfftw" /D VERSION=\"3.0.0beta1\" /D "_DEBUG" /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 CTSIMVERSION=\"3.0.0beta1\" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
+"C:\ctsim\src\graph3dview.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP8EB.tmp"
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP8EC.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPA82.tmp"
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPA83.tmp" with contents
[
-comctl32.lib winmm.lib rpcrt4.lib ws2_32.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 ../libctsim/Debug/libctsim.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 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 /nologo /subsystem:windows /incremental:yes /pdb:"Debug/ctsim.pdb" /debug /machine:I386 /out:"Debug/ctsim.exe" /pdbtype:sept /libpath:"\wx2.2.5\lib"
+comctl32.lib winmm.lib rpcrt4.lib ws2_32.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 ../libctsim/Debug/libctsim.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 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 opengl32.lib glu32.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/ctsim.pdb" /debug /machine:I386 /out:"Debug/ctsim.exe" /pdbtype:sept /libpath:"\wx2.2.5\lib"
.\Debug\ctsim.obj
.\Debug\dialogs.obj
.\Debug\dlgprojections.obj
.\Debug\docs.obj
.\Debug\views.obj
.\Debug\ctsim.res
+.\Debug\graph3dview.obj
\ctsim\msvc\libctsim\Debug\libctsim.lib
"\fftw-2.1.3\Win32\FFTW2st\Debug\FFTW2st.lib"
"\fftw-2.1.3\Win32\RFFTW2st\Debug\RFFTW2st.lib"
\wx2.2.5\lib\jpegd.lib
\wx2.2.5\lib\pngd.lib
-\wx2.2.5\lib\tiffd.lib
\wx2.2.5\lib\wxd.lib
\wx2.2.5\lib\xpmd.lib
\wx2.2.5\lib\zlibd.lib
+\wx2.2.5\lib\tiffd.lib
]
-Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP8EC.tmp"
+Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPA83.tmp"
<h3>Output Window</h3>
Compiling...
-docs.cpp
+graph3dview.cpp
+C:\ctsim\src\graph3dview.cpp(222) : warning C4101: 'n2' : unreferenced local variable
+C:\ctsim\src\graph3dview.cpp(222) : warning C4101: 'n3' : unreferenced local variable
+C:\ctsim\src\graph3dview.cpp(222) : warning C4101: 'n4' : unreferenced local variable
+C:\ctsim\src\graph3dview.cpp(292) : warning C4305: 'initializing' : truncation from 'const double' to 'float'
+C:\ctsim\src\graph3dview.cpp(292) : warning C4305: 'initializing' : truncation from 'const double' to 'float'
+C:\ctsim\src\graph3dview.cpp(292) : warning C4305: 'initializing' : truncation from 'const double' to 'float'
+C:\ctsim\src\graph3dview.cpp(297) : warning C4305: 'initializing' : truncation from 'const double' to 'float'
+C:\ctsim\src\graph3dview.cpp(297) : warning C4305: 'initializing' : truncation from 'const double' to 'float'
+C:\ctsim\src\graph3dview.cpp(297) : warning C4305: 'initializing' : truncation from 'const double' to 'float'
+C:\ctsim\src\graph3dview.cpp(298) : warning C4305: 'initializing' : truncation from 'const double' to 'float'
+C:\ctsim\src\graph3dview.cpp(298) : warning C4305: 'initializing' : truncation from 'const double' to 'float'
Linking...
<h3>Results</h3>
-ctsim.exe - 0 error(s), 0 warning(s)
+ctsim.exe - 0 error(s), 11 warning(s)
</pre>
</body>
</html>
###############################################################################
+Project: "IsosurfVC"=..\..\wx2.2.5\samples\opengl\isosurf\IsosurfVC.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
Project: "RFFTW2st"="..\..\fftw-2.1.3\Win32\RFFTW2st\RFFTW2st.dsp" - Package Owner=<4>
Package=<5>
Project_Dep_Name png
End Project Dependency
Begin Project Dependency
- Project_Dep_Name tiff
- End Project Dependency
- Begin Project Dependency
Project_Dep_Name wxvc
End Project Dependency
Begin Project Dependency
Begin Project Dependency
Project_Dep_Name zlib
End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name tiff
+ End Project Dependency
}}}
###############################################################################
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: ctsim.cpp,v 1.61 2001/01/30 07:32:13 kevin Exp $
+** $Id: ctsim.cpp,v 1.62 2001/01/30 10:58:13 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.61 2001/01/30 07:32:13 kevin Exp $";
+static const char* rcsindent = "$Id: ctsim.cpp,v 1.62 2001/01/30 10:58:13 kevin Exp $";
struct option CTSimApp::ctsimOptions[] =
{
return newDoc;
}
+
+
+Graph3dFileDocument*
+CTSimApp::newGraph3dDoc()
+{
+ Graph3dFileDocument* newDoc = dynamic_cast<Graph3dFileDocument*>(m_pDocTemplGraph3d->CreateDocument (""));
+ if (newDoc) {
+ Graph3dFileView* pView = newDoc->getView();
+ if (pView) {
+ wxFrame* pFrame = pView->getFrame();
+ if (pFrame)
+ pFrame->SetSize (0,0);
+ }
+ newDoc->SetDocumentName (m_pDocTemplGraph3d->GetDocumentName());
+ newDoc->SetDocumentTemplate (m_pDocTemplGraph3d);
+ newDoc->OnNewDocument();
+ }
+
+ return newDoc;
+}
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: ctsim.h,v 1.37 2001/01/30 07:32:13 kevin Exp $
+** $Id: ctsim.h,v 1.38 2001/01/30 10:58:13 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
class PhantomFileDocument;
class PlotFileDocument;
class TextFileDocument;
+class Graph3dFileDocument;
#include <vector>
#include "wx/docview.h"
PhantomFileDocument* newPhantomDoc();
PlotFileDocument* newPlotDoc();
TextFileDocument* newTextDoc();
-
+ Graph3dFileDocument* newGraph3dDoc();
};
DECLARE_APP(CTSimApp)
IFMENU_IMAGE_SUBTRACT,
IFMENU_IMAGE_MULTIPLY,
IFMENU_IMAGE_DIVIDE,
+ IFMENU_IMAGE_CONVERT3D,
IFMENU_FILTER_INVERTVALUES,
IFMENU_FILTER_SQRT,
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: docs.cpp,v 1.19 2001/01/30 07:32:13 kevin Exp $
+** $Id: docs.cpp,v 1.20 2001/01/30 10:58:13 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
IMPLEMENT_DYNAMIC_CLASS(Graph3dFileDocument, wxDocument)
+Graph3dFileDocument::Graph3dFileDocument(void)
+: m_bBadFileOpen(false), m_nVertices(0), m_pVertices(0), m_pNormals(0)
+{
+}
+
+Graph3dFileDocument::~Graph3dFileDocument()
+{
+ delete [] m_pVertices;
+ delete [] m_pNormals;
+}
+
bool
Graph3dFileDocument::OnSaveDocument(const wxString& filename)
{
return dynamic_cast<Graph3dFileView*>(GetFirstView());
}
+bool
+Graph3dFileDocument::createFromImageFile (const ImageFile& rImageFile)
+{
+ delete [] m_pVertices;
+ delete [] m_pNormals;
+
+ m_nx = rImageFile.nx();
+ m_ny = rImageFile.ny();
+ m_array = rImageFile.getArray();
+#if 0
+ const int nTriangles = nx * ny;
+ m_nVertices = nTriangles;
+ m_pVertices = new glTripleFloat [nTriangles];
+ m_pNormals = new glTripleFloat [nTriangles];
+
+ for (unsigned int ix = 0; ix < nx; ix++) {
+ for (unsigned int iy = 0; iy < ny; iy++) {
+ const int iTriangle = ix * iy;
+ m_pVertices[iTriangle][0] = ix;
+ m_pVertices[iTriangle][1] = iy;
+ m_pVertices[iTriangle][2] = v[ix][iy];
+ m_pNormals[iTriangle][0] = 0;
+ m_pNormals[iTriangle][1] = 0;
+ m_pNormals[iTriangle][2] = 0;
+ }
+ }
+#endif
+ return true;
+}
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: docs.h,v 1.18 2001/01/30 07:32:13 kevin Exp $
+** $Id: docs.h,v 1.19 2001/01/30 10:58:13 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 <GL/gl.h>
+#include <GL/glu.h>
+
+typedef GLfloat glTripleFloat[3];
+
class Graph3dFileDocument: public wxDocument
{
+ friend Graph3dFileView;
+
private:
DECLARE_DYNAMIC_CLASS(Graph3dFileDocument)
- ImageFile* m_pImageFile;
bool m_bBadFileOpen;
+ GLint m_nVertices;
+ glTripleFloat* m_pVertices;
+ glTripleFloat* m_pNormals;
+ unsigned int m_nx;
+ unsigned int m_ny;
+ ImageFileArray m_array;
public:
- Graph3dFileDocument(void)
- : m_bBadFileOpen(false)
- {
- m_pImageFile = new ImageFile;
- }
-
- virtual ~Graph3dFileDocument(void)
- {
- delete m_pImageFile;
- }
-
+ Graph3dFileDocument(void);
+ virtual ~Graph3dFileDocument(void);
+
virtual bool OnSaveDocument (const wxString& filename);
virtual bool OnOpenDocument (const wxString& filename);
virtual bool IsModified () const;
Graph3dFileView* getView() const;
bool getBadFileOpen() const { return m_bBadFileOpen; }
void setBadFileOpen() { m_bBadFileOpen = true; }
- void setImageFile (ImageFile* pImageFile) { delete m_pImageFile; m_pImageFile = pImageFile; }
- ImageFile& getImageFile() { return *m_pImageFile; }
- const ImageFile& getImageFile() const { return *m_pImageFile; }
-
+ bool createFromImageFile (const ImageFile& rImageFile);
};
#endif
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: graph3dview.cpp,v 1.1 2001/01/30 07:32:13 kevin Exp $
+** $Id: graph3dview.cpp,v 1.2 2001/01/30 10:58:13 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
{
Graph3dFileCanvas* pCanvas;
int width, height;
- parent->GetClientSize(&width, &height);
+ parent->GetClientSize (&width, &height);
#ifdef __WXMSW__
int *gl_attrib = NULL;
pCanvas = new Graph3dFileCanvas (this, parent, wxPoint(0, 0), wxSize(200, 200), 0, gl_attrib);
- pCanvas->SetScrollbars(20, 20, 50, 50);
pCanvas->SetBackgroundColour(*wxWHITE);
pCanvas->Clear();
void
Graph3dFileView::DrawSurface()
{
+ int nVertices = GetDocument()->m_nVertices;
+ glTripleFloat* pVertices = GetDocument()->m_pVertices;
+ glTripleFloat* pNormals = GetDocument()->m_pNormals;
+
#ifdef GL_EXT_vertex_array
if (m_bUseVertexArrays) {
- glDrawArraysEXT( GL_TRIANGLE_STRIP, 0, m_nVerts );
+ glDrawArraysEXT( GL_TRIANGLE_STRIP, 0, nVertices );
}
else {
#endif
- glBegin( GL_TRIANGLE_STRIP );
- for (GLint i = 0;i < m_nVerts; i++) {
- // glNormal3fv( &m_vecNorms[i] );
- // glVertex3fv( &m_vecVerts[i] );
+#if 0
+// glBegin( GL_TRIANGLE_STRIP );
+ //glBegin (GL_QUADS);
+ //glNormal3f (0.0, 0.0, 1.0); glVertex3f (-1.0, -1.0, 0.0); glVertex3f (0.0, -1.0, 0.0); glVertex3f (0.0, 0.0, 0.0); glVertex3f (-1.0, 0.0, 0.0); glNormal3f (0.0, 0.0, 1.0); glVertex3f (0.0, -1.0, 0.0); glVertex3f (1.0, -1.0, 0.0); glVertex3f (1.0, 0.0, 0.0); glVertex3f (0.0, 0.0, 0.0); glNormal3f (0.0, 0.0, 1.0); glVertex3f (0.0, 0.0, 0.0); glVertex3f (1.0, 0.0, 0.0); glVertex3f (1.0, 1.0, 0.0); glVertex3f (0.0, 1.0, 0.0); glNormal3f (0.0, 0.0, 1.0); glVertex3f (0.0, 0.0, 0.0); glVertex3f (0.0, 1.0, 0.0); glVertex3f (-1.0, 1.0, 0.0); glVertex3f (-1.0, 0.0, 0.0);
+ glColor3f(1.0,1.0,1.0);
+ glBegin (GL_POINTS);
+ for (GLint i = 0;i < nVertices; i++) {
+ // glNormal3fv( &pNormals[i] );
+ glVertex3fv( pVertices[i] );
}
glEnd();
+#else
+ double edge = 1.;
+ unsigned int nx = GetDocument()->m_nx;
+ unsigned int ny = GetDocument()->m_ny;
+ const ImageFileArray v = GetDocument()->m_array;
+ double actOffset = 0;
+
+// glNewList(opnListNum++,GL_COMPILE);
+ for(int ix = 0; ix < nx-1; ix++){
+ for(int iy = 0; iy < ny-1; iy++){
+
+ float p1[3], p2[3], p3[3], p4[3];
+ float n1[3], n2[3], n3[3], n4[3];
+ glBegin(GL_LINE_LOOP);
+
+ p1[0] = edge*(iy); p1[1] = v[ix][iy] + actOffset; p1[2] = edge*(ix);
+ p2[0] = edge*(iy+1); p2[1] = v[ix+1][iy] + actOffset; p2[2] = edge*(ix );
+ p3[0] = edge*(iy+1); p3[1] = v[ix+1][iy] + actOffset; p3[2] = edge*(ix +1);
+ p4[0] = edge*(iy); p4[1] = v[ix][iy] + actOffset; p4[2] = edge*(ix +1);
+
+ n1[0] = -(p2[1] - p1[1])*(p3[2] - p1[2]) + (p2[2] - p1[2])*(p3[1] - p2[1]);
+ n1[1] = -(p2[2] - p1[2])*(p3[0] - p2[0]) + (p2[0] - p1[0])*(p3[2] - p2[2]);
+ n1[2] = -(p2[0] - p1[0])*(p3[1] - p2[1]) + (p2[1] - p1[1])*(p3[0] - p2[0]);
+
+ glVertex3fv(p1); glNormal3fv(n1);
+ glVertex3fv(p2); glNormal3fv(n1);
+ glVertex3fv(p3); glNormal3fv(n1);
+ glVertex3fv(p4); glNormal3fv(n1);
+ glEnd();
+ }
+
+ }
+ glEndList();
+
+#endif
#ifdef GL_EXT_vertex_array
}
#endif
void
Graph3dFileView::OnProperties (wxCommandEvent& event)
{
- const ImageFile& rIF = GetDocument()->getImageFile();
- if (rIF.nx() == 0 || rIF.ny() == 0)
- *theApp->getLog() << "Properties: empty imagefile\n";
- else {
- const std::string& rFilename = rIF.getFilename();
std::ostringstream os;
- double min, max, mean, mode, median, stddev;
- rIF.statistics (rIF.getArray(), min, max, mean, mode, median, stddev);
- os << "Filename: " << rFilename << "\n";
- os << "Size: (" << rIF.nx() << "," << rIF.ny() << ")\n";
- os << "Data type: ";
- if (rIF.isComplex())
- os << "Complex\n";
- else
- os << "Real\n";
- os << "Minimum: "<<min<<"\nMaximum: "<<max<<"\nMean: "<<mean<<"\nMedian: "<<median<<"\nMode: "<<mode<<"\nStandard Deviation: "<<stddev << "\n";
- if (rIF.isComplex()) {
- rIF.statistics (rIF.getImaginaryArray(), min, max, mean, mode, median, stddev);
- os << "Imaginary: min: "<<min<<"\nmax: "<<max<<"\nmean: "<<mean<<"\nmedian: "<<median<<"\nmode: "<<mode<<"\nstddev: "<<stddev << "\n";
- }
- if (rIF.nLabels() > 0) {
- rIF.printLabelsBrief (os);
- }
*theApp->getLog() << ">>>>\n" << os.str().c_str() << "<<<<\n";
wxMessageDialog dialogMsg (getFrameForChild(), os.str().c_str(), "Imagefile Properties", wxOK | wxICON_INFORMATION);
dialogMsg.ShowModal();
- }
}
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
- glFrustum( -1.0, 1.0, -1.0, 1.0, 5, 25 );
-
+ glOrtho (-100, 100, -100, 100, -500, 500);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
- glTranslatef( 0.0, 0.0, -6.0 );
+ glTranslatef( 100, -6, 100 );
-#ifdef GL_EXT_vertex_array
- if (m_bUseVertexArrays) {
- // glVertexPointerEXT( 3, GL_FLOAT, 0, m_nVerts, verts );
- // glNormalPointerEXT( GL_FLOAT, 0, m_nVerts, norms );
- glEnable( GL_VERTEX_ARRAY_EXT );
- glEnable( GL_NORMAL_ARRAY_EXT );
- }
-#endif
}
void
Graph3dFileView::OnUpdate (wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint) )
{
+ int nVertices = GetDocument()->m_nVertices;
+ glTripleFloat* pVertices = GetDocument()->m_pVertices;
+ glTripleFloat* pNormals = GetDocument()->m_pNormals;
+
+#if 0
const ImageFile& rIF = GetDocument()->getImageFile();
ImageFileArrayConst v = rIF.getArray();
int nx = rIF.nx();
int ny = rIF.ny();
if (v != NULL && nx != 0 && ny != 0) {
-#if 0
unsigned char* imageData = new unsigned char [nx * ny * 3];
for (int ix = 0; ix < nx; ix++) {
for (int iy = 0; iy < ny; iy++) {
m_pFrame->SetClientSize (xSize, ySize);
m_pCanvas->SetScrollbars(20, 20, nx/20, ny/20);
m_pCanvas->SetBackgroundColour(*wxWHITE);
-#endif
}
+#endif
+#ifdef GL_EXT_vertex_array
+ if (m_bUseVertexArrays) {
+ // glVertexPointerEXT( 3, GL_FLOAT, 0, nVertices, pVertices );
+ // glNormalPointerEXT( GL_FLOAT, 0, nVertices, pNormals );
+ glEnable( GL_VERTEX_ARRAY_EXT );
+ glEnable( GL_NORMAL_ARRAY_EXT );
+ }
+#endif
if (m_pCanvas)
m_pCanvas->Refresh();
}
m_pFileMenu->Append(wxID_SAVE, "&Save\tCtrl-S");
m_pFileMenu->Append(wxID_SAVEAS, "Save &As...");
m_pFileMenu->Append(wxID_CLOSE, "&Close\tCtrl-W");
- m_pFileMenu->Append(wxID_REVERT, "Re&vert");
m_pFileMenu->AppendSeparator();
m_pFileMenu->Append(IFMENU_FILE_PROPERTIES, "P&roperties");
- m_pFileMenu->Append(IFMENU_FILE_EXPORT, "&Export...");
m_pFileMenu->AppendSeparator();
m_pFileMenu->Append(wxID_PRINT, "&Print...");
GetDocumentManager()->FileHistoryAddFilesToMenu(m_pFileMenu);
GetDocumentManager()->FileHistoryUseMenu(m_pFileMenu);
- wxMenu *view_menu = new wxMenu;
- view_menu->Append(IFMENU_VIEW_SCALE_MINMAX, "Display Scale S&et...\tCtrl-E");
- view_menu->Append(IFMENU_VIEW_SCALE_AUTO, "Display Scale &Auto...\tCtrl-A");
- view_menu->Append(IFMENU_VIEW_SCALE_FULL, "Display F&ull Scale\tCtrl-U");
-
- wxMenu* filter_menu = new wxMenu;
- filter_menu->Append (IFMENU_FILTER_INVERTVALUES, "&Invert Values");
- filter_menu->Append (IFMENU_FILTER_SQUARE, "&Square");
- filter_menu->Append (IFMENU_FILTER_SQRT, "Square &Root");
- filter_menu->Append (IFMENU_FILTER_LOG, "&Log");
- filter_menu->Append (IFMENU_FILTER_EXP, "&Exp");
- filter_menu->AppendSeparator();
-#ifdef HAVE_FFT
- filter_menu->Append (IFMENU_FILTER_FFT, "2D &FFT");
- filter_menu->Append (IFMENU_FILTER_IFFT, "2D &IFFT");
- filter_menu->Append (IFMENU_FILTER_FFT_ROWS, "FFT Rows");
- filter_menu->Append (IFMENU_FILTER_IFFT_ROWS, "IFFT Rows");
- filter_menu->Append (IFMENU_FILTER_FFT_COLS, "FFT Columns");
- filter_menu->Append (IFMENU_FILTER_IFFT_COLS, "IFFT Columns");
- filter_menu->Append (IFMENU_FILTER_FOURIER, "F&ourier");
- filter_menu->Append (IFMENU_FILTER_INVERSE_FOURIER, "Inverse Fo&urier");
-#else
- filter_menu->Append (IFMENU_FILTER_FOURIER, "&Fourier");
- filter_menu->Append (IFMENU_FILTER_INVERSE_FOURIER, "&Inverse Fourier");
-#endif
- filter_menu->Append (IFMENU_FILTER_SHUFFLEFOURIERTONATURALORDER, "S&huffle Fourier to Natural Order");
- filter_menu->Append (IFMENU_FILTER_SHUFFLENATURALTOFOURIERORDER, "Shu&ffle Natural to Fourier Order");
- filter_menu->Append (IFMENU_FILTER_MAGNITUDE, "&Magnitude");
- filter_menu->Append (IFMENU_FILTER_PHASE, "&Phase");
-
wxMenu *help_menu = new wxMenu;
help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents\tF1");
help_menu->Append(MAINMENU_HELP_TOPICS, "&Topics\tCtrl-H");
wxMenuBar *menu_bar = new wxMenuBar;
menu_bar->Append(m_pFileMenu, "&File");
- menu_bar->Append(view_menu, "&View");
- menu_bar->Append(filter_menu, "Fi<er");
menu_bar->Append(help_menu, "&Help");
subframe->SetMenuBar(menu_bar);
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: graph3dview.h,v 1.1 2001/01/30 07:32:13 kevin Exp $
+** $Id: graph3dview.h,v 1.2 2001/01/30 10:58:13 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 <GL/glu.h>
-typedef GLfloat glTripleFloat[3];
-
class Graph3dFileCanvas;
class Graph3dFileView : public wxView
{
wxMenu* m_pFileMenu;
GLfloat m_dXRotate;
GLfloat m_dYRotate;
- std::vector<glTripleFloat> m_vecVerts;
- std::vector<glTripleFloat> m_vecNorms;
- GLint m_nVerts;
GLboolean m_bUseVertexArrays;
GLboolean m_bDoubleBuffer;
GLboolean m_bSmooth;
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: views.cpp,v 1.92 2001/01/30 07:32:13 kevin Exp $
+** $Id: views.cpp,v 1.93 2001/01/30 10:58:13 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
EVT_MENU(IFMENU_IMAGE_MULTIPLY, ImageFileView::OnMultiply)
EVT_MENU(IFMENU_IMAGE_DIVIDE, ImageFileView::OnDivide)
EVT_MENU(IFMENU_IMAGE_SCALESIZE, ImageFileView::OnScaleSize)
+EVT_MENU(IFMENU_IMAGE_CONVERT3D, ImageFileView::OnConvert3d)
#ifdef HAVE_FFT
EVT_MENU(IFMENU_FILTER_FFT, ImageFileView::OnFFT)
EVT_MENU(IFMENU_FILTER_IFFT, ImageFileView::OnIFFT)
image_menu->Append (IFMENU_IMAGE_DIVIDE, "&Divide...");
image_menu->AppendSeparator();
image_menu->Append (IFMENU_IMAGE_SCALESIZE, "S&cale Size...");
+ image_menu->Append (IFMENU_IMAGE_CONVERT3D, "Convert &3-D\tCtrl-3");
m_pMenuAnalyze = new wxMenu;
m_pMenuAnalyze->Append (IFMENU_PLOT_ROW, "Plot &Row");
subframe->Centre(wxBOTH);
- wxAcceleratorEntry accelEntries[10];
+ wxAcceleratorEntry accelEntries[11];
accelEntries[0].Set (wxACCEL_CTRL, static_cast<int>('O'), wxID_OPEN);
accelEntries[1].Set (wxACCEL_CTRL, static_cast<int>('S'), wxID_SAVE);
accelEntries[2].Set (wxACCEL_CTRL, static_cast<int>('W'), wxID_CLOSE);
accelEntries[7].Set (wxACCEL_CTRL, static_cast<int>('A'), IFMENU_VIEW_SCALE_AUTO);
accelEntries[8].Set (wxACCEL_CTRL, static_cast<int>('U'), IFMENU_VIEW_SCALE_FULL);
accelEntries[9].Set (wxACCEL_CTRL, static_cast<int>('E'), IFMENU_VIEW_SCALE_MINMAX);
- wxAcceleratorTable accelTable (10, accelEntries);
+ accelEntries[0].Set (wxACCEL_CTRL, static_cast<int>('3'), IFMENU_IMAGE_CONVERT3D);
+ wxAcceleratorTable accelTable (11, accelEntries);
subframe->SetAcceleratorTable (accelTable);
return subframe;
}
}
+void
+ImageFileView::OnConvert3d (wxCommandEvent& event)
+{
+ ImageFile& rIF = GetDocument()->getImageFile();
+ Graph3dFileDocument* pGraph3d = theApp->newGraph3dDoc();
+ pGraph3d->setBadFileOpen();
+ pGraph3d->createFromImageFile (rIF);
+ pGraph3d->getView()->getFrame()->SetClientSize (200, 200);
+ pGraph3d->getView()->getFrame()->Show (true);
+}
+
void
ImageFileView::OnPlotRow (wxCommandEvent& event)
{
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: views.h,v 1.42 2001/01/30 07:32:13 kevin Exp $
+** $Id: views.h,v 1.43 2001/01/30 10:58:14 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
void OnInverseFourier (wxCommandEvent& event);
void OnShuffleNaturalToFourierOrder (wxCommandEvent& event);
void OnShuffleFourierToNaturalOrder (wxCommandEvent& event);
+ void OnConvert3d (wxCommandEvent& event);
#ifdef HAVE_FFT
void OnFFT (wxCommandEvent& event);