Thanks, I converted to ijk coordinates. Now one more question: <br><br>"The contours are input as <a href="http://www.vtk.org/doc/nightly/html/classvtkPolyData.html" title="concrete dataset represents vertices, lines, polygons, and triangle strips" target="_blank">vtkPolyData</a>, with the contours being polys in the <a href="http://www.vtk.org/doc/nightly/html/classvtkPolyData.html" title="concrete dataset represents vertices, lines, polygons, and triangle strips" target="_blank">vtkPolyData</a>."<br>
<br>If my vtkPolyData is lines, most I convert lines to polys?<br><br><div class="gmail_quote">2011/2/4 Lars Friedrich Lars <span dir="ltr"><<a href="mailto:lars-friedrich@gmx.net">lars-friedrich@gmx.net</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Andrej,<br>
<br>
it's possibly right that all input points are double-casted integers. However, the example nicely shows how to overcome the primary limitation of vtkVoxelContoursToSurfaceFilter by adapting the underlying voxel-spacing and converting to ijk-coordinates first, and then back-transforming the output mesh to world coordinates again.<br>
<br>
Have a closer look on the code blocks statring with these comments:<br>
<br>
// Convert to ijk coordinates for the contour to surface filter<br>
<br>
and<br>
<br>
// Rescale the output back into world coordinates and center it<br>
<br>
.<br>
<br>
HTH,<br>
lars<br>
<br>
-------- Original-Nachricht --------<br>
> Datum: Fri, 4 Feb 2011 16:50:42 +0300<br>
> Von: Andrej Gluhov <<a href="mailto:realandron@gmail.com">realandron@gmail.com</a>><br>
> An: David Doria <<a href="mailto:daviddoria@gmail.com">daviddoria@gmail.com</a>>, vtkusers <<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>><br>
> Betreff: Re: [vtkusers] How to create 3d surface from vtkPolyData?<br>
<div class="im"><br>
> Yes, I looked. In this example all points are integer values in double<br>
> format. My contours have points with double value...<br>
><br>
> vtkVoxelContoursToSurface description:<br>
><br>
> create surface from contours<br>
><br>
</div>> vtkVoxelContoursToSurfaceFilter<<a href="http://www.vtk.org/doc/nightly/html/classvtkVoxelContoursToSurfaceFilter.html" target="_blank">http://www.vtk.org/doc/nightly/html/classvtkVoxelContoursToSurfaceFilter.html</a>>is<br>
<div class="im">> a filter that takes contours and produces surfaces. There are some<br>
> restrictions for the contours:<br>
><br>
> š š- The contours are input as<br>
</div>> vtkPolyData<<a href="http://www.vtk.org/doc/nightly/html/classvtkPolyData.html" target="_blank">http://www.vtk.org/doc/nightly/html/classvtkPolyData.html</a>>,<br>
<div class="im">> š šwith the contours being polys in the<br>
</div>> vtkPolyData<<a href="http://www.vtk.org/doc/nightly/html/classvtkPolyData.html" target="_blank">http://www.vtk.org/doc/nightly/html/classvtkPolyData.html</a>><br>
> š š.<br>
> š š- The contours lie on XY planes - each contour has a constant Z<br>
<div class="im">> š š- The contours are ordered in the polys of the<br>
</div>> vtkPolyData<<a href="http://www.vtk.org/doc/nightly/html/classvtkPolyData.html" target="_blank">http://www.vtk.org/doc/nightly/html/classvtkPolyData.html</a>>such<br>
<div><div></div><div class="h5">> that all contours on the first (lowest) XY plane are first, then<br>
> š šcontinuing in order of increasing Z value.<br>
> š š- *The X, Y and Z coordinates are all integer values.*<br>
> š š- The desired sampling of the contour data is 1x1x1 - Aspect can be<br>
> used<br>
> š što control the aspect ratio in the output polygonal dataset.<br>
><br>
><br>
><br>
> 2011/2/4 David Doria <<a href="mailto:daviddoria@gmail.com">daviddoria@gmail.com</a>><br>
><br>
> > 2011/2/4 Andrej Gluhov <<a href="mailto:realandron@gmail.com">realandron@gmail.com</a>>:<br>
> > > Hello.<br>
> > ><br>
> > > I have series of contours in vtkAppendPolyData. How to create surface?<br>
> > > vtkVoxelContoursToSurface needs integer points!<br>
> ><br>
> > What do you mean it needs integer points? Have you looked at this<br>
> > example<br>
> > <a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ContoursToSurface" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ContoursToSurface</a><br>
> > ?<br>
> ><br>
> > David<br>
> ><br>
><br>
><br>
><br>
> --<br>
> ó õ×ÁÖÅÎÉÅÍ,<br>
> áÎÄÒÅÊ.<br>
> Best regards, Andrew<br>
<br>
</div></div><font color="#888888">--<br>
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit<br>
gratis Handy-Flat! <a href="http://portal.gmx.net/de/go/dsl" target="_blank">http://portal.gmx.net/de/go/dsl</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>ó õ×ÁÖÅÎÉÅÍ,<br>áÎÄÒÅÊ.<br>Best regards, Andrew<br>