General Transforms, anyone?

Tim Hutton T.Hutton at eastman.ucl.ac.uk
Fri Dec 17 05:13:41 EST 1999


Would this class also act as a base class for resampling warps as well?
vtkThinPlateSplineMeshWarp actually changes the points (the geometry) but
the other use for Thin Plate Splines is to leave the geometry unchanged and
resample the scalars. This could then be used to warp images in 2d or 3d,
an essential option I'm sure you'll agree. (Whether it technically
constitutes visualisation as such is another matter.)

How would this fit in as a subclass of vtkGeneralTransform?

At 11:26 16/12/99 -0500, you wrote:
>Hi All,
>
>I'd like to hear what people think about the idea of a 
>'general transform,' i.e. a base class with the following
>methods:
>
>cass vtkGeneralTransform: public vtkObject
>{ 
>  // Description:
>  // Apply transform to 'in', result is placed in 'out'
>  void TransformPoint(double in[3], double out[3]);
>  void TransformPoint(float in[3], float out[3]); 
>
>  // Description:
>  // Apply transform, return result (for use in tcl and python)
>  float *TransformPoint(float x, float y, float z);
>
>  // Description:
>  // Apply transform to a list of points
>  void TransformPoints(vtkPoints *inPts, vtkPoints *outPts);
>
>  (etc.)
>}
>
>The subclasses of the vtkGeneralTransform would be
> - the vtkTransform class
> - the vtkThinPlateSplineTransform class (i.e. Tim Hutton's
>         vtkThinPlateSplineWarpMesh class in modified form)
> - a vtkGridTransform class (a warp transform described as
>         a set of displacement vectors along a uniform grid,
>         I've written it and will be releasing it early next
>         year)
>
>The vtkTransformPolyDataFilter could easily be adapted to apply
>a vtkGeneralTransform to vtkPolyData, and the vtkImageReslice
>class could easily be adapted to apply a vtkGeneralTransform
>to vtkImageData and vtkStructuredPoints data.
>
>The reason I'm proposing this is that I _really_ want to
>use Tim's thin plate spline implementation with my vtkImageReslice 
>filter, and this seems like the cleanest way to do it.
>
> - 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