<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"><<a href="mailto:jerome.velut@gmail.com">jerome.velut@gmail.com</a>></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"><<a href="mailto:artusialessandro4@googlemail.com" target="_blank">artusialessandro4@googlemail.com</a>></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"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></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><<a href="mailto:artusialessandro4@googlemail.com" target="_blank">artusialessandro4@googlemail.com</a>> wrote:<br>> Thanks a lot Jerome,<br>><br>
> I get an errore:<br>><br>> AttributeError GetPoints.<br>><br>> May be I am doing something wrong; what i am doing is the following:<br>><br>> contour = vtk.vtkContourFilter()<br>> contour.SetInput(grid) #grid is rectilineargrid()<br>
> contour.ComputeNormalOn()<br>> contour.SetValue(0, 95) #my isovalue<br>><br>> in contour i should have my polyData right?<br>><br>> when i do what you suggested:<br>><br>> contour.GetPoints( ).GetPoint( pointId, coord )<br>
><br>> I got the error.<br>><br>> Any suggestion?<br>><br>> Thanks again,<br>> Alessandro.<br>><br>><br>> On Mon, Oct 26, 2009 at 1:11 PM, Jérôme <<a href="mailto:jerome.velut@gmail.com" target="_blank">jerome.velut@gmail.com</a>> wrote:<br>
>><br>>> Hi,<br>>> vtkPolyData is a vtkPointSet : you can access points coordinates through<br>>><br>>> polydata->GetPoints( )->GetPoint( pointId, coord )<br>>><br>>> where polydata is your... polydata, pointId is the point Id you want to<br>
>> get (from 0 to NumberOfPoints - 1) and coord is double coord[3] filled by<br>>> the point coordinate.<br>>><br>>> HTH<br>>> Jerome<br>>><br>>> 2009/10/26 Alessandro Artusi <<a href="mailto:artusialessandro4@googlemail.com" target="_blank">artusialessandro4@googlemail.com</a>><br>
>>><br>>>> Dear All,<br>>>><br>>>> I have a vtkPolyData from the vtkContourFilter and I need to get the<br>>>> X,Y,Z coordinates of each point in the PolyData. This because I need to<br>
>>> convert them.<br>>>> How can i get this info?<br>>>><br>>>> Thanks a lot for teh help,<br>>>> Alessandro.<br>>>><br>>>><br>>>> _______________________________________________<br>
>>> Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>>>><br>>>> Visit other Kitware open-source projects at<br>>>> <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:<br>>>> <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>>><br>><br>><br>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>><br>> Visit other Kitware open-source projects at<br>> <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:<br>> <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>><br></div></div></blockquote></div><br></div></div></blockquote></div><br></div></div>
</blockquote></div><br>