[vtkusers] How to get opengl texture id from vtkImagePlaneWidget
LaChen
sam24666806 at gmail.com
Wed Oct 7 04:00:49 EDT 2015
LaChen wrote
> 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().
I find the reason why I get nullptr.
I needs to use ImagePanelWidget::InteractorOn().
But I still can't get real slicing of image with index I set.
Does someone encounter same situation??
--
View this message in context: http://vtk.1045678.n5.nabble.com/How-to-get-opengl-texture-id-from-vtkImagePlaneWidget-tp5734295p5734296.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list