[vtkusers] disappearing act
david e ignacio
davidi at cs.uchicago.edu
Tue Feb 10 23:59:48 EST 2004
I believe this is because the viewer.Render() is only called once, so
then the image is only written once. You would need to find something
similar to a vtkRenderWindowInteractor that creates a loop and
repeatedly renders the image.
Hope that helps
dave
On Tue, 2004-02-10 at 22:37, rharder at uiuc.edu wrote:
> Hi,
> I've finally gotten my array to show up as an image. The only
> problem is, the object within the image window disappears if
> another window is placed on top of the image window.
> vtkpython code follows.
>
> data = vtk.vtkDoubleArray()
> data.SetVoidArray(datastring,len(datastring)/data.GetDataTypeSize(),1)
> data.CreateDefaultLookupTable()
>
> id = vtk.vtkImageData()
> id.GetPointData().SetScalars(data)
> id.SetDimensions(256,256,1)
> #id.SetScalarType(vtk.VTK_UNSIGNED_CHAR)
> id.SetSpacing(1.0,1.0,0.0)
> id.SetOrigin(0.0,0.0,0.0)
>
> viewer = vtk.vtkImageViewer()
> viewer.SetInput( id )
> viewer.SetColorWindow(1)
> viewer.SetColorLevel(.5)
> viewer.Render()
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list