[vtkusers] How to render images from 2 different datasets at the same time in the same render window

Jesse Neri neri at hobbes.nrl.navy.mil
Fri Sep 6 15:36:03 EDT 2002


> -----Original Message-----
> From: vtkusers-admin at public.kitware.com
> [mailto:vtkusers-admin at public.kitware.com]On Behalf Of vtk replies
> Sent: Friday, September 06, 2002 2:52 PM
> To: vtkusers at public.kitware.com
> Subject: [vtkusers] How to render images from 2 different datasets at
> the same time in the same render window
> 
> 
> Hello all,
> I have 2 datasets, one structured Grid and the other
> structured Points. I have to extract isosurfaces form
> these 2 datasets and render them on to the same render
> window at the same time.
> 
> The 2 images that I render from these 2 datasets are a
> parts of a single image, but the datasets cannot be
> merged for some reason.
> 
> 
> Would anyone happen to know how this can be done ?
> 
> Thanks in advance for any help. 
> 
> regards
> 
> Joseph.
> 
  as long as the spatial representations overlap, just
construct both isosurface sets, and commit the actors to
the same render window. I do similar stuff all the time.

Tcl code snippet: 

vtkContourFilter isosurface1
   isosurface1 SetInput [Dataset1 GetOutput]
   ... set contour levels and numbers  ...

vtkPolyDataMapper isomap1
  isomap1 SetInput [isosurface1 GetOutput]
  ...  set lookuptable and scale range ...

vtkActor isoactor1
   isoactor1 SetMapper isomap1

ren1 AddActor isoactor1

....  do the same for the next data set   ...

vtk has no problems with multiple actors in the same render
window, with disparate data streams.  Simply works.

Jess Neri



More information about the vtkusers mailing list