[vtkusers] vtkSLCReader; vtkContourFilter-

Amy Squillacote amy.squillacote at kitware.com
Wed Jul 27 09:03:41 EDT 2005


The vtkPolyDataMapper and vtkContourFilter have nothing to do with 
reading data.  The vtkSLCReader produces output that is 
vtkImageData.  If you want to create isosurfaces of your data, then 
pass it through the vtkContourFilter, and pass the output of 
vtkContourFilter to a vtkPolyDataMapper for rendering.  Your pipeline 
(in Tcl) should look something like the following.

vtkSLCReader reader
reader SetFileName "your/file/name.slc"

vtkContourFilter contour
contour SetInput [reader GetOutput]
contour SetValue 0 50   # I picked this value at random; you will 
need to determine what the appropriate contour value is for your visualization.

vtkPolyDataMapper mapper
mapper SetInput [contour GetOutput]

vtkActor actor
actor SetMapper mapper

vtkRenderer ren
ren AddActor actor

vtkRenderWindow renWin
renWin AddRenderer ren

renWin Render      # This will cause your pipeline to update and 
display your visualization.


- Amy

At 08:41 AM 7/27/2005, Joshua Thomas wrote:
>Dear All
>
>I want to read vw_knee.slc data from the VTKDATA folder using
>
>vtkSLCReader.
>
>I tried using
>vtkSLCReader reader
>     reader SetFileName "$VTK_DATA_ROOT \Data\vw_knee.slc
>
>I couldn't succeed.  How do i use the vtkPolyMapper and
>vtkContourFilter to fix this problem,
>
>Can anyone help!!
>
>Thanks in advance
>JJ
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: 
>http://www.vtk.org/Wiki/VTK_FAQ
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list