[vtkusers] vtkSCLReader, vtkContourFilter-Output

Joshua Thomas joshua.j.thomas at gmail.com
Sat Jul 30 00:14:46 EDT 2005


Hi All,
 I am creating a pipeline in vtk  reading the data (CT Scanner vw_knee.slc)
I created the surface using vtkContourFilter object i chose the
density units as 75.
I used the extra objects such as PolyDataMapper with the Actor
Addactor GetOutput etc.,
I set properties in the actor as ScalarVisibilityOff . I tidying up
with vtkOutlineFilter. But i donot know how to use vtkExtractVOI for
the sub-sampling the data. Below is the source code (vtk with Tcl)
## Now i can see the knee joint bones but not the skin. Can anyone help!
#######################################################
package require vtk
package require vtkinteraction

##To read the knee data
## Using SCL Reader

vtkSLCReader reader
reader SetFileName "$VTK_DATA_ROOT/Data/vw_knee.slc"

vtkContourFilter contours
  contours SetInput [reader GetOutput]
  contours SetValue 0 75
  

# The contour lines are mapped to the graphics
vtkPolyDataMapper contMapper
  contMapper SetInput [contours GetOutput]
  contMapper SetScalarRange 0.0 1.2

vtkActor contActor
  contActor SetMapper contMapper

# Create outline an outline of the vw_knee data.
vtkOutlineFilter outline
  outline SetInput [reader GetOutput]

vtkPolyDataMapper outlineMapper
  outlineMapper SetInput [outline GetOutput]
  outlineMapper ScalarVisibilityOff 

vtkActor outlineActor
  outlineActor SetMapper outlineMapper
  eval [outlineActor GetProperty] SetColor 1 1 1 

# Create the renderer, render window, and interactor.
vtkRenderer ren1
vtkRenderWindow renWin
    renWin AddRenderer ren1
vtkRenderWindowInteractor iren
    iren SetRenderWindow renWin

# Set the background color to white.
# renderer.
ren1 SetBackground 0.1 0.2 0.4
ren1 AddActor contActor
ren1 AddActor outlineActor

# Zoom in a little bit. Associate the Tk interactor popup with a user

[ren1 GetActiveCamera] Zoom 0.8
iren AddObserver UserEvent {wm deiconify .vtkInteract}
iren Initialize;

# Hide the root Tk window 
wm withdraw .

###Need your Help####

Regards,
JJ
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtk-output-knee-joint.JPG
Type: image/jpeg
Size: 12866 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050730/40272177/attachment.jpeg>


More information about the vtkusers mailing list