[vtkusers] vtkTransform::MultiplyPoint() ... Mysterious behavior !

David Gobbi dgobbi at imaging.robarts.ca
Tue May 20 09:10:50 EDT 2003


Hi Sebastien,

Note that MultiplyPoint is only meant to be used on homogeneous
coordinates:

  void MultiplyPoint(const float in[4], float out[4]);

You should use TransformPoint() instead.

Cheers,
 - David

-- 
  David Gobbi, MSc                dgobbi at imaging.robarts.ca
  Advanced Imaging Research Group
  Robarts Research Institute, University of Western Ontario

On Tue, 20 May 2003, Sebastien Auclair wrote:

> Greetings !
>
> A wish to apply a transformation filter to the points of a PolyData.
> If i simply do :
>
> for (int i = 0; i < pointCount;
> {
>         temp = m_polydata->GetPoint( i );
>         transform->MultiplyPoint (buffer,buffer);
> }
> Only half (or so) of the points will be modified !!! And the transformation is a translation that should modifiy all points.
>
> But if i do something "Time Cousuming" like :
>
> for (int i = 0; i < pointCount; i++){
>         temp = m_polydata->GetPoint( i );
>         buffer [0] = (temp)[0];
>         buffer [1] = (temp)[1];
>         buffer [2] = (temp)[2];
>         transform->MultiplyPoint (buffer,buffer);
>
>         (temp)[0] = buffer [0];
>         (temp)[1] = buffer [1];
>         (temp)[2] = buffer [2];
> }
>
> Then it works !!!!
>
> Anyone knows why ?
>
> Thanks !
>
> ____________________________________________
> Seb
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list