Cannot use 3d VTK view in icy


I am trying to view an image stack in 3d. I get the following error from the VTK Canvas. I cannot select the 3D VTK option that I see in the tutorial files but I do see the 3d glasses which I assume is the replacement icon.

System info
OS - mint LMDE4
GFX card - Nvidia GTX 1060M
memory - 32GB
driver: nivida-driver
java JDK from website
my opengl says 3.0

icy on startup

OpenJDK Runtime Environment 1.8.0_242-b08 (64 bit)
Running on Linux 5.9.0-0.bpo.5-amd64 (amd64)
Number of processors : 12
System total memory : 32.6 GB
System available memory : 27.5 GB
Max java memory : 16.7 GB
Image cache initialized (reserved memory = 6515 MB, disk cache location = /tmp)

VTK 6.3.0 library successfully loaded…

Icy Version started !

*** UPDATE***
Switch to the java package on the website. I can click the 3d glasses but ICY crashes completely. I get a vtk log with the following

Warning: In /home/stephane/Documents/dev/vtk/6.3/source/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line 428
vtkGenericOpenGLRenderWindow (0x7fe75c194cf0): VTK is designed to work with OpenGL version 3.2 but it appears it has been given a context that does not support 3.2. VTK will run in a compatibility mode designed to work with OpenGL 2.1 but some features may not work.

ERROR: In /home/stephane/Documents/dev/vtk/6.3/source/Rendering/OpenGL2/vtkShaderProgram.cxx, line 366
vtkShaderProgram (0x7fe6543a3570): 1: /*=========================================================================
3:   Program:   Visualization Toolkit
4:   Module:    vtkPolyDataFS.glsl
6:   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7:   All rights reserved.
8:   See Copyright.txt or for details.
10:      This software is distributed WITHOUT ANY WARRANTY; without even
11:      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12:      PURPOSE.  See the above copyright notice for more information.
14: =========================================================================*/
15: // Template for the polydata mappers fragment shader
17: // The following line handle system declarations such a
18: // default precisions, or defining precisions to null
19: #version 120
20: #extension GL_EXT_gpu_shader4 : require
21: #define highp
22: #define mediump
23: #define lowp
25: uniform int PrimitiveIDOffset;
27: // VC position of this fragment
28: //VTK::PositionVC::Dec
30: // optional color passed in from the vertex shader, vertexColor
31: uniform float opacityUniform; // the fragment opacity
32: uniform vec3 ambientColorUniform; // intensity weighted color
33: uniform vec3 diffuseColorUniform; // intensity weighted color
36: // optional surface normal declaration
37: //VTK::Normal::Dec
39: // extra lighting parameters
40: //VTK::Light::Dec
42: // Texture coordinates
43: //VTK::TCoord::Dec
45: // picking support
46: //VTK::Picking::Dec
48: // Depth Peeling Support
49: //VTK::DepthPeeling::Dec
51: // clipping plane vars
52: //VTK::Clip::Dec
54: // the output of this shader
55: //VTK::Output::Dec
57: // Apple Bug
58: //VTK::PrimID::Dec
60: void main()
61: {
62:   // Apple Bug
63:   //VTK::PrimID::Impl
65:   //VTK::Clip::Impl
67:   vec3 ambientColor;
68:   vec3 diffuseColor;
69:   float opacity;
70:   ambientColor = ambientColorUniform;
71:   diffuseColor = diffuseColorUniform;
72:   opacity = opacityUniform;
75:   // Generate the normal if we are not passed in one
76:   //VTK::Normal::Impl
78:   gl_FragData[0] =  vec4(ambientColor + diffuseColor, opacity);
80:   //VTK::TCoord::Impl
82:   if (gl_FragData[0].a <= 0.0)
83:     {
84:     discard;
85:     }
87:   //VTK::DepthPeeling::Impl
89:   //VTK::Picking::Impl
91: }

ERROR: In /home/stephane/Documents/dev/vtk/6.3/source/Rendering/OpenGL2/vtkShaderProgram.cxx, line 367
vtkShaderProgram (0x7fe6543a3570): 0:20(12): error: extension `GL_EXT_gpu_shader4' unsupported in fragment shader

I also have this hs_error file that is quite large that as a core dump.

OK so the switch to the correct openjdk-8 allows me to see the 3d VTK option that was just missing with openjdk-11. This error message suggest that ICY as a program is using the wrong openGL profile.

$ glxinfo | grep "OpenGL"
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2) 
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.3.6
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 18.3.6
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 18.3.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

So I have a version of opengl installed that should be compatible. If I set the environmental variable to
MESA_GL_VERSION_OVERRIDE to a value that is greater than 3.2, I avoid the hard crash. All I get is a blank screen instead of render. No error log is generated. I feel this is a bug on between VTK and opengl but not sure what to do next.

@Stephane ← I am just tagging you to let you know that this issue extends to Linux. I saw the discussion on the other thread for MacOS and I just want to make sure Linux users are also in your purview. I think it is the exact same issue with JOGL and the vtk needing updating. I get the same error on windows.

1 Like

Thanks @cell789 !
Indeed i think this is an issue related to the old OpenGL / JOGL library we are using (because of the old VTK library version). When we will upgrade VTK we will also make sure that everything is alright for Linux as well. Thanks again for pointing it :slight_smile:
Unfortunately i think there is no workaround except waiting for the next version…


– Stephane

1 Like

Thank you for your response. I love ICY! eagerly awaiting the update so I can take my analysis to the 3rd dimension!




Do we have a rough estimate on when the next version of ICY would be released? Do you have a docker image that works as a stop gap?

Hi @cell789

We are currently working on it but it may take some time, we hope to be able to deliver it that month.
Reading back your issue specifically, it looks your video driver return an OpenGL version of 3.0 while VTK require 3.2 at least. That seems to be related to this error:

I’m not sure you can update your graphics card driver to have a proper OpenGL 4.0 support (the graphics card support up to 4). Still building a new version of VTK, we should be able to setup that so hopefully the minimum requirement is lower than 3.2.


– Stephane