[vtkusers] How to get opengl texture id from vtkImagePlaneWidget

LaChen sam24666806 at gmail.com
Wed Oct 7 02:58:34 EDT 2015


Hi, I use vtkImagePlaneWidget and set an offscreen renderer as default
renderer.

The reason I do that is I wan't to get slide image texture id by the codes
as follow :

   vtkTextureObject *texture_obj =
vtkOpenGLTexture::SafeDownCast(m_slider_widget[i].GetVTKImagePlaneWidgetPtr()->GetTexture())->GetTextureObject();

texture_id = texture_obj->GetHandle();

But I always get null pointer of vtkTextureObject.

I have no idea about this problem.

P.S. I try to get the handle after executing default renderer->Render().





--
View this message in context: http://vtk.1045678.n5.nabble.com/How-to-get-opengl-texture-id-from-vtkImagePlaneWidget-tp5734295.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list