<div dir="ltr">Can you remove <br><br>ren.AddActor( self.ia )<br><br>from the class and add it after adding the renderer?<br><br>Jothy<br><br><div class="gmail_quote">On Sat, Feb 11, 2012 at 9:07 AM, Anders Wallin <span dir="ltr"><<a href="mailto:anders.e.e.wallin@gmail.com">anders.e.e.wallin@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Here is a more realistic example of what I want to do:<br>
<a href="http://pastebin.com/3Wz8C8yC" target="_blank">http://pastebin.com/3Wz8C8yC</a><br>
<br>
Now I see different behavior between:<br>
<br>
myim = MyImage(ren) # create vtkImageActor, add it to ren<br>
renWin.Render() # when Render() is called here, we don't see<br>
the results of modify()<br>
myim.modify() # this modifies the vtkCharArray of the image<br>
renWin.Render()<br>
<br>
and<br>
<br>
myim = MyImage(ren) # create vtkImageActor, add it to ren<br>
# without Render() here , the results of modify() are visible<br>
myim.modify() # this modifies the vtkCharArray of the image<br>
renWin.Render() # now we see a modified image!<br>
<br>
<br>
Confused.<br>
<font color="#888888">Anders<br>
</font><div><div></div><div class="h5"><br>
On Fri, Feb 10, 2012 at 11:01 PM, David Doria <<a href="mailto:daviddoria@gmail.com">daviddoria@gmail.com</a>> wrote:<br>
>><br>
>> It turns out there is some subtle difference between<br>
>> vtkRenderer.Render() and vtkRenderWindow.Render()<br>
>><br>
>> This example shows the behavior:<br>
>> <a href="http://pastebin.com/KPFpkCKU" target="_blank">http://pastebin.com/KPFpkCKU</a><br>
>> On my machine I see an unmodified image with "renWin.Render()" and a<br>
>> modified image with "ren.Render()"<br>
>> I had previously used renWin.Render() in all my vtk code, but I have<br>
>> always worked with polydata only.<br>
><br>
><br>
> Quoting David Gobbi from an old mailing list post that I've used ever since:<br>
><br>
> "You should never, ever call renderer->Render(). That method is only<br>
> meant to be called by the vtkRenderWindow. The documentation says<br>
> so quite clearly. By calling it you are probably causing some timestamps<br>
> to be set (indicating that all actors in the renderer have rendered), but<br>
> you<br>
> aren't actually doing any rendering. Then, when you call<br>
> renderWindow->Render() it sees that those timestamps have been updated<br>
> and thinks that there is nothing to be done."<br>
><br>
> I'm not sure why renderWindow->Render() is not working for you in this case.<br>
> Any Python VTK experts out there?<br>
</div></div><div><div></div><div class="h5">_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Jothy<br></div><br>
</div>