[vtkusers] Actor depth problem
KS Jothybasu
jothybasu at gmail.com
Wed Dec 23 07:11:41 EST 2009
Hi,
I am rendering a image with vtkimageviewer2 and adding a rectangle over
that. Even though I render the image first and add the rectangle to it the
rectangle over the image is nos visible. What could be the problem. Here is
my cutter code from which the rectangle is obtained froma cube.
See the pic attached.
def AxialCutter(self,Object,SliceNo):
cutPlane=vtk.vtkPlane()
cutPlane.SetOrigin(0,0,SliceNo)
cutPlane.SetNormal(0,0,1)
cutter=vtk.vtkCutter()
cutter.SetCutFunction(cutPlane)
Color=Object.GetProperty().GetColor()
cutter.SetInput(Object.GetMapper().GetInput())
cutter.Update()
cutMapper=vtk.vtkPolyDataMapper()
cutMapper.ScalarVisibilityOn()
cutMapper.SetInputConnection( cutter.GetOutputPort())
color=Object.GetProperty().GetColor()
planeActor=vtk.vtkActor()
#planeActor.GetProperty().SetOpacity(0.5)
planeActor.GetProperty().SetColor(color)
planeActor.GetProperty().SetLineWidth(2)
planeActor.GetProperty().SetAmbient(1)
planeActor.GetProperty().SetDiffuse(0)
planeActor.GetProperty().SetSpecular(0)
planeActor.SetMapper(cutMapper)
return planeActor
Thanks
Jothy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091223/69a0da85/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: untitled.JPG
Type: image/jpeg
Size: 61010 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091223/69a0da85/attachment.jpeg>
More information about the vtkusers
mailing list