[vtkusers] How to Scale vtkPoints

David Doria daviddoria at gmail.com
Thu Mar 29 07:27:00 EDT 2012


On Thu, Mar 29, 2012 at 1:08 AM, alex Dowson <alexdowson at hotmail.com> wrote:
>
> Hi
>
> I have vtkPolyData of triangle mesh and I want to rescale vertex (i.e.
> vtkPoints) into range of [-1,1] . How can I do that ?
>
>
> Alex

You can get the bounds of the data with:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DataBounds

Then you can do the appropriate shift and scale operation using this
information to rescale the vtkPoints of your vtkPolyData.

David



More information about the vtkusers mailing list