Skip to content

Commit

Permalink
The code can be successfully built by QT 5.12.7 on WSL Ubuntu 18.04 G…
Browse files Browse the repository at this point in the history
…CC 7.4.0 (build.wsl, ~/qmake), and also by QT 4.8.6 on Windows 10 vs 2013 (build_ msvc.bat , qmake.bat)
  • Loading branch information
ruanzongcai committed Nov 17, 2020
1 parent 7b08f3a commit b7dd4ef
Show file tree
Hide file tree
Showing 40 changed files with 120 additions and 54 deletions.
2 changes: 1 addition & 1 deletion build.wsl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

cd v3d_main

sh ./build.wsl $*
sh ./build_qt5.wsl $*

cd ../

14 changes: 8 additions & 6 deletions build_msvc.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
:: echo %#
:: if %# gtr 1 (
if "%1" == "clean" (
echo clean moc_* ui_* qrc_* *.o
del .\v3d\moc_*
del .\v3d\ui_*
del .\v3d\qrc_*
del .\v3d\*.o
echo clean moc_* ui_* qrc_* *.obj
del v3d_main\v3d\moc_*
del v3d_main\v3d\ui_*
del v3d_main\v3d\qrc_*
del v3d_main\v3d\*.obj
goto end
)
:: )
@echo on
Expand Down Expand Up @@ -55,4 +56,5 @@ copy ..\v3d_main\v3d\release\vaa3d_msvc.exe .\ /y
dir vaa3d_msvc.exe
:: vaa3d_msvc.exe

cd ..\
cd ..\
:end
42 changes: 21 additions & 21 deletions v3d_main/3drenderer/GLee2glew.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,27 +61,27 @@ Since the actual OpenGL code makes no references to Qt, then it doesn't have to
//@2020-10-31 RZC: fixed crash by USING (glewExperimental=true) BEFORE glewInit() AT LINUX

#if 0// ! defined( USE_Qt5 )

#include <QtGui> ////for error: #error qdatastream.h must be included before any header file that defines Status
#define GLEW_STATIC ////STATIC link by including glew.c into GLee2glew.c
#include <glew/GL/glew.h>////STATIC link by including GLee_r.c into GLee2glew.c
//#undef GL_ARB_vertex_buffer_object
//#include "GLee_r.h"
#include <GL/glu.h> ////for error: gluErrorString was not declared in this scope

#if ! (defined(_WIN32) || defined(_WIN64))// old EXT only for WINDOWS
#define glBlendEquationEXT glBlendEquation
#define glBlendColorEXT glBlendColor
#define glTexImage3DEXT glTexImage3D
#define glTexSubImage3DEXT glTexSubImage3D
//#define glGenBuffersARB glGenBuffers
//#define glBindBufferARB glBindBuffer
//#define glDeleteBuffersARB glDeleteBuffers
//#define glMapBufferARB glMapBuffer
//#define glUnmapBufferARB glUnmapBuffer
//#define glBufferDataARB glBufferData
#endif

//
//#include <QtGui> ////for error: #error qdatastream.h must be included before any header file that defines Status
//#define GLEW_STATIC ////STATIC link by including glew.c into GLee2glew.c
//#include <glew/GL/glew.h>////STATIC link by including GLee_r.c into GLee2glew.c
////#undef GL_ARB_vertex_buffer_object
////#include "GLee_r.h"
//#include <GL/glu.h> ////for error: gluErrorString was not declared in this scope
//
//#if ! (defined(_WIN32) || defined(_WIN64))// old EXT only for WINDOWS
//#define glBlendEquationEXT glBlendEquation
//#define glBlendColorEXT glBlendColor
//#define glTexImage3DEXT glTexImage3D
//#define glTexSubImage3DEXT glTexSubImage3D
////#define glGenBuffersARB glGenBuffers
////#define glBindBufferARB glBindBuffer
////#define glDeleteBuffersARB glDeleteBuffers
////#define glMapBufferARB glMapBuffer
////#define glUnmapBufferARB glUnmapBuffer
////#define glBufferDataARB glBufferData
//#endif
//
#else

#define GLEW_STATIC ////STATIC link by including glew.c into GLee2glew.c
Expand Down
9 changes: 5 additions & 4 deletions v3d_main/3drenderer/nstroke_tracing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
2. You agree to appropriately cite this work in your related studies and publications.
Peng, H., Ruan, Z., Long, F., Simpson, J.H., and Myers, E.W. (2010) V3D enables real-time 3D visualization and quantitative analysis of large-scale biological image data sets, Nature Biotechnology, Vol. 28, No. 4, pp. 348-353, DOI: 10.1038/nbt.1612. ( http://penglab.janelia.org/papersall/docpdf/2010_NBT_V3D.pdf )
Peng, H., Ruan, Z., Long, F., Simpson, J.H., and Myers, E.W. (2010) V3D enables real-time 3D visualization and quantitative analysis of large-scale biological image data sets,鈥� Nature Biotechnology, Vol. 28, No. 4, pp. 348-353, DOI: 10.1038/nbt.1612. ( http://penglab.janelia.org/papersall/docpdf/2010_NBT_V3D.pdf )
Peng, H, Ruan, Z., Atasoy, D., and Sternson, S. (2010) Automatic reconstruction of 3D neuron structures using a graph-augmented deformable model, Bioinformatics, Vol. 26, pp. i38-i46, 2010. ( http://penglab.janelia.org/papersall/docpdf/2010_Bioinfo_GD_ISMB2010.pdf )
Peng, H, Ruan, Z., Atasoy, D., and Sternson, S. (2010) Automatic reconstruction of 3D neuron structures using a graph-augmented deformable model, Bioinformatics, Vol. 26, pp. i38-i46, 2010. ( http://penglab.janelia.org/papersall/docpdf/2010_Bioinfo_GD_ISMB2010.pdf )
3. This software is provided by the copyright holders (Hanchuan Peng), Howard Hughes Medical Institute, Janelia Farm Research Campus, and contributors "as is" and any express or implied warranties, including, but not limited to, any implied warranties of merchantability, non-infringement, or fitness for a particular purpose are disclaimed. In no event shall the copyright owner, Howard Hughes Medical Institute, Janelia Farm Research Campus, or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; reasonable royalties; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
Expand Down Expand Up @@ -54,7 +54,8 @@
*
*/

#include "renderer_gl1.h"
//#include "renderer_gl1.h"
#include "renderer_gl2.h"
#include "v3dr_glwidget.h"
#include "barFigureDialog.h"
#include "v3d_application.h"
Expand Down Expand Up @@ -1290,7 +1291,7 @@ void Renderer_gl1::adaptiveCurveResamplingRamerDouglasPeucker(vector <XYZ> &loc_

void Renderer_gl1::recursiveRamerDouglasPeucker(vector <XYZ> &loc_vec, vector <XYZ> &loc_vec_resampled, int start_i, int end_i, float epsilon)
{
// Recursive Ramer–Douglas–Peucker algorithm
// Recursive Ramer鈥揇ouglas鈥揚eucker algorithm
loc_vec_resampled.clear();
XYZ & loc_start = loc_vec.at(start_i);
XYZ & loc_final = loc_vec.at(end_i);
Expand Down
2 changes: 1 addition & 1 deletion v3d_main/3drenderer/v3dr_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ Peng, H, Ruan, Z., Atasoy, D., and Sternson, S. (2010) ?�Automatic reconstruct
//#endif
//#include "GLee_r.h" //must before any other OpengGL header file// minor modified glee.h for win32 compatible, by RZC 2008-09-12
//#include "GLee2glew.h" //// change place to head of every *.cpp using GL extensions
#include "GLee2glew.h" //@ADD 2020-2-14 RZC

// #include <QtOpenGL>
// #include <QtTest>
#if defined( USE_Qt5 )
#include <QtWidgets>
#include <QProgressDialog>
#else
#include "GLee2glew.h" //@ADD 2020-2-14 RZC
#include <QtGui>
#endif

Expand Down
9 changes: 6 additions & 3 deletions v3d_main/build.wsl → v3d_main/build_qt5.wsl
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@
#echo on

ARGS=$*
QARGS='DEFINES+=USE_Qt5' #'QMAKE_LFLAGS+=-no-pie'
QARGS='DEFINES+=USE_Qt5 QMAKE_LFLAGS+=-no-pie'

if [ $# -ge 1 ]; then
if [ "$1" = "clean" ]; then
echo clean moc_* ui_* qrc_*
echo clean moc_* ui_* qrc_* *.o
rm ./v3d/moc_*
rm ./v3d/ui_*
rm ./v3d/qrc_*
rm ./v3d/*.o
exit
fi
fi

Expand All @@ -27,11 +29,12 @@ echo ==========================================================
touch v3d_version_info.cpp
make $ARGS

if [ !-e "../../bin"]; then
if [ ! -d ../../bin ]; then
mkdir ../../bin
fi
cd ../../bin

cp ../v3d_main/v3d/vaa3d ./
echo ===========================================================
pwd
ls -l vaa3d
3 changes: 3 additions & 0 deletions v3d_main/mozak/m_terafly/src/control/m_CAnnotations.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

#include "renderer_gl1.h"

#include <algorithm>
#include <vector>
#include <list>
Expand Down
1 change: 1 addition & 0 deletions v3d_main/mozak/m_terafly/src/control/m_CConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* 4. Neither the name of University Campus Bio-Medico of Rome, nor Alessandro Bria and Giulio Iannello, may be used to endorse or promote products derived from this software without
* specific prior written permission.
********************************************************************************************************************************************************************************************/
#include "renderer_gl1.h"

#include "m_CConverter.h"
#include "m_CPlugin.h"
Expand Down
2 changes: 2 additions & 0 deletions v3d_main/mozak/m_terafly/src/control/m_CImport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
* 4. Neither the name of University Campus Bio-Medico of Rome, nor Alessandro Bria and Giulio Iannello, may be used to endorse or promote products derived from this software without
* specific prior written permission.
********************************************************************************************************************************************************************************************/
#include "renderer_gl1.h"


#include "m_PDialogImport.h"
#include "m_PMain.h"
Expand Down
1 change: 1 addition & 0 deletions v3d_main/mozak/m_terafly/src/control/m_CPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* 4. Neither the name of University Campus Bio-Medico of Rome, nor Alessandro Bria and Giulio Iannello, may be used to endorse or promote products derived from this software without
* specific prior written permission.
********************************************************************************************************************************************************************************************/
#include "renderer_gl1.h"

#include <QErrorMessage>
#include "v3d_interface.h"
Expand Down
3 changes: 3 additions & 0 deletions v3d_main/mozak/m_terafly/src/presentation/m_PAnoToolBar.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

#include "renderer_gl1.h"

#include "m_PAnoToolBar.h"
#include "m_PMain.h"
#include "m_CViewer.h"
Expand Down
1 change: 1 addition & 0 deletions v3d_main/mozak/m_terafly/src/presentation/m_PConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* 4. Neither the name of University Campus Bio-Medico of Rome, nor Alessandro Bria and Giulio Iannello, may be used to endorse or promote products derived from this software without
* specific prior written permission.
********************************************************************************************************************************************************************************************/
#include "renderer_gl1.h"

#include "m_PConverter.h"
#include "m_PMain.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* 4. Neither the name of University Campus Bio-Medico of Rome, nor Alessandro Bria and Giulio Iannello, may be used to endorse or promote products derived from this software without
* specific prior written permission.
********************************************************************************************************************************************************************************************/
#include "renderer_gl1.h"

#include "m_PDialogImport.h"
#include "m_PMain.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

#include "renderer_gl1.h"

#include "m_PDialogProofreading.h"
#include "m_PMain.h"
#include "m_CVolume.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef PDIALOGPROOFREADING_H
#define PDIALOGPROOFREADING_H

#include "v3dr_common.h"

#include <vector>
#include <QWidget>
#include "m_CPlugin.h"
Expand Down
1 change: 1 addition & 0 deletions v3d_main/mozak/m_terafly/src/presentation/m_PMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* 4. Neither the name of University Campus Bio-Medico of Rome, nor Alessandro Bria and Giulio Iannello, may be used to endorse or promote products derived from this software without
* specific prior written permission.
********************************************************************************************************************************************************************************************/
#include "renderer_gl1.h"

#include "m_PMain.h"
#include "m_PDialogImport.h"
Expand Down
2 changes: 2 additions & 0 deletions v3d_main/mozak/m_terafly/src/presentation/m_PMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#ifndef PMAIN_GUI_H
#define PMAIN_GUI_H

#include "v3dr_common.h"

#include <QtGui>
#include <v3d_interface.h>
#include "v3dr_glwidget.h"
Expand Down
1 change: 1 addition & 0 deletions v3d_main/mozak/terafly/src/control/CAnnotations.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

#include <algorithm>
#include <vector>
#include <list>
Expand Down
4 changes: 3 additions & 1 deletion v3d_main/mozak/terafly/src/control/CViewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@
#ifndef CEXPLORERWINDOW_H
#define CEXPLORERWINDOW_H

#include "renderer_gl2.h"

#include "CPlugin.h"
#include "v3dr_mainwindow.h"
#include "renderer_gl2.h"
//#include "renderer_gl2.h"
#include "CImport.h"
#include "v3d_imaging_para.h"

Expand Down
4 changes: 2 additions & 2 deletions v3d_main/neuron_annotator/data_model/GalleryMipImages.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

//#include "../../3drenderer/GLee_r.h"
//#include "../../3drenderer/GLee2glew.h"

#include "v3dr_common.h"

#include "GalleryMipImages.h"
#include "../gui/GalleryButton.h"
Expand Down
3 changes: 3 additions & 0 deletions v3d_main/neuron_annotator/gui/NaZStackWidget.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

#include "v3dr_common.h"

#include "NaZStackWidget.h"
#include <QPaintEvent>
#include <QDebug>
Expand Down
6 changes: 4 additions & 2 deletions v3d_main/terafly/src/control/CAnnotations.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include "renderer_gl1.h"
//#include "renderer.h"
#include <algorithm>
#include <vector>
#include <list>
Expand All @@ -14,8 +16,8 @@
#include "COperation.h"
#include "CImageUtils.h"
#include "../presentation/PLog.h"
#include "renderer_gl1.h"
#include "renderer.h"
//#include "renderer_gl1.h"
//#include "renderer.h"
#include "../../../../3drenderer/v3dr_surfaceDialog.h"

double SOMA_X = -1.1;
Expand Down
3 changes: 2 additions & 1 deletion v3d_main/terafly/src/control/CPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* 4. Neither the name of University Campus Bio-Medico of Rome, nor Alessandro Bria and Giulio Iannello, may be used to endorse or promote products derived from this software without
* specific prior written permission.
********************************************************************************************************************************************************************************************/
#include "renderer_gl1.h"

#include <QErrorMessage>
#include "v3d_interface.h"
Expand Down Expand Up @@ -554,4 +555,4 @@ INeuronAssembler* tf::PluginInterface::getTeraflyCViewer()
return interfacePtr;
}
#endif
// -------------------------------------------------------------------------------------------------------- //
// -------------------------------------------------------------------------------------------------------- //
8 changes: 5 additions & 3 deletions v3d_main/terafly/src/control/CViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
* 2014-11-17. Alessandro. @ADDED 'anoV0', ..., 'anoD1' VOI annotation (global) coordinates as object members in order to fix "duplicated annotations" bug
*/

#include "renderer_gl1.h"
//#include "renderer.h"
#include "CViewer.h"
#include "v3dr_mainwindow.h"
#include "CVolume.h"
Expand All @@ -45,8 +47,8 @@
#include "../presentation/PLog.h"
#include "../presentation/PAnoToolBar.h"
#include "../presentation/PDialogProofreading.h"
#include "renderer.h"
#include "renderer_gl1.h"
//#include "renderer.h"
//#include "renderer_gl1.h"
#include "v3dr_colormapDialog.h"
#include "V3Dsubclasses.h"
#include "QUndoMarkerCreate.h"
Expand Down Expand Up @@ -3568,4 +3570,4 @@ void CViewer::getParamsFromFragTraceUI(const string& keyName, const float& value
thisRenderer->fragTraceParams.insert(pair<string, float>(keyName, value));
}
#endif
/* ======= END of [CViewer's implementation of the virtuals inherited from INeuronAssembler] =======*/
/* ======= END of [CViewer's implementation of the virtuals inherited from INeuronAssembler] =======*/
1 change: 1 addition & 0 deletions v3d_main/terafly/src/control/CViewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#ifndef CEXPLORERWINDOW_H
#define CEXPLORERWINDOW_H

#include "v3dr_common.h"

#include "CPlugin.h"
#include "v3dr_mainwindow.h"
Expand Down
1 change: 1 addition & 0 deletions v3d_main/terafly/src/control/CVolume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* 4. Neither the name of University Campus Bio-Medico of Rome, nor Alessandro Bria and Giulio Iannello, may be used to endorse or promote products derived from this software without
* specific prior written permission.
********************************************************************************************************************************************************************************************/
#include "renderer_gl1.h"

#include <typeinfo>
#include "CVolume.h"
Expand Down
3 changes: 3 additions & 0 deletions v3d_main/terafly/src/control/QUndoMarkerCreate.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

#include "renderer_gl1.h"

#include "QUndoMarkerCreate.h"
#include "../control/CViewer.h"
#include "v3dr_glwidget.h"
Expand Down
3 changes: 3 additions & 0 deletions v3d_main/terafly/src/control/QUndoMarkerDelete.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

#include "renderer_gl1.h"

#include "QUndoMarkerDelete.h"
#include "../control/CViewer.h"
#include "v3dr_glwidget.h"
Expand Down
3 changes: 3 additions & 0 deletions v3d_main/terafly/src/control/QUndoMarkerDeleteROI.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

#include "renderer_gl1.h"

#include "QUndoMarkerDeleteROI.h"
#include "../control/CViewer.h"
#include "v3dr_glwidget.h"
Expand Down
6 changes: 4 additions & 2 deletions v3d_main/terafly/src/control/V3Dsubclasses.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#ifndef V3DSUBCLASSES_H
#define V3DSUBCLASSES_H

#include "CPlugin.h"
#include "renderer_gl1.h"

//#include "renderer_gl1.h"
#include "renderer_gl2.h"
#include "v3dr_glwidget.h"
#include "v3dr_mainwindow.h"
#include "v3d_imaging_para.h"

#include "CPlugin.h"

/**********************************************************************************
* Vaa3D subclasses needed to access/override protected members/methods
***********************************************************************************/
Expand Down
Loading

0 comments on commit b7dd4ef

Please sign in to comment.