VTK Build in ios OpenGL Error 1282

Hello~ I’m freshman at researching volume rendering of medical data.

I’m stuck at error of opengl long time… Help me please.

Build VTK Tag 8.2 for ios by cmake.

I set the build option like this

  • VTK_IOS_BUILD to true
  • Module_vtkDicom to true
  • Module vtkIOImage to true
  • Module vtkIOGeometry to true
  • Module vtkInteractionStyle to true
  • Module vtkRenderingOpenGL to true
  • Module vtkRenderingVolumeOpenGL to true
  • OpenGL_ES_VERSION to 3.0
  • CMAKE_FRAMEWORK_INSTALL_PREFIX to /usr/local/frameworks

And I build vtk.framework well. And I have an few error with running examples/ios/volumerenderer application in vtk example ios. Resolved othre errors, it left one error finally. But I can’t find what cause this error…

Rendering data is sample mr-head.nrrd that is 3 dimension 256 by 256 by 130 and byte data type. Error message occured like this.

Generic Warning: In /Users/wonkieun/Documents/Project/VTK/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx, line 1230

Error after glDrawElements in RenderVolumeGeometry! 1 OpenGL errors detected

0 : (1282) Invalid operation

Generic Warning: In /Users/wonkieun/Documents/Project/VTK/Rendering/VolumeOpenGL2/vtkOpenGLGPUVolumeRayCastMapper.cxx, line 1230

Error after glDrawElements in RenderVolumeGeometry! 1 OpenGL errors detected

0 : (1282) Invalid operation

Strongly, I want to render volume of medical data by ipad… Please help me.

Hi, friend,

Can you post the link to the example you’re trying to run?

cheers,

Paulo

I tried to basic sample volume render application in vtk. (in link)

New vtk 7.0.0 built by same option wokrs well now.

But I met other problem. Well… sample data is rendered normally, but other datas are not.

I want to know the supported data specification in ios vtk and opengl es3.

File type (nrrd, dcm, vtk…), data type (unsigned byte, short, int, float…), resolution (like 512 x 512x 130) are that I want to know. I can’t find them… Information is too little.

// sample CT-chest.nrrrd : normally rendering
NRRD0004
# Complete NRRD file format specification at:
# http://teem.sourceforge.net/nrrd/format.html
type: int
dimension: 3
space: left-posterior-superior
sizes: 512 512 139
space directions: (0.76171898841857932,0,0) (0,0.76171898841857932,0) (0,0,2.5)
kinds: domain domain domain
endian: little
encoding: raw
space origin: (-195.00000000000003,-171.69999694824224,-347.75000000000011)

// other data : nor working
NRRD0004
# Complete NRRD file format specification at:
# http://teem.sourceforge.net/nrrd/format.html
type: short
dimension: 3
space: left-posterior-superior
sizes: 512 512 187
space directions: (0.728515625,0,0) (0,0.728515625,0) (0,0,2)
kinds: domain domain domain
endian: little
encoding: raw
space origin: (-187.1357421875,-320.13574218750006,1444)

Hello, friend,

That link to the example you posted is broken. But googling a bit for “gl error 1282 Invalid operation” led me to some shader errors. Anyway, without the source code I’m just guessing.

cheers,

Paulo