Proposal for changes to vtkMatrix4x4, vtkTransform

Miller, James V (CRD) millerjv at crd.ge.com
Fri Jul 2 13:53:50 EDT 1999


We'll need to think about this a while.  We have other uses of vtkTransform that may not be
compatible with this (sometimes we use quaterions in place of matrix4x4's).

We'll get back to you on this next week.

JimBill

-----Original Message-----
From: David Gobbi [mailto:dgobbi at irus.rri.on.ca]
Sent: Friday, July 02, 1999 12:14 PM
To: vtkusers at gsao.med.ge.com
Subject: Proposal for changes to vtkMatrix4x4, vtkTransform


VTK users & developers:

I was wondering if anyone would mind if I changed vtkTransform
so that it was a derived class of vtkMatrix4x4.  The changes
are straightforward and wouldn't break anything (I already have
it implemented), but would allow you to use a vtkTransform anywhere that
you would normally use a vtkMatrix4x4.

As well, I'm starting to add warp transformations to
VTK (i.e. a 3D displacement mesh that describes a nonlinear
transformation - it will be a looong time before I'm done), and the
following abstract class would make my life a little easier:

class vtkAbstractTransform : public vtkObject
{
public:
  virtual void ApplyToPoint(float in[3], float out[3]) = 0;
  virtual void ApplyToPoint(double in[3], double out[3]) = 0;
  void ApplyToPoints(vtkPoints *inPts, vtkPoints *outPts);

  virtual void Identity() = 0;
  virtual void Invert() = 0;

// and these are useful for people who use tcl or python,
  float *ApplyToPoint(float in[3]) 
     { this->ApplyToPoint(in,this->Point); return this->Point; };
  float *ApplyToPoint(float x, float y, float z)
     { this->Point[0] = x; this->Point[1] = y; this->Point[2] = z;
       return this->ApplyToPoint(this->Point); };
  (etc. for double)

private:
  float Point[3];
  double DoublePoint[3];
}

This class would be the base class of vtkMatrix4x4 as well as other
(not yet implemented) transformations such as quaternions, warp-mesh
transformations, etc.


 - David

--David Gobbi, MSc                    dgobbi at irus.rri.on.ca
  Advanced Imaging Research Group
  Robarts Research Institute, University of Western Ontario







-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------


-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------





More information about the vtkusers mailing list