Here's something to try.. Right after you setup the vtkContourFilter (This is in C++)<br><br><span style="font-family: courier new,monospace;"></span><div style="margin-left: 40px;"><span style="font-family: courier new,monospace;">
vtkContourFilter *contour = vtkContourFilter::New();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">contour-&gt;SetInput(blah);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">... configure the contour ...</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">contour-&gt;Update();</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">for(int cid = 0; cid &lt; contour-&gt;GetOutput()-&gt;GetNumberOfCells(); cid++) {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; vtkCell *acell = contour-&gt;GetOutput()-&gt;GetCell(cid);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; printf(&quot;Polygon %i: (%i points)\n&quot;, cid, acell-&gt;GetNumberOfPoints());
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; for(int pid=0; pid &lt; acell-&gt;GetNumberOfPoints(); pid++) {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; double *point = contour-&gt;GetOutput()-&gt;GetPoint(aCell-&gt;GetPointId(pid));</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf(&quot;\tPoint %i: %lf, %lf, %lf\n&quot;, pid, point[0], point[1], point[2]);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; }</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">}</span><br></div><br><div><span class="gmail_quote">On 1/29/06, <b class="gmail_sendername">Syed Amjad</b> &lt;<a href="mailto:majeed.amjad@gmail.com">majeed.amjad@gmail.com
</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi, <br>
<br>
I wanted to know how I can get cell or array information form vtk. I'm using vtkContourFilter on some data that I have read, <br>
<br>
NOW I ONLY WANT TO GET THE COORDINATES of the POLYGONS on the CONTOUR..<br>
<br>
how can I do this?? <br>
<br>
I've tried GetNextCell() but it returns zero? <br>
I've read the class referrence and tried all the funcions but for some
reason the data is read properly and rendered but when I try to extract
the PolyData, I get nothing, <br>
ie <br>
<br>
for lets say after reading the data, I try getCells() functions I get a nice round 0. <br>
<br>
I know it's reading properly because it renders fine....<br>
<br>
Q: <br>
<br>
How can I get the coordinates out of the polydata once i've applied the contourfilter??<br>
<br>
<br>
Thankyou,<br>
<br>
<br>

<br>_______________________________________________<br>This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers
</a><br><br><br></blockquote></div><br><br clear="all"><br>-- <br>Randall Hand<br>Visualization Scientist, <br>ERDC-MSRC Vicksburg, MS<br>Homepage: <a href="http://www.yeraze.com">http://www.yeraze.com</a>