Commit 4f225325 authored by Jean-Loup Haberbusch's avatar Jean-Loup Haberbusch

Merge branch 'feature/vtk8-compatibiltiy' of...

Merge branch 'feature/vtk8-compatibiltiy' of https://gricad-gitlab.univ-grenoble-alpes.fr/CamiTK/CamiTK into feature/vtk8-compatibiltiy
parents ca9c5238 a2cbf40b
......@@ -189,7 +189,11 @@ Action::ApplyStatus WarpOut::apply() {
for (vtkIdType i = 0; i < connectivityFilter->GetOutput()->GetNumberOfPoints(); i++) {
// get the id of the point in the original point set
#if VTK_MAJOR_VERSION == 8
pointId->GetTypedTuple(i, &id);
#else
pointId->GetTupleValue(i, &id);
#endif
// get the initial point position
resultPointSet->GetPoint(id, pos);
// get the normal
......
......@@ -163,7 +163,7 @@ macro(camitk_extension)
# if this extension is enabled, do everything needed
# otherwise... do nothing
if (${TYPE_EXTENSION_CMAKE}_${EXTENSION_NAME_CMAKE})
if (${${TYPE_EXTENSION_CMAKE}_${EXTENSION_NAME_CMAKE}_ENABLED})
# TARGET NAME
# The target name is composed of the following: [action / component]-name
......@@ -965,7 +965,7 @@ macro(camitk_extension)
camitk_add_integration_test()
endif()
endif() # endif(${TYPE_EXTENSION_CMAKE}_${EXTENSION_NAME_CMAKE})
endif() # ${TYPE_EXTENSION_CMAKE}_${EXTENSION_NAME_CMAKE}_ENABLED
endmacro()
......
......@@ -367,11 +367,11 @@ QMap <RendererWidget::ScreenshotFormat, RendererWidget::ScreenshotFormatInfo*> s
RendererWidget::RendererWidget(QWidget* parent, ControlMode mode) : QVTKWidget2(parent) {
#elif VTK_MAJOR_VERSION == 7
RendererWidget::RendererWidget(QWidget* parent, ControlMode mode) : QVTKWidget(parent) {
RendererWidget::RendererWidget(QWidget * parent, ControlMode mode) : QVTKWidget(parent) {
#elif VTK_MAJOR_VERSION == 8
RendererWidget::RendererWidget(QWidget* parent, ControlMode mode) : QVTKOpenGLNativeWidget(parent) {
RendererWidget::RendererWidget(QWidget * parent, ControlMode mode) : QVTKOpenGLNativeWidget(parent) {
#else
#error "Invalid VTK version: not (yet) supported."
#endif
......@@ -461,7 +461,8 @@ RendererWidget::RendererWidget(QWidget* parent, ControlMode mode) : QVTKOpenGLNa
surfaceFormat.setStencilBufferSize(8);
//surfaceFormat.setStereo(1);
window->setFormat(surfaceFormat);
} else {
}
else {
qWarning("Can't set surface format: No associated QWindow");
}
// QSurfaceFormat fmt;
......@@ -472,6 +473,9 @@ RendererWidget::RendererWidget(QWidget* parent, ControlMode mode) : QVTKOpenGLNa
// fmt.setStencilBufferSize(8);
// QSurfaceFormat::setDefaultFormat(fmt);
#elif VTK_MAJOR_VERSION == 8
// disable multisampling.
vtkOpenGLRenderWindow::SetGlobalMaximumNumberOfMultiSamples(0);
QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat());
#else
#error "Invalid VTK version: not (yet) supported."
......@@ -1176,12 +1180,14 @@ void RendererWidget::setOrientationDecorationsLetters(QString letters[4]) {
if ((letters[i] == "R") || (letters[i] == "L")) {
orientationDecorationsTextMapper[i]->GetTextProperty()->SetColor(1.0, 0.0, 0.0);
}
else if ((letters[i] == "A") || (letters[i] == "P")) {
orientationDecorationsTextMapper[i]->GetTextProperty()->SetColor(0.0, 1.0, 0.0);
}
else if ((letters[i] == "S") || (letters[i] == "I")) {
orientationDecorationsTextMapper[i]->GetTextProperty()->SetColor(0.0, 0.0, 1.0);
}
else
if ((letters[i] == "A") || (letters[i] == "P")) {
orientationDecorationsTextMapper[i]->GetTextProperty()->SetColor(0.0, 1.0, 0.0);
}
else
if ((letters[i] == "S") || (letters[i] == "I")) {
orientationDecorationsTextMapper[i]->GetTextProperty()->SetColor(0.0, 0.0, 1.0);
}
}
}
......@@ -1417,9 +1423,9 @@ void RendererWidget::mouseReleaseEvent(QMouseEvent* event) {
#elif VTK_MAJOR_VERSION == 7
QVTKWidget::mouseReleaseEvent(event);
#elif VTK_MAJOR_VERSION == 8
QVTKOpenGLNativeWidget::mouseReleaseEvent(event);
QVTKOpenGLNativeWidget::mouseReleaseEvent(event);
#else
#error "Invalid VTK version: not (yet) supported."
#endif
......@@ -1440,10 +1446,10 @@ void RendererWidget::mouseMoveEvent(QMouseEvent* event) {
#elif VTK_MAJOR_VERSION == 7
QVTKWidget::mouseMoveEvent(event);
#elif VTK_MAJOR_VERSION == 8
QVTKOpenGLNativeWidget::mouseMoveEvent(event);
#else
#error "Invalid VTK version: not (yet) supported."
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment