[vtkusers] add centered Line on top of the Image

Uril Yakubov uyakubov at rotman-baycrest.on.ca
Tue Nov 11 16:25:33 EST 2008


Hi Users, 

Does anyone now how to add centered line on top of the image? To show my
image I am using example from /Examples/GUI/Tcl/ImagePlaneWidget.tcl .
My problem is that image cover the line and I need opposite affect. Here
is my code added to the end of the example:

#add centered line 
set Line [vtkLineSource New]
    $Line SetPoint1 -50 100 28
    $Line SetPoint2 250 100 28
set LineMapper [vtkPolyDataMapper New] 
    $LineMapper SetInput [$Line GetOutput]

set LineActor [vtkActor New]
    $LineActor SetMapper $LineMapper
    [$LineActor GetProperty] SetColor 1.0 0.0 0.0

# ren1 is instance of vtkRenderer
ren1 AddActor $LineActor



Any help will be appreciated.

Uril.






More information about the vtkusers mailing list