[vtkusers] vtkSCLReader, vtkContourFilter-Output

Joshua Thomas joshua.j.thomas at gmail.com
Thu Jul 28 04:56:52 EDT 2005


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtk--output2.JPG
Type: image/jpeg
Size: 38323 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050728/da14aa9b/attachment.jpeg>


More information about the vtkusers mailing list