[vtkusers] How to create 3d surface from vtkPolyData?
Lars Friedrich Lars
lars-friedrich at gmx.net
Fri Feb 4 09:42:28 EST 2011
Andrej,
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.
Have a closer look on the code blocks statring with these comments:
// Convert to ijk coordinates for the contour to surface filter
and
// Rescale the output back into world coordinates and center it
.
HTH,
lars
-------- Original-Nachricht --------
> Datum: Fri, 4 Feb 2011 16:50:42 +0300
> Von: Andrej Gluhov <realandron at gmail.com>
> An: David Doria <daviddoria at gmail.com>, vtkusers <vtkusers at vtk.org>
> Betreff: Re: [vtkusers] How to create 3d surface from vtkPolyData?
> Yes, I looked. In this example all points are integer values in double
> format. My contours have points with double value...
>
> vtkVoxelContoursToSurface description:
>
> create surface from contours
>
> vtkVoxelContoursToSurfaceFilter<http://www.vtk.org/doc/nightly/html/classvtkVoxelContoursToSurfaceFilter.html>is
> a filter that takes contours and produces surfaces. There are some
> restrictions for the contours:
>
> - The contours are input as
> vtkPolyData<http://www.vtk.org/doc/nightly/html/classvtkPolyData.html>,
> with the contours being polys in the
> vtkPolyData<http://www.vtk.org/doc/nightly/html/classvtkPolyData.html>
> .
> - The contours lie on XY planes - each contour has a constant Z
> - The contours are ordered in the polys of the
> vtkPolyData<http://www.vtk.org/doc/nightly/html/classvtkPolyData.html>such
> that all contours on the first (lowest) XY plane are first, then
> continuing in order of increasing Z value.
> - *The X, Y and Z coordinates are all integer values.*
> - The desired sampling of the contour data is 1x1x1 - Aspect can be
> used
> to control the aspect ratio in the output polygonal dataset.
>
>
>
> 2011/2/4 David Doria <daviddoria at gmail.com>
>
> > 2011/2/4 Andrej Gluhov <realandron at gmail.com>:
> > > Hello.
> > >
> > > I have series of contours in vtkAppendPolyData. How to create surface?
> > > vtkVoxelContoursToSurface needs integer points!
> >
> > What do you mean it needs integer points? Have you looked at this
> > example
> > http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ContoursToSurface
> > ?
> >
> > David
> >
>
>
>
> --
> С Уважением,
> Андрей.
> Best regards, Andrew
--
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
More information about the vtkusers
mailing list