Hi,<br><br>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.<br>
<br>See the pic attached.<br><br> def AxialCutter(self,Object,SliceNo):<br> cutPlane=vtk.vtkPlane()<br> cutPlane.SetOrigin(0,0,SliceNo)<br> cutPlane.SetNormal(0,0,1)<br><br> cutter=vtk.vtkCutter()<br>
cutter.SetCutFunction(cutPlane)<br> Color=Object.GetProperty().GetColor()<br> cutter.SetInput(Object.GetMapper().GetInput())<br> cutter.Update()<br><br> cutMapper=vtk.vtkPolyDataMapper()<br>
cutMapper.ScalarVisibilityOn()<br> cutMapper.SetInputConnection( cutter.GetOutputPort())<br><br> color=Object.GetProperty().GetColor()<br><br> planeActor=vtk.vtkActor()<br> #planeActor.GetProperty().SetOpacity(0.5)<br>
planeActor.GetProperty().SetColor(color)<br> planeActor.GetProperty().SetLineWidth(2)<br> planeActor.GetProperty().SetAmbient(1)<br> planeActor.GetProperty().SetDiffuse(0)<br> planeActor.GetProperty().SetSpecular(0)<br>
planeActor.SetMapper(cutMapper)<br> return planeActor<br><br>Thanks<br><br>Jothy<br><br><br>