[vtkusers] How to Scale vtkPoints

alex Dowson alexdowson at hotmail.com
Thu Mar 29 07:32:40 EDT 2012


Thanx David.

I will try to do that with vtkTranform and TransformPolyData filter.


Alex


-----Original Message----- 
From: David Doria
Sent: Thursday, March 29, 2012 4:57 PM
To: alex Dowson
Cc: VTK Mailing List
Subject: Re: [vtkusers] How to Scale vtkPoints

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