Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CamiTK
CamiTK Community Edition
Commits
338a9baa
Commit
338a9baa
authored
Jul 20, 2016
by
Jean-Loup Haberbusch
Browse files
Merge branch 'hotfix-4.0.1' into develop
parents
8cf028fd
29de5b91
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
modeling/components/pmlcomponent/PMLComponent.cpp
View file @
338a9baa
...
...
@@ -23,13 +23,13 @@
* $CAMITK_LICENCE_END$
****************************************************************************/
// CamiTK stuff
#include <Action.h>
#include <InteractiveViewer.h>
#include <Log.h>
#include <Geometry.h>
#include <Property.h>
#include <Application.h>
#include <InteractiveViewer.h>
#include <AbortException.h>
#include <Action.h>
#include "PMLComponent.h"
// Qt stuff
...
...
sdk/actions/application/AboutAction.cpp
View file @
338a9baa
...
...
@@ -86,7 +86,7 @@ Action::ApplyStatus AboutAction::apply() {
+
QString
(
Core
::
version
)
+
"<br/>"
+
"VTK: "
+
QString
(
vtkVersion
::
GetVTKVersion
())
+
" - Qt: "
+
QString
(
qVersion
())
+
"<br/><br/>"
+
tr
(
"Please visit <a href='http://camitk.imag.fr'>camitk.imag.fr</a> for more information.<br/>"
)
+
tr
(
"(c) U
GA-
Grenoble
1
, CNRS, TIMC-IMAG UMR 5525"
));
+
tr
(
"(c) U
niv.
Grenoble
Alpes
, CNRS, TIMC-IMAG UMR 5525"
));
// get the proper text height
text
->
adjustSize
();
...
...
sdk/actions/image/cropvolume/CMakeLists.txt
View file @
338a9baa
...
...
@@ -17,6 +17,6 @@ set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_
# a fail to a pass
# This is needed until there is a way to automatically add input ROI without a widget
# and launch the action with this input from the test environment
if
(
NOT PACKAGING_NSIS
)
if
(
NOT PACKAGING_NSIS
AND BUILD_TESTING
)
set_tests_properties
(
"action-cropvolume-LEVEL1-15"
PROPERTIES WILL_FAIL true
)
endif
()
sdk/actions/image/reorientimage/CMakeLists.txt
View file @
338a9baa
...
...
@@ -11,6 +11,6 @@ camitk_extension( ACTION_EXTENSION
# As the Reorient image action, when applied, needs its dialog box initialized, it cannot
# pass this test.
# Remove when action reorient image has been updated consequently
if
(
NOT PACKAGING_NSIS
)
if
(
NOT PACKAGING_NSIS
AND BUILD_TESTING
)
set_tests_properties
(
"action-reorientimage-LEVEL1-15"
PROPERTIES WILL_FAIL true
)
endif
()
\ No newline at end of file
sdk/actions/mesh/basicmesh/RigidTransform.cpp
View file @
338a9baa
...
...
@@ -199,7 +199,7 @@ Action::ApplyStatus RigidTransform::apply() {
comp
->
setModified
();
}
else
{
CAMITK_INFO
(
"RigidTransform"
,
"applyTransform"
,
"Error: filter output is of type: "
<<
filterList
[
i
]
->
GetOutputDataObject
(
0
)
->
GetClassName
());
return
ERROR
;
return
ABORTED
;
}
// next filter
i
++
;
...
...
sdk/actions/mesh/meshprocessing/CMakeLists.txt
View file @
338a9baa
...
...
@@ -18,7 +18,7 @@ set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_
# a fail to a pass
# This is needed until there is a way to tell testaction that this action
# needs two mesh in input
if
(
NOT PACKAGING_NSIS
)
if
(
NOT PACKAGING_NSIS
AND BUILD_TESTING
)
set_tests_properties
(
"action-meshprocessing-LEVEL1-19"
PROPERTIES WILL_FAIL true
)
set_tests_properties
(
"action-meshprocessing-LEVEL1-21"
PROPERTIES WILL_FAIL true
)
endif
()
\ No newline at end of file
sdk/applications/actionstatemachine/ActionStateMachine.cpp
View file @
338a9baa
...
...
@@ -37,7 +37,6 @@
// -- CamiTK Core stuff
#include <MainWindow.h>
#include <InteractiveViewer.h>
#include <Application.h>
#include <MedicalImageViewer.h>
#include <Core.h>
...
...
sdk/applications/imp/ImpMainWindow.cpp
View file @
338a9baa
...
...
@@ -30,6 +30,7 @@
#include <Application.h>
#include <ExtensionManager.h>
#include <MedicalImageViewer.h>
#include <ActionViewer.h>
#include <SettingsDialog.h>
#include <Component.h>
#include <Action.h>
...
...
sdk/applications/wizard/resources/camitk-wizard.xpm
0 → 100644
View file @
338a9baa
This diff is collapsed.
Click to expand it.
sdk/cmake/modules/macros/camitk/CamiTKExtension.cmake
View file @
338a9baa
...
...
@@ -538,7 +538,7 @@ macro(camitk_extension)
# 5th DEPENDENCY ON TESTING APPLICATION
# Those projects are used to run unitarian test on ACTION / COMPONENT extensions.
set
(
APPLICATIONS_DEPENDENCY_LIST
""
)
if
(
${
EXTENSION_NAME_CMAKE
}
_TEST_APPLICATION AND NOT PACKAGING_NSIS
)
if
(
${
EXTENSION_NAME_CMAKE
}
_TEST_APPLICATION AND NOT PACKAGING_NSIS
AND BUILD_TESTING
)
# Add this dependencies for automatically constructing application-testactions components dependencies
add_dependencies
(
${${
TYPE_EXTENSION_CMAKE
}
_TARGET_NAME
}
application-test
${
TYPE_EXTENSION
}
s
)
set
(
APPLICATIONS_DEPENDENCY_LIST
"application-test
${
TYPE_EXTENSION
}
s"
)
...
...
@@ -548,14 +548,14 @@ macro(camitk_extension)
if
((
CEP_NAME STREQUAL
"SDK"
)
OR
(
CEP_NAME STREQUAL
"modeling"
)
OR
(
CEP_NAME STREQUAL
"imaging"
))
# 6th TEST-COMPONENT APPLICATION DEPENDENCY ON THIS COMPONENT
if
(
${
EXTENSION_NAME_CMAKE
}
_COMPONENT_EXTENSION AND
${
EXTENSION_NAME_CMAKE
}
_TEST_APPLICATION AND NOT PACKAGING_NSIS
)
if
(
${
EXTENSION_NAME_CMAKE
}
_COMPONENT_EXTENSION AND
${
EXTENSION_NAME_CMAKE
}
_TEST_APPLICATION AND NOT PACKAGING_NSIS
AND BUILD_TESTING
)
add_dependencies
(
application-testactions
${
COMPONENT_TARGET_NAME
}
)
# add this component automoc target to the dependency of the test application
set_property
(
TARGET application-testactions APPEND PROPERTY AUTOGEN_TARGET_DEPENDS
${
COMPONENT_TARGET_NAME
}
)
endif
()
# 7th TEST-ACTION APPLICATION DEPENDENCY ON ACTION-APPLICATION
if
(
${
TYPE_EXTENSION_CMAKE
}
_TARGET_NAME STREQUAL
"action-application"
)
if
(
${
TYPE_EXTENSION_CMAKE
}
_TARGET_NAME STREQUAL
"action-application"
AND BUILD_TESTING
)
add_dependencies
(
application-testcomponents action-application
)
# add this component automoc target to the dependency of the test application
set_property
(
TARGET application-testcomponents APPEND PROPERTY AUTOGEN_TARGET_DEPENDS action-application
)
...
...
@@ -861,7 +861,7 @@ macro(camitk_extension)
# CTEST - COMPONENT TESTS DESCRIPTION #
# #
#########################################################################
if
(
${
EXTENSION_NAME_CMAKE
}
_COMPONENT_EXTENSION AND
${
EXTENSION_NAME_CMAKE
}
_TEST_APPLICATION AND NOT PACKAGING_NSIS
)
if
(
${
EXTENSION_NAME_CMAKE
}
_COMPONENT_EXTENSION AND
${
EXTENSION_NAME_CMAKE
}
_TEST_APPLICATION AND NOT PACKAGING_NSIS
AND BUILD_TESTING
)
camitk_init_test
(
${${
EXTENSION_NAME_CMAKE
}
_TEST_APPLICATION
}
)
camitk_parse_test_add_separator
(
EXTENSION_TYPE
${
TYPE_EXTENSION
}
EXTENSION_NAME
${
EXTENSION_NAME
}
)
...
...
sdk/libraries/core/action/Action.h
View file @
338a9baa
...
...
@@ -35,7 +35,6 @@
#include <QWidget>
#include <QString>
#include <QAction>
#include <signal.h>
namespace
camitk
{
...
...
sdk/libraries/core/viewer/InteractiveViewer.cpp
View file @
338a9baa
...
...
@@ -24,12 +24,12 @@
****************************************************************************/
// -- Core stuff
#include "Action.h"
#include "RendererWidget.h"
#include "InteractiveViewer.h"
#include "SliderSpinBoxWidget.h"
#include "Application.h"
#include "Log.h"
#include "Action.h"
#include "MeshComponent.h"
#include "PropertyObject.h"
...
...
sdk/libraries/core/viewer/MedicalImageViewer.cpp
View file @
338a9baa
...
...
@@ -24,10 +24,10 @@
****************************************************************************/
// -- Core stuff
#include "Action.h"
#include "MedicalImageViewer.h"
#include "InteractiveViewer.h"
#include "Application.h"
#include "Action.h"
//-- Qt stuff
#include <QColorDialog>
...
...
sdk/libraries/core/viewer/PropertyExplorer.cpp
View file @
338a9baa
...
...
@@ -26,6 +26,7 @@
// -- Core stuff
#include "Application.h"
#include "PropertyExplorer.h"
#include "Component.h"
// -- QT stuff
#include <QVBoxLayout>
...
...
sdk/libraries/core/viewer/PropertyExplorer.h
View file @
338a9baa
...
...
@@ -28,7 +28,6 @@
// -- Core stuff
#include "Viewer.h"
#include "ObjectController.h"
#include "ActionViewer.h"
#include "PropertyObject.h"
// -- QT stuff
...
...
sdk/libraries/core/viewer/RendererWidget.cpp
View file @
338a9baa
...
...
@@ -33,6 +33,8 @@
#include <QKeyEvent>
#include <QFileInfo>
#include <QCursor>
#include <QProcessEnvironment>
#include <QOpenGLContext>
// -- VTK stuff
#include <vtkObjectFactory.h>
...
...
@@ -362,7 +364,7 @@ void vtkInteractorStylePick::PrintSelf ( ostream& os, vtkIndent indent ) {
QMap
<
RendererWidget
::
ScreenshotFormat
,
RendererWidget
::
ScreenshotFormatInfo
*>
screenshotMap
;
//---------------------- Constructor ------------------------
RendererWidget
::
RendererWidget
(
QWidget
*
parent
,
ControlMode
mode
)
:
QVTKWidget
(
parent
)
{
RendererWidget
::
RendererWidget
(
QWidget
*
parent
,
ControlMode
mode
)
:
QVTKWidget
2
(
parent
)
{
setObjectName
(
"RendererWidget"
);
//-- initialize screenshotMap only at the first invocation of constructor
...
...
@@ -379,7 +381,65 @@ RendererWidget::RendererWidget(QWidget* parent, ControlMode mode) : QVTKWidget(p
policy
.
setHeightForWidth
(
false
);
setSizePolicy
(
policy
);
//-- display options (this is not a state manage by the renderer, but a property of the actors
//-- OpenGL context on integrated card
// For more information about this problem
// see https://bugzilla-timc.imag.fr/show_bug.cgi?id=181
// Description of the bugfix:
// In order to make it work on integrated cards as well as on GPU (using primusrun
// see below for optirun), RendererWidget is now inheriting from QVTKWidget2 (which
// in turns inherits from QGLWidget, which is deprecated...)
//
// Unfortunately this trigger another bug where, although everything is alright
// when running on the GPU (using primusrun), it does not work on the integrated card.
//
// To make it work on both, the OpenGL format has to be reinitialized.
//
// This might lead to performance issue (not investigated). If this is the case,
// set the environment variable CAMITK_NO_OPENGL_RESET to 1.
// For instance:
// CAMITK_NO_OPENGL_RESET=1 primusrun bin/camitk-imp
// or
// CAMITK_NO_OPENGL_RESET=1 bin/camitk-imp
//
// If the CAMITK_NO_OPENGL_RESET environment variable is set to 1, then the OpenGL context will not be
// reset.
// Note for bumblebee users on Linux:
// There is a bug in bumblebee/optirun, see https://bugreports.qt.io/browse/QTBUG-33258
// you need to use primusrun (which is also the bumblebee developer team recommendation)
/*
qDebug() << "------------------------ OpenGL information -------------------------" ;
qDebug() << "OpenGL Versions Supported: " << QGLFormat::openGLVersionFlags() ;
qDebug() << "Current format:" << format();
qDebug() << "Context valid: " << context()->isValid() ;
qDebug() << "Direct rendering: " << context()->format().directRendering();
qDebug() << "Context OpenGL Version: " << context()->format().majorVersion() << "." << context()->format().minorVersion() ;
qDebug() << "Vendor: " << (const char*)glGetString(GL_VENDOR);
qDebug() << "Renderer: " << (const char*)glGetString(GL_RENDERER);
qDebug() << "Version: " << (const char*)glGetString(GL_VERSION) ;
qDebug() << "GLSL version: " << (const char*)glGetString(GL_SHADING_LANGUAGE_VERSION) ;
qDebug() << "---------------------------------------------------------------------\n";
*/
QProcessEnvironment
env
=
QProcessEnvironment
::
systemEnvironment
();
bool
resetOpenGL
=
true
;
if
(
env
.
contains
(
"CAMITK_NO_OPENGL_RESET"
)
&&
env
.
value
(
"CAMITK_NO_OPENGL_RESET"
)
==
"1"
)
{
CAMITK_INFO
(
"RendererWidget"
,
"constructor"
,
"CAMITK_NO_OPENGL_RESET on: QGLFormat is not reset
\n
"
);
resetOpenGL
=
false
;
}
if
(
resetOpenGL
)
{
// recreate a format, using some default from the current context
QGLFormat
newFormat
;
newFormat
.
setProfile
(
context
()
->
format
().
profile
());
newFormat
.
setDepthBufferSize
(
context
()
->
format
().
depthBufferSize
());
newFormat
.
setStencilBufferSize
(
context
()
->
format
().
stencilBufferSize
());
context
()
->
setFormat
(
newFormat
);
}
//-- display options (this is not a state managed by the renderer, but a property of the actors)
backfaceCulling
=
false
;
displayCopyright
=
true
;
rendering3DRedBlue
=
false
;
...
...
@@ -1263,13 +1323,13 @@ void RendererWidget::mousePressEvent ( QMouseEvent* event ) {
if
(
event
->
button
()
==
Qt
::
RightButton
)
{
emit
rightButtonPressed
();
}
QVTKWidget
::
mousePressEvent
(
event
);
QVTKWidget
2
::
mousePressEvent
(
event
);
}
}
//--------------------- mouseReleaseEvent ----------------------------------
void
RendererWidget
::
mouseReleaseEvent
(
QMouseEvent
*
event
)
{
QVTKWidget
::
mouseReleaseEvent
(
event
);
QVTKWidget
2
::
mouseReleaseEvent
(
event
);
endPicking
();
}
...
...
@@ -1309,7 +1369,7 @@ void RendererWidget::mouseMoveEvent(QMouseEvent* event) {
// just keep the button pressed
//pick();
}
QVTKWidget
::
mouseMoveEvent
(
event
);
QVTKWidget
2
::
mouseMoveEvent
(
event
);
}
...
...
sdk/libraries/core/viewer/RendererWidget.h
View file @
338a9baa
...
...
@@ -30,10 +30,14 @@
#include "CamiTKAPI.h"
// -- VTK stuff
#include <QVTKWidget.h>
#include <QVTKWidget
2
.h>
#include <vtkSmartPointer.h>
#include <vtkInteractorStyle.h>
// additional needed headers for QVTKWidget2
#include <vtkGenericOpenGLRenderWindow.h>
#include <vtkRenderWindowInteractor.h>
#include <QVTKInteractor.h>
// -- VTK stuff classes
class
vtkRenderer
;
class
vtkInteractorStyle
;
...
...
@@ -112,14 +116,14 @@ namespace camitk{
*
* The Core companion class is InteractiveViewer (which delegates all vtk stuff to RendererWidget.
*
* It is directly based on QVTKWidget, the GUI support class available in Vtk version >= 5.0
* It is directly based on QVTKWidget
2
, the GUI support class available in Vtk version >= 5.0
* This is a pure Qt/vtk wrapper class (no Core stuff).
*
* For developers: please check the coding policy in InteractiveViewer API documentation first.
*
*
**/
class
CAMITK_API
RendererWidget
:
public
QVTKWidget
{
class
CAMITK_API
RendererWidget
:
public
QVTKWidget
2
{
Q_OBJECT
Q_ENUMS
(
ControlMode
CameraOrientation
);
// so that it can be used in property editor
...
...
sdk/testapplications/testactions/main.cpp
View file @
338a9baa
...
...
@@ -26,10 +26,10 @@
// -- Core stuff
#include <Application.h>
#include <MainWindow.h>
#include <Action.h>
#include <InteractiveViewer.h>
#include <Core.h>
#include <ExtensionManager.h>
#include <Action.h>
using
namespace
camitk
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment