[vtkusers] vtk can render 3d image realtime?

David Doria daviddoria at gmail.com
Fri Nov 5 07:48:09 EDT 2010


On Fri, Nov 5, 2010 at 6:33 AM, kuan luan <luannauk at gmail.com> wrote:
> Dear all,
> I am a vtk beginner. I am trying to reconstruct a 3d medical image from 2d
> images with spacial coordinates. I use vtk for reconstructing and surface
> rendering.
> now, I have a program for 3d reconstruction from 2d images offline.
> My method is
>   acquire a new 2d image with spacial coordiante,
>   interpolate it into 3d vtkimage.
>   render the 3d vtkimage with new 2d image added,
>   a new vtkRenderWindow is created.
> all procedure run in a while loop.
>
> But, I want to implement it in realtime.
> My problem is I can not render 3d reconstructed image with vtk in realtime.
> How can the 3d vtkimage be rendered again in the same vtkRenderWindow
> without creating a new one?  Is this possible using VTK?  If so please tell
> me how to do it.
>
> I'm using VTK5.4 and Microsoft Visual C++ 2008.
> Any advice is appreciated ;)
> Thank you in advance.

Sure, just create the vtkRenderWindow and vtkRenderer outside (before)
the loop. Then inside the loop just add your new data to the renderer
and call Render() on the renderer and renderWindow.

David



More information about the vtkusers mailing list