[vtkusers] vtkSCLReader, vtkContourFilter-Output

Amy Squillacote amy.squillacote at kitware.com
Thu Jul 28 08:33:07 EDT 2005


Hi Joshua,

You do not see any knee bones because you used the wrong contour 
value(s).  The value of 50 that I used as an example in my last 
e-mail 
(http://public.kitware.com/pipermail/vtkusers/2005-July/081023.html) 
was chosen at random to demonstrate how to use vtkContourFilter.  You 
will need to determine which contour value(s) are right for your visualization.

- Amy

At 04:56 AM 7/28/2005, Joshua Thomas wrote:
>Dear All,
>
>I am using vtk with Tcl
>
>  I read the data through vtkSLCReader (its a knee.slc) using 
> vtkContourFilter.
>
>I can see the output in the rendering window. (Check the Screen Shots)
>But i couldnot see any knee bones.
>
>Below is the source code that i tried and modified.
>###############################################
>package require vtk
>package require vtkinteraction
>
>#To get the knee dataset
>#
>vtkSLCReader reader
>reader SetFileName "$VTK_DATA_ROOT/Data/vw_knee.slc"
>#Apply the ContourFilter
>vtkContourFilter contour
>contour SetInput [reader GetOutput]
>contour SetValue 0 50
>#contour GenerateValues 13 0.0 1.2
>
>
>#vtkPolyDataMapper mapper
>#mapper SetInput [contour GetOutput]
>#mapper Setproperty Scalar Visibility Off
># the above command is a valid one?
>
>vtkPolyDataMapper mapper
>mapper SetInput [contour GetOutput]
>mapper SetScalarRange 0.0 1.2
>
>
>vtkActor actor
>actor SetMapper mapper
>
>vtkRenderer ren1
>ren1 AddActor actor
>#ren1 SetBackground 0 0 0
>##
>#CREATING A RENDER WINDOW WITH SCREENSIZE OF 300 X 300
>vtkRenderWindow renWin
>renWin AddRenderer ren1
>
>#creating an interactive  Render window
>vtkRenderWindowInteractor iren
>iren SetRenderWindow renWin
>renWin SetSize 300 300
>renWin Render
>
>
>#Set background color to white, link with the actor
>ren1 SetBackground 0.1 0.2 0.4
>ren1 AddActor actor
>#ren1 AddActor outlineActor
>
>#Hide the default Tk widget
>wm withdraw .
>
>The rendering is very slow so i want to use sub-sampling the data. How
>to use vtkExtractVOI
>I donot know i am in a right track?
>
>Can anyone help me.
>
>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