<div dir="ltr">Hi Julien,<div><br><div>The comment in the code is currently just wishful thinking. HasTranslucentPolygonalGeometry() is called before vtkImageSlice::Render(), which is where the mapper gets updated.</div><div><br></div><div>It's possible that before the VTK 6 pipeline changes, there was an UpdateInformation call that updated the info that HasTranslucentPolygonalGeometry() needs.  But I'm not 100% sure.  IHMO the "Translucency" flag is something that should be set by the app developer, rather than something that VTK tries to figure out on its own.  Translucency of vtkImageActor has been problematic in one way or another ever since the class was introduced.</div><div><br></div><div>If you submit a bug report and assign it to me, then I'll look into this and see if there is a reasonable fix that maintains backwards compatibility.</div><div><br></div><div>For now, one way to avoid this issue is to use vtkImageSliceMapper and vtkImageSlice, instead of using vtkImageActor.  The vtkImageSlice::HasTranslucentPolygonalGeometry() method doesn't try to access the image data.</div><div><br></div><div> - David </div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 2, 2016 at 2:55 AM, Julien Finet <span dir="ltr"><<a href="mailto:julien.finet@kitware.com" target="_blank">julien.finet@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi David and all,</div><div><br></div><div>According to your comment in vtkImageActor::HasTranslucentPolygonalGeometry(),</div><div>mappers are updated before their actors are rendered.</div><div><br></div><div>It does not seem to be the case in my workflow. Where is this Update() supposed to happen ?</div><div><br></div><div>My problem is that when vtkImageSlice::RenderOpaqueGeometry() is called the first time, the mapper has never been updated, the image data has no scalars array, and vtkImageSlice::Render() is called within vtkImageSlice::RenderOpaqueGeometry(). It updates the mapper, so next time RenderTranslucentPolygonalGeometry() is called, Render() is called a second time (because this time I have a scalars array).</div><div><br></div><div>Did I miss something ? Please note that I'm using a custom vtkFollower with my image actor.</div><div><br></div><div>Thanks,</div><div>Julien.</div></div>
</blockquote></div><br></div>