<div>Thanks Jerome,</div>
<div> </div>
<div>it is very helpfull your explanation. In my case what i can use to get the info that i need.</div>
<div>From the Online documentation is not clear to me how the get access to the x,y,z coordinates making use of the function available to vtkContourFilter. Any suggestion?<br></div>
<div>Thanks again.</div>
<div>Alessandro.<br></div>
<div class="gmail_quote">On Mon, Oct 26, 2009 at 3:31 PM, Jérôme <span dir="ltr">&lt;<a href="mailto:jerome.velut@gmail.com">jerome.velut@gmail.com</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">In your code, you defined contour as the vtkContourFilter, not a polydata. vtkContourFilter is a subclass of vtkAlgorithm that does not have a GetPoints( ) function. You should take a look to VTK online documentation to see what you can access from a class.<br>
Basically, a subclass of vtkAlgorithm allows you to access input/ouput that could be vtkPointSet<br>From vtkPointSet (such as vtkPolyData, your interest...), you can acces geometry through GetPoints( ) or topology through GetLines( ), GetVerts(), GetPolys( ),...<br>
<br>In your case (from what I read  in your code), contour is a vtkAlgorithm. It cannot be its own output in the same time. <br><br>I hope that helps 
<div>
<div></div>
<div class="h5"><br><br>Jerome<br><br>
<div class="gmail_quote">2009/10/26 Alessandro Artusi <span dir="ltr">&lt;<a href="mailto:artusialessandro4@googlemail.com" target="_blank">artusialessandro4@googlemail.com</a>&gt;</span><br>
<blockquote style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>Dear Bill thanks a lot but it does not work I have still the same Attribute error.</div>
<div> </div>
<div>I repeat contour is where i store the output of teh vtkContourFilter(), may be it does not inerithance the GetPoints().....</div>
<div> </div>
<div>Any other suggestion?</div>
<div> </div>
<div>The vtkContourFilter has not any <br><br></div>
<div>
<div></div>
<div>
<div class="gmail_quote">On Mon, Oct 26, 2009 at 2:44 PM, Bill Lorensen <span dir="ltr">&lt;<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">You must do<br>contour.Update()<br><br>before accessing the points.<br>
<div>
<div></div>
<div><br>On Mon, Oct 26, 2009 at 8:26 AM, Alessandro Artusi<br>&lt;<a href="mailto:artusialessandro4@googlemail.com" target="_blank">artusialessandro4@googlemail.com</a>&gt; wrote:<br>&gt; Thanks a lot Jerome,<br>&gt;<br>
&gt; I get an errore:<br>&gt;<br>&gt; AttributeError GetPoints.<br>&gt;<br>&gt; May be I am doing something wrong; what i  am doing is the following:<br>&gt;<br>&gt; contour = vtk.vtkContourFilter()<br>&gt; contour.SetInput(grid) #grid is rectilineargrid()<br>
&gt; contour.ComputeNormalOn()<br>&gt; contour.SetValue(0, 95) #my isovalue<br>&gt;<br>&gt; in contour i should have my polyData right?<br>&gt;<br>&gt; when i do what you suggested:<br>&gt;<br>&gt; contour.GetPoints( ).GetPoint( pointId, coord )<br>
&gt;<br>&gt; I got the error.<br>&gt;<br>&gt; Any suggestion?<br>&gt;<br>&gt; Thanks again,<br>&gt; Alessandro.<br>&gt;<br>&gt;<br>&gt; On Mon, Oct 26, 2009 at 1:11 PM, Jérôme &lt;<a href="mailto:jerome.velut@gmail.com" target="_blank">jerome.velut@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>&gt;&gt; Hi,<br>&gt;&gt; vtkPolyData is a vtkPointSet : you can access points coordinates through<br>&gt;&gt;<br>&gt;&gt; polydata-&gt;GetPoints( )-&gt;GetPoint( pointId, coord )<br>&gt;&gt;<br>&gt;&gt; where polydata is your... polydata, pointId is the point Id you want to<br>
&gt;&gt; get (from 0 to NumberOfPoints - 1) and coord is double coord[3] filled by<br>&gt;&gt; the point coordinate.<br>&gt;&gt;<br>&gt;&gt; HTH<br>&gt;&gt; Jerome<br>&gt;&gt;<br>&gt;&gt; 2009/10/26 Alessandro Artusi &lt;<a href="mailto:artusialessandro4@googlemail.com" target="_blank">artusialessandro4@googlemail.com</a>&gt;<br>
&gt;&gt;&gt;<br>&gt;&gt;&gt; Dear All,<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; I have a vtkPolyData from the vtkContourFilter and I need to get the<br>&gt;&gt;&gt; X,Y,Z coordinates of each point in the PolyData. This because I need to<br>
&gt;&gt;&gt; convert them.<br>&gt;&gt;&gt; How can i get this info?<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Thanks a lot for teh help,<br>&gt;&gt;&gt; Alessandro.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Visit other Kitware open-source projects at<br>&gt;&gt;&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt;&gt;<br>&gt;&gt;&gt; Please keep messages on-topic and check the VTK FAQ at:<br>&gt;&gt;&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt;&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>&gt;&gt;&gt;<br>&gt;&gt;<br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>&gt;<br>&gt; Visit other Kitware open-source projects at<br>&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>&gt; Please keep messages on-topic and check the VTK FAQ at:<br>&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>&gt;<br>&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>&gt;<br>&gt;<br></div></div></blockquote></div><br></div></div></blockquote></div><br></div></div>
</blockquote></div><br>