<div dir="ltr">I thought you are using vtkRenderWindow and vtkRenderer for the visualization. After seeing your code I realized you are using vtkImageViewer2. vtkImageViewer2 is a convenient class which bundles all the necessary classes for the visualization. <br>
<br>If you rotate the objects rendered in the viewer, you should be able to see the circle, because it must be behind the image that&#39;s why you are not seeing it.<br><br>To overcome this problem either use separate vtkRenderWindow+vtkRenderer with coincidentTopologyToPolygonOffset in mapper or set appropriate offset to the circle actor (in Z direction).<br>
<br>Hope this helps!<br><br>Jothy<br><br><div class="gmail_quote">On Thu, Aug 19, 2010 at 2:14 PM, Bertrand de Boisdeffre <span dir="ltr">&lt;<a href="mailto:bertrand.boisdeffre@gmail.com">bertrand.boisdeffre@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">The language what i use is C#. I can&#39;t call a class static method, with an object of this class. The call of these methods have to be like this :<br>
<br>ClassName.StaticMethod();<br><br>// this code is wrong<br>Class classObject = new Class();<br>
classObject.StaticMethod();<div><div></div><div class="h5"><br><br><div class="gmail_quote">2010/8/19 Jothy <span dir="ltr">&lt;<a href="mailto:jothybasu@gmail.com" target="_blank">jothybasu@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div dir="ltr">What about setting sliceMapper-&gt;SetSetResolveCoincidentTopologyToPolygonOffset() ?<br><font color="#888888"><br>Jothy</font><div><div></div><div><br><br><div class="gmail_quote">On Thu, Aug 19, 2010 at 11:03 AM, Bertrand de Boisdeffre <span dir="ltr">&lt;<a href="mailto:bertrand.boisdeffre@gmail.com" target="_blank">bertrand.boisdeffre@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> I tried this code (maybe wrong):<br><br>vtkPolyDataMapper.SetSetResolveCoincidentTopologyToPolygonOffset() slicemapper= vtkPolyDataMapper.New();<br>


sliceMapper.SetInput( &quot;&quot;);<br>...<br><br>but it doesn&#39;t resolve my problem. However, this method is static and i don&#39;t know if i have to call it as I do in my code.<br>
<br><div class="gmail_quote">2010/8/19 Jothy <span dir="ltr">&lt;<a href="mailto:jothybasu@gmail.com" target="_blank">jothybasu@gmail.com</a>&gt;</span><div><div></div><div><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">



<div dir="ltr">Try setting .SetResolveCoincidentTopologyToPolygonOffset in the vtkPolyDataMapper.<br><font color="#888888"><br><br>Jothy<br><br></font><div class="gmail_quote"><div><div></div><div>On Thu, Aug 19, 2010 at 9:18 AM, Bertrand de Boisdeffre <span dir="ltr">&lt;<a href="mailto:bertrand.boisdeffre@gmail.com" target="_blank">bertrand.boisdeffre@gmail.com</a>&gt;</span> wrote:<br>




</div></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div>Hi,<br>I have an issue about actors transparency. I try to display in a 3D scene, some volumes ( vtkPolyData are the source) intersected by a plane which has an image texture. <br>




I manage to display correctly all my actors, but when i set an actor opacity to a value different to 1, if this actor is located beetween the camera and the &quot;image plane&quot;, it diseapears. <br>
<br>Here is my code to built my &quot;image plane&quot;:<br><br> vtkActor sliceActor = new vtkActor();<br>            // ImageSlice full path<br>            string imageFullPath = System.IO.Path.GetFullPath(xmlBinding.GetSlice(XmlSlice.SliceRef).pictureRelativePathWithOverlays); <br>





<br>            // Read the file<br>            vtkPNGReader imageReader = new vtkPNGReader();<br>            if(System.IO.File.Exists(imageFullPath))<br>            {<br>                imageReader.SetFileName(imageFullPath);<br>





                imageReader.Update();<br><br> vtkPlaneSource plane = vtkPlaneSource.New();<br>                plane.SetOrigin(0, 0, 0);<br><br>                if (XmlSlice.SliceRef != 0)<br>                {<br>                    plane.SetPoint1(511 * THOutline.PIXELSIZE, 0, 0);<br>





                    plane.SetPoint2(0, 0, -674 * THOutline.PIXELSIZE);<br>                    plane.SetXResolution(1);<br>                    plane.SetYResolution(1);<br><br>                }<br>                else<br>                {<br>





                    plane.SetPoint1(0, 511 * THOutline.PIXELSIZE, 0);<br>                    plane.SetPoint2(0, 0, -674 * THOutline.PIXELSIZE);<br>                    plane.SetXResolution(1);<br>                    plane.SetYResolution(1);<br>





                }<br>                plane.SetCenter(XmlSlice.SlicePos.Xum, XmlSlice.SlicePos.Yum, XmlSlice.SlicePos.Zum + (674 * THOutline.PIXELSIZE / 2 - this.GetFocalPositionImageTopUm()));<br><br>                vtkPolyDataMapper sliceMapper = vtkPolyDataMapper.New();<br>





                sliceMapper.SetInput(plane.GetOutput());<br><br><br>           <br>                sliceActor.SetMapper(sliceMapper);<br><br>                vtkTexture sliceTexture = vtkTexture.New();<br>                sliceTexture.SetInput(imageReader.GetOutput());<br>





                sliceTexture.InterpolateOn();<br>                sliceTexture.SetQualityTo32Bit();<br><br>                sliceActor.SetTexture(sliceTexture);<br><br>                }<br>            return sliceActor;<br>





<br>So the image is correctly display, but if i had an a other actor as in this schema (top view):<br><br>                           _________                                 : image slice actor<br>                        <br>





                         00000000000                               : &quot;volume actor&quot;<br><br>                                 <br>                                   -<br>                                  | |                                       : camera<br>





<br><br> if volume actor opacity = 1, all work well.<br>if volume actor opacity != 1 =&gt;  <br><br>                            _________       : image slice actor<br><br><br clear="all">                           0               00   : &quot;volume actor&quot;<br>





<br>                                  <br>                                   -<br>                                  | |               : camera<br><br><br>I make some researches on web, and i found (maybe) a solution : using &quot;vtkDephtSortPolyData but I am not sure to know how it works ( and maybe it is not the solution) .<br>





<br>So i ask your help.<br><br>Best Regards,<br><font color="#888888">-- <br>Bertrand de Boisdeffre<br>Etudiant 2A  SICOM Phelma Grenoble-INP<br><br>
</font><br></div></div><div>_______________________________________________<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>
<br></div></blockquote></div><br></div>
</blockquote></div></div></div><div><div></div><div><br><br clear="all"><br>-- <br>Bertrand de Boisdeffre<br>Etudiant 2A  SICOM Phelma Grenoble-INP<br><br>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>Bertrand de Boisdeffre<br>Etudiant 2A  SICOM Phelma Grenoble-INP<br><br>
</div></div></blockquote></div><br></div>