2.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 9abcb3e4 authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Merge development into public/master.

parents 6a38ca99 01fa8683
[submodule "ext/lua"]
path = ext/lua
url = https://github.com/LuaDist/lua
ignore = dirty
...@@ -6,14 +6,13 @@ CAMPVis originally devoloped by: ...@@ -6,14 +6,13 @@ CAMPVis originally devoloped by:
Technische Universitaet Muenchen Technische Universitaet Muenchen
Boltzmannstr. 3, 85748 Garching b. Muenchen, Germany Boltzmannstr. 3, 85748 Garching b. Muenchen, Germany
The CAMPVis Software Framework project is partially funded by the German The CAMPVis Software Framework project was partially funded by the German
Ministry of Education and Research (BMBF) [index number 01IS12057]. Ministry of Education and Research (BMBF) [index number 01IS12057].
Further developers and contributors (only larger projects listed here): Further developers and contributors (only larger projects listed here):
* Regression Testing Interface: Hossain Mahmud <hossain.mahmud@gmail.com> * Regression Testing Interface: Hossain Mahmud <hossain.mahmud@gmail.com>
* Scripting Engine: Artur Grunau <artur.grunau@uj.edu.pl> * SWIG-based Lua Binding Generator: Artur Grunau <artur.grunau@uj.edu.pl>
* Qt GUI: Artur Grunau <artur.grunau@uj.edu.pl> * Qt GUI: Artur Grunau <artur.grunau@uj.edu.pl>
* Diffusion Tensor Imaging Plugin: Tobias Brachert <brachert@mytum.de>
For authorship of the individual processors, please have a look into the For authorship of the individual processors, please have a look into the
corresponding header files. corresponding header files.
# # = CAMPVis - Yet another medical visualization framework =====================
# CAMPVis - Yet another visualization framework
# CMake file inspired by Voreen
#
PROJECT(CAMPVis) PROJECT(CAMPVis)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR) CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0 FATAL_ERROR)
# SET(CAMPVIS_VERSION 1.0.0)
# Global Build Options
#
OPTION(BUILD_SHARED_LIBS "Build shared libraries?" ON) # = Global Build Options ======================================================
#OPTION(CAMPVIS_PRECOMPILED_HEADER "Use pre-compiled headers?" ON) OPTION(BUILD_SHARED_LIBS "Build shared libraries (strongly recommended!)" ON)
OPTION(CAMPVIS_DEBUG "Activate debug code?" ON) OPTION(CAMPVIS_DEBUG "Activate debug code?" ON)
OPTION(CAMPVIS_BUILD_APPLICATION "Build CAMPVis Application" ON) OPTION(CAMPVIS_BUILD_APPLICATION "Build CAMPVis Application" ON)
OPTION(CAMPVIS_BUILD_CORE "Build CAMPVis Core" ON)
OPTION(CAMPVIS_BUILD_MODULES "Build CAMPVis Modules" ON) OPTION(CAMPVIS_BUILD_MODULES "Build CAMPVis Modules" ON)
OPTION(CAMPVIS_ENABLE_SCRIPTING "Add support for scripting CAMPVis using Lua" OFF) OPTION(CAMPVIS_ENABLE_SCRIPTING "Add support for scripting CAMPVis using Lua" OFF)
OPTION(CAMPVIS_BUILD_LIB_CGT "Build CGT Library" ON)
OPTION(CAMPVIS_BUILD_LIB_LUA "Build Lua Library" OFF)
OPTION(CAMPVIS_BUILD_DOXYGEN "Build Doxygen Documentation" OFF) OPTION(CAMPVIS_BUILD_DOXYGEN "Build Doxygen Documentation" OFF)
OPTION(CAMPVIS_DEPLOY_SHADERS "Deploy Shader files to binary directory" OFF) OPTION(CAMPVIS_DEPLOY_SHADERS "Deploy Shader files to binary directory" OFF)
OPTION(CAMPVIS_GROUP_SOURCE_FILES "Group source files by directory" ON) OPTION(CAMPVIS_GROUP_SOURCE_FILES "Group source files by directory" ON)
OPTION(CAMPVIS_BUILD_GOOGLETEST "Build googletest library" OFF) OPTION(CAMPVIS_ENABLE_TESTING "Build CAMPVis Unit Tests using gooogletest" OFF)
OPTION(CAMPVIS_BUILD_TEST_SOURCES "Build Unit Tests of gooogletest" OFF)
IF(WIN32) IF(WIN32)
OPTION(CAMPVIS_COPY_EXTERNAL_DLLS "Copy external DLLs to bin directory?" ON) OPTION(CAMPVIS_COPY_EXTERNAL_DLLS "Copy external DLLs to bin directory?" ON)
...@@ -32,81 +22,88 @@ IF(WIN32) ...@@ -32,81 +22,88 @@ IF(WIN32)
OPTION(CAMPVIS_GENERATE_MANIFEST "Generate manifest in Visual Studio debug builds (switch on when encountering errors using incremental linking)?" OFF) OPTION(CAMPVIS_GENERATE_MANIFEST "Generate manifest in Visual Studio debug builds (switch on when encountering errors using incremental linking)?" OFF)
ENDIF() ENDIF()
# = Further Build Options =====================================================
SET(CAMPVIS_DEFAULT_ENABLED_MODULES "STABLE_NO_DEPENDENCIES" CACHE STRING "Default CAMPVis modules to activate") SET(CAMPVIS_DEFAULT_ENABLED_MODULES "STABLE_NO_DEPENDENCIES" CACHE STRING "Default CAMPVis modules to activate")
SET_PROPERTY(CACHE CAMPVIS_DEFAULT_ENABLED_MODULES PROPERTY STRINGS "NONE" "STABLE_NO_DEPENDENCIES" "STABLE_WITH_EXTERNAL_DEPENDENCIES" "TESTING" "ALL") SET_PROPERTY(CACHE CAMPVIS_DEFAULT_ENABLED_MODULES PROPERTY STRINGS "NONE" "STABLE_NO_DEPENDENCIES" "STABLE_WITH_EXTERNAL_DEPENDENCIES" "TESTING" "ALL")
# # propagate CAMPVIS_ENABLE_SCRIPTING to CAMPVIS_BUILD_LIB_LUA to support deprecated code
# Further Build Configurations IF (CAMPVIS_ENABLE_SCRIPTING)
# SET(CAMPVIS_BUILD_LIB_LUA ON)
ENDIF()
include(cmake/commonconf.cmake) include(cmake/commonconf.cmake)
include(cmake/parseModulesDir.cmake) include(cmake/parseModulesDir.cmake)
MESSAGE(STATUS "--------------------------------------------------------------------------------")
IF(CAMPVIS_BUILD_LIB_CGT) # = Start the definition of all CAMPVis targets ===============================
ADD_SUBDIRECTORY(ext/cgt) MESSAGE(STATUS "--------------------------------------------------------------------------------")
ADD_SUBDIRECTORY(ext/sigslot)
ENDIF()
IF(CAMPVIS_BUILD_LIB_LUA)
IF(WIN32)
# Keep LUA_BUILD_AS_DLL in sync with BUILD_SHARED_LIBS
SET(LUA_BUILD_AS_DLL ${BUILD_SHARED_LIBS} CACHE BOOL "Build Lua library as DLL" FORCE)
ENDIF(WIN32)
ADD_SUBDIRECTORY(ext/lua EXCLUDE_FROM_ALL) # cgt, sigslot and campvis-core are enabled by default.
ADD_SUBDIRECTORY(ext/cgt)
# If the above command failed, provide a hint how to fix the problem ADD_SUBDIRECTORY(ext/sigslot)
IF(NOT TARGET liblua) ADD_SUBDIRECTORY(core)
MESSAGE(SEND_ERROR "Did you forget to run `git submodule update --init`?")
ENDIF(NOT TARGET liblua)
ENDIF()
IF(CAMPVIS_BUILD_CORE)
ADD_SUBDIRECTORY(core)
ENDIF()
IF(CAMPVIS_BUILD_MODULES) IF(CAMPVIS_BUILD_MODULES)
ADD_SUBDIRECTORY(modules) ADD_SUBDIRECTORY(modules)
ENDIF() ENDIF()
# build scripting targets when enabled
IF(CAMPVIS_ENABLE_SCRIPTING) IF(CAMPVIS_ENABLE_SCRIPTING)
# build Lua from source
ADD_SUBDIRECTORY(ext/lua)
SET(LUA_DIR "${CampvisHome}/ext/lua")
# First, find Lua to setup paths for all projects correctly # First, find Lua to setup paths for all projects correctly
FIND_PACKAGE(Lua REQUIRED) LIST(APPEND CampvisGlobalIncludeDirs "${LUA_DIR}/src" "${CMAKE_BINARY_DIR}/ext/lua")
IF(LUA_FOUND) LIST(APPEND CampvisGlobalExternalLibs "liblua")
MESSAGE(STATUS "* Found Lua") LIST(APPEND CampvisGlobalDefinitions "-DCAMPVIS_HAS_SCRIPTING")
LIST(APPEND CampvisGlobalDefinitions ${LUA_DEFINITIONS})
LIST(APPEND CampvisGlobalIncludeDirs ${LUA_INCLUDE_DIR})
LIST(APPEND CampvisGlobalExternalLibs ${LUA_LIBRARY})
ELSE(LUA_FOUND)
MESSAGE(FATAL_ERROR "Lua not found!")
ENDIF(LUA_FOUND)
ADD_SUBDIRECTORY(scripting) ADD_SUBDIRECTORY(scripting)
LIST(APPEND CampvisGlobalDefinitions "-DCAMPVIS_HAS_SCRIPTING")
ENDIF() ENDIF()
IF(CAMPVIS_BUILD_APPLICATION) IF(CAMPVIS_BUILD_APPLICATION)
ADD_SUBDIRECTORY(application) ADD_SUBDIRECTORY(application)
ENDIF() ENDIF()
IF(CAMPVIS_BUILD_GOOGLETEST) # build campvis-test when enabled
IF(CAMPVIS_ENABLE_TESTING)
ADD_SUBDIRECTORY(ext/gtest-1.7.0) ADD_SUBDIRECTORY(ext/gtest-1.7.0)
ENDIF()
IF(CAMPVIS_BUILD_TEST_SOURCES)
ADD_SUBDIRECTORY(test) ADD_SUBDIRECTORY(test)
ENDIF() ENDIF()
# build doxygen when enabled
IF(CAMPVIS_BUILD_DOXYGEN) IF(CAMPVIS_BUILD_DOXYGEN)
ADD_SUBDIRECTORY(doc EXCLUDE_FROM_ALL) ADD_SUBDIRECTORY(doc EXCLUDE_FROM_ALL)
ENDIF() ENDIF()
# MESSAGE(STATUS "--------------------------------------------------------------------------------")
# Copy External DLLs MESSAGE(STATUS "Finishing up")
#
# = Export all CAMPVis Targets so that they can be included easily ============
# write package version file
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/CAMPVisConfigVersion.cmake"
VERSION ${CAMPVIS_VERSION}
COMPATIBILITY AnyNewerVersion
)
# write campvis targets file
export(EXPORT campvis-targets
FILE "${CMAKE_CURRENT_BINARY_DIR}/CAMPVisTargets.cmake"
# NAMESPACE Upstream::
)
# write campvis configuration file
configure_file("${CampvisHome}/cmake/CAMPVisConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/CAMPVisConfig.cmake"
@ONLY
)
#INSTALL(EXPORT campvis-targets NAMESPACE Upstream:: DESTINATION ${CampvisLibInstallDir})
EXPORT(PACKAGE CAMPVis)
# = Copy Windows DLLs to binary dir for improved development experience =======
IF(WIN32) IF(WIN32)
# gather Qt4 DLLs - TODO: remove redundant naming of required components # gather Qt4 DLLs - TODO: remove redundant naming of required components
FIND_PACKAGE(Qt4DLLs COMPONENTS QtCore QtGui QtOpenGL QtNetwork QtXmlPatterns) FIND_PACKAGE(Qt4DLLs COMPONENTS QtCore QtGui QtOpenGL QtNetwork QtXmlPatterns)
...@@ -120,3 +117,5 @@ IF(WIN32) ...@@ -120,3 +117,5 @@ IF(WIN32)
COPY_EXTERNAL_DLLS(CampvisExternalDllsDebug CampvisExternalDllsRelease false) COPY_EXTERNAL_DLLS(CampvisExternalDllsDebug CampvisExternalDllsRelease false)
ENDIF() ENDIF()
ENDIF() ENDIF()
MESSAGE(STATUS "--------------------------------------------------------------------------------")
...@@ -26,12 +26,13 @@ CAMPVis a software platform for medical imaging and visualization. It is targete ...@@ -26,12 +26,13 @@ CAMPVis a software platform for medical imaging and visualization. It is targete
* [Intel TBB](https://www.threadingbuildingblocks.org/) * [Intel TBB](https://www.threadingbuildingblocks.org/)
* OpenGL 3.3+ Capable Video Hardware (and Drivers!) * OpenGL 3.3+ Capable Video Hardware (and Drivers!)
* Qt 4.8 for Application Package (Qt 5 Support in Progress) * Qt 4.8 for Application Package (Qt 5 Support in Progress)
* CMake Build System * CMake 3.0+
### Tested Environments ### Tested Environments
* Windows: MSVC 2010+, Linux: gcc 4.8+ * Windows: MSVC 2010+, Linux: gcc 4.8+
* nVidia GPUs * various nVidia GPUs
* AMD R290X
* Intel HD4000+ GPUs (Basically Ivy Bridge and Later) * Intel HD4000+ GPUs (Basically Ivy Bridge and Later)
### Getting in Touch ### Getting in Touch
......
...@@ -2,10 +2,10 @@ PROJECT(campvis-application) ...@@ -2,10 +2,10 @@ PROJECT(campvis-application)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR) CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)
INCLUDE(../cmake/commonconf.cmake) INCLUDE(../cmake/commonconf.cmake)
MESSAGE(STATUS "Configuring CAMPVis Application") MESSAGE(STATUS "Configuring CAMPVis-Application")
FILE(GLOB CampvisApplicationSources FILE(GLOB CampvisApplicationSources
*.cpp campvisapplication.cpp
gui/*.cpp gui/*.cpp
gui/adjusterwidgets/*.cpp gui/adjusterwidgets/*.cpp
gui/mdi/*.cpp gui/mdi/*.cpp
...@@ -14,7 +14,8 @@ FILE(GLOB CampvisApplicationSources ...@@ -14,7 +14,8 @@ FILE(GLOB CampvisApplicationSources
) )
FILE(GLOB CampvisApplicationHeaders FILE(GLOB CampvisApplicationHeaders
*.h applicationapi.h
campvisapplication.h
glsl/*.frag glsl/*.frag
glsl/*.vert glsl/*.vert
gui/*.h gui/*.h
...@@ -28,7 +29,6 @@ FILE(GLOB CampvisApplicationForms ...@@ -28,7 +29,6 @@ FILE(GLOB CampvisApplicationForms
) )
SET(CampvisApplicationToBeMocced SET(CampvisApplicationToBeMocced
qtjobprocessor.h
gui/mainwindow.h gui/mainwindow.h
gui/datacontainerinspectorcanvas.h gui/datacontainerinspectorcanvas.h
gui/datacontainerinspectorwidget.h gui/datacontainerinspectorwidget.h
...@@ -39,7 +39,6 @@ SET(CampvisApplicationToBeMocced ...@@ -39,7 +39,6 @@ SET(CampvisApplicationToBeMocced
gui/qtdatahandle.h gui/qtdatahandle.h
gui/logviewerwidget.h gui/logviewerwidget.h
gui/loghighlighter.h gui/loghighlighter.h
gui/scriptingwidget.h
gui/workflowcontrollerwidget.h gui/workflowcontrollerwidget.h
gui/mdi/mdidockarea.h gui/mdi/mdidockarea.h
gui/mdi/mdidockablewindow.h gui/mdi/mdidockablewindow.h
...@@ -64,11 +63,32 @@ SET(CampvisApplicationToBeMocced ...@@ -64,11 +63,32 @@ SET(CampvisApplicationToBeMocced
gui/properties/stringpropertywidget.h gui/properties/stringpropertywidget.h
gui/properties/statuspropertywidget.h gui/properties/statuspropertywidget.h
gui/properties/transferfunctionpropertywidget.h gui/properties/transferfunctionpropertywidget.h
tools/qtexteditlog.h
tools/bufferinglog.h tools/bufferinglog.h
tools/qtexteditlog.h
tools/qtjobprocessor.h
) )
IF(CAMPVIS_ENABLE_SCRIPTING)
LIST(APPEND CampvisApplicationToBeMocced
${CMAKE_CURRENT_SOURCE_DIR}/gui/completinglualineedit.h
${CMAKE_CURRENT_SOURCE_DIR}/gui/luatablewidget.h
${CMAKE_CURRENT_SOURCE_DIR}/gui/scriptingwidget.h
)
ELSE(CAMPVIS_ENABLE_SCRIPTING)
LIST(REMOVE_ITEM CampvisApplicationSources
${CMAKE_CURRENT_SOURCE_DIR}/gui/completinglualineedit.cpp
${CMAKE_CURRENT_SOURCE_DIR}/gui/luatablewidget.cpp
${CMAKE_CURRENT_SOURCE_DIR}/gui/scriptingwidget.cpp
)
LIST(REMOVE_ITEM CampvisApplicationHeaders
${CMAKE_CURRENT_SOURCE_DIR}/gui/completinglualineedit.h
${CMAKE_CURRENT_SOURCE_DIR}/gui/luatablewidget.h
${CMAKE_CURRENT_SOURCE_DIR}/gui/scriptingwidget.h
)
ENDIF(CAMPVIS_ENABLE_SCRIPTING)
# add additional sources from the activated modules # add additional sources from the activated modules
FOREACH(ModFile ${CampvisModulesApplicationSources}) FOREACH(ModFile ${CampvisModulesApplicationSources})
# adjust relative path # adjust relative path
...@@ -103,19 +123,31 @@ IF(CAMPVIS_ENABLE_SCRIPTING) ...@@ -103,19 +123,31 @@ IF(CAMPVIS_ENABLE_SCRIPTING)
LIST(APPEND CampvisMainLibs campvis-scripting) LIST(APPEND CampvisMainLibs campvis-scripting)
ENDIF(CAMPVIS_ENABLE_SCRIPTING) ENDIF(CAMPVIS_ENABLE_SCRIPTING)
ADD_EXECUTABLE(campvis-application ADD_LIBRARY(campvis-application-lib
${CampvisApplicationSources} ${CampvisApplicationHeaders} ${CampvisApplicationSources} ${CampvisApplicationHeaders}
${CampvisApplicationMoc} ${CampvisApplicationMoc}
) )
ADD_DEFINITIONS(${CampvisGlobalDefinitions} ${CampvisModulesDefinitions} ${CampvisApplicationDefinitions} ${QT_DEFINITIONS}) ADD_DEFINITIONS(${CampvisGlobalDefinitions} ${CampvisModulesDefinitions} ${CampvisApplicationDefinitions} ${QT_DEFINITIONS})
INCLUDE_DIRECTORIES(${CampvisGlobalIncludeDirs} ${CampvisModulesIncludeDirs}) INCLUDE_DIRECTORIES(${CampvisGlobalIncludeDirs} ${CampvisModulesIncludeDirs})
TARGET_LINK_LIBRARIES(campvis-application ${CampvisMainLibs} ${CampvisGlobalExternalLibs} ${CampvisModulesExternalLibs} ${QT_LIBRARIES}) TARGET_LINK_LIBRARIES(campvis-application-lib ${CampvisMainLibs} ${CampvisGlobalExternalLibs} ${CampvisModulesExternalLibs} ${QT_LIBRARIES})
# if campvis-core is built as a shared library, CMake will define the following flag to instruct
# the code to export DLL symbols
SET_TARGET_PROPERTIES(campvis-application-lib PROPERTIES DEFINE_SYMBOL "CAMPVIS_APPLICATION_BUILD_DLL")
IF(CAMPVIS_GROUP_SOURCE_FILES) IF(CAMPVIS_GROUP_SOURCE_FILES)
DEFINE_SOURCE_GROUPS_FROM_SUBDIR(CampvisApplicationSources ${CampvisHome} "") DEFINE_SOURCE_GROUPS_FROM_SUBDIR(CampvisApplicationSources ${CampvisHome} "")
DEFINE_SOURCE_GROUPS_FROM_SUBDIR(CampvisApplicationHeaders ${CampvisHome} "") DEFINE_SOURCE_GROUPS_FROM_SUBDIR(CampvisApplicationHeaders ${CampvisHome} "")
ENDIF() ENDIF()
INSTALL(TARGETS campvis-application-lib DESTINATION exports EXPORT campvis-targets)
ADD_EXECUTABLE(campvis-application "campvis.cpp")
TARGET_LINK_LIBRARIES(campvis-application campvis-application-lib ${CampvisMainLibs} ${CampvisGlobalExternalLibs} ${CampvisModulesExternalLibs} ${QT_LIBRARIES})
IF(CAMPVIS_DEPLOY_SHADERS) IF(CAMPVIS_DEPLOY_SHADERS)
LIST(APPEND CampvisShaderDirectories "application/data") LIST(APPEND CampvisShaderDirectories "application/data")
LIST(APPEND CampvisShaderDirectories "application/glsl") LIST(APPEND CampvisShaderDirectories "application/glsl")
......
...@@ -22,37 +22,28 @@ ...@@ -22,37 +22,28 @@
// //
// ================================================================================================ // ================================================================================================
#include "tools/shading.frag" #ifndef APPLICATIONAPI_H__
#include "tools/texture3d.frag" #define APPLICATIONAPI_H__
in vec3 ex_TexCoord; ///< incoming texture coordinate #ifdef CAMPVIS_DYNAMIC_LIBS
in vec4 ex_Position; ///< incoming texture coordinate #ifdef CAMPVIS_APPLICATION_BUILD_DLL
// building library -> export symbols
out vec4 out_Color; ///< outgoing fragment color #ifdef WIN32
#define CAMPVIS_APPLICATION_API __declspec(dllexport)
uniform vec4 _color; #else
uniform LightSource _lightSource; #define CAMPVIS_APPLICATION_API
uniform vec3 _cameraPosition; #endif
#else
uniform sampler3D _strainTexture; // including library -> import symbols
uniform TextureParameters3D _textureParameters; #ifdef WIN32
#define CAMPVIS_APPLICATION_API __declspec(dllimport)
void main() { #else
out_Color = _color; #define CAMPVIS_APPLICATION_API
#endif
vec3 worldCoords = ex_Position.xyz / ex_Position.z; #endif
vec3 texCoords = worldToTexture(_textureParameters, worldCoords); #else
out_Color = texture(_strainTexture, texCoords); // building/including static library -> do nothing
#define CAMPVIS_APPLICATION_API
while (length(out_Color) == 0.0) {
worldCoords -= normalize(ex_TexCoord) * 0.1;
texCoords = worldToTexture(_textureParameters, worldCoords);
out_Color = texture(_strainTexture, texCoords);
}
#ifdef ENABLE_SHADING
// compute gradient (needed for shading and normals)
vec3 gradient = ex_TexCoord;
out_Color.rgb = calculatePhongShading(ex_Position.xyz / ex_Position.z, _lightSource, _cameraPosition, gradient, _color.rgb, _color.rgb, vec3(1.0, 1.0, 1.0));
#endif #endif
}
#endif // APPLICATIONAPI_H__
%module application
%include factory.i
%include std_pair.i
%include std_string.i
%include std_vector.i
%import "core/bindings/campvis.i"
%{
#include "application/campvisapplication.h"
#include "core/properties/allproperties.h"
#include "core/pipeline/abstractprocessor.h"
#include "core/pipeline/abstractworkflow.h"
#include "core/pipeline/autoevaluationpipeline.h"
%}
namespace campvis {
class CampVisApplication {
public:
CampVisApplication(int& argc, char** argv);
~CampVisApplication();
void init();
void deinit();
int run();
%apply SWIGTYPE *DISOWN {AbstractPipeline* pipeline};
void addPipeline(AbstractPipeline* pipeline);
DataContainer* createAndAddDataContainer(const std::string& name);
%clear AbstractPipeline* pipeline;
void rebuildAllShadersFromFiles();
void setPipelineVisibility(AbstractPipeline* pipeline, bool visibility);
/// Signal emitted when the collection of pipelines has changed.
sigslot::signal0 s_PipelinesChanged;
/// Signal emitted when the collection of DataContainers has changed.
sigslot::signal0 s_DataContainersChanged;
};
}
%luacode {
print("Module campvis-application loaded")
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// //
// This file is part of the CAMPVis Software Framework. // This file is part of the CAMPVis Software Framework.
// //
// If not explicitly stated otherwise: Copyright (C) 2012-2014, all rights reserved, // If not explicitly stated otherwise: Copyright (C) 2012-2015, all rights reserved,
// Christian Schulte zu Berge <christian.szb@in.tum.de> // Christian Schulte zu Berge <christian.szb@in.tum.de>
// Chair for Computer Aided Medical Procedures // Chair for Computer Aided Medical Procedures
// Technische Universitaet Muenchen // Technische Universitaet Muenchen
...@@ -24,10 +24,6 @@ ...@@ -24,10 +24,6 @@
#include "application/campvisapplication.h" #include "application/campvisapplication.h"
#ifdef Q_WS_X11
#include <X11/Xlib.h>
#endif
using namespace campvis; using namespace campvis;
/** /**
...@@ -38,9 +34,8 @@ using namespace campvis; ...@@ -38,9 +34,8 @@ using namespace campvis;
* \return 0 if program exited successfully * \return 0 if program exited successfully
**/ **/
int main(int argc, char** argv) { int main(int argc, char** argv) {
#ifdef Q_WS_X11 // Make Xlib and GLX thread safe under X11
XInitThreads(); QCoreApplication::setAttribute(Qt::AA_X11InitThreads);
#endif
CampVisApplication app(argc, argv); CampVisApplication app(argc, argv);
app.init(); app.init();
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// //
// This file is part of the CAMPVis Software Framework. // This file is part of the CAMPVis Software Framework.
// //
// If not explicitly stated otherwise: Copyright (C) 2012-2014, all rights reserved, // If not explicitly stated otherwise: Copyright (C) 2012-2015, all rights reserved,
// Christian Schulte zu Berge <christian.szb@in.tum.de> // Christian Schulte zu Berge <christian.szb@in.tum.de>
// Chair for Computer Aided Medical Procedures // Chair for Computer Aided Medical Procedures
// Technische Universitaet Muenchen // Technische Universitaet Muenchen
...@@ -35,26 +35,26 @@ ...@@ -35,26 +35,26 @@
#include "cgt/texturereadertga.h" #include "cgt/texturereadertga.h"
#include "cgt/qt/qtthreadedcanvas.h" #include "cgt/qt/qtthreadedcanvas.h"
#include "application/campvispainter.h"
#include "application/gui/properties/propertywidgetfactory.h" #include "application/gui/properties/propertywidgetfactory.h"
#include "application/gui/mainwindow.h" #include "application/gui/mainwindow.h"
#include "application/gui/mdi/mdidockablewindow.h" #include "application/gui/mdi/mdidockablewindow.h"
#include "core/tools/simplejobprocessor.h" #include "core/init.h"
#include "core/tools/stringutils.h" #include "core/tools/stringutils.h"
#include "core/tools/quadrenderer.h" #include "core/tools/quadrenderer.h"
#include "core/pipeline/abstractpipeline.h" #include "core/pipeline/abstractpipeline.h"
#include "core/pipeline/abstractworkflow.h" #include "core/pipeline/abstractworkflow.h"
#include "core/pipeline/pipelinefactory.h"
#include "core/pipeline/pipelinepainter.h"
#include "core/datastructures/imagerepresentationconverter.h" #include "core/datastructures/imagerepresentationconverter.h"
#include "core/pipeline/visualizationprocessor.h" #include "core/pipeline/visualizationprocessor.h"
#include "modules/pipelinefactory.h" #include "tools/qtjobprocessor.h"
#include "qtjobprocessor.h"
#include <QApplication> #include <QApplication>
#ifdef CAMPVIS_HAS_SCRIPTING #ifdef CAMPVIS_HAS_SCRIPTING
#include "scripting/gen_pipelineregistration.h" #include "scripting/glue/luavmstate.h"
#endif #endif
namespace campvis { namespace campvis {
...@@ -71,106 +71,69 @@ namespace campvis { ...@@ -71,106 +71,69 @@ namespace campvis {
, _argc(argc) , _argc(argc)