[vtkusers] Generic vtkMatrix
Marcus D. Hanwell
marcus.hanwell at kitware.com
Tue Nov 24 23:02:24 EST 2009
On Tue, Nov 24, 2009 at 10:05 PM, David Doria
<daviddoria+vtk at gmail.com<daviddoria%2Bvtk at gmail.com>
> wrote:
> I really think it would be nice to have something in VTK to allow users to
> do simple matrix/vector multiplication/addition/transpose/etc without much
> effort and fighting ** type variables. It will also greatly improve the
> interface to many of the vtkMath functions.
>
> I have started working on vtkMatrix here:
> http://www.rpi.edu/~doriad/VTK_List/vtkMatrix/
>
> Take a look at Example.cxx to see the syntax. Can I get some initial
> comments? Is it something that users actually want/actually has a chance of
> making it to VTK? Is this the right structure/way to go about writing such a
> thing? Is there any way we could include some things from VNL in VTK as ITK
> does to avoid reinventing the wheel?
>
> What about using a general purpose library such as Eigen when more features
are needed?
http://eigen.tuxfamily.org/
It has a liberal license (LGPL with template instantiation exceptions), is
header only, provides a well developed and general purpose C++ template
library with a great syntax. You can also get at the underlying pointers to
the data, this could be assigned to the vtkMatrix4x4 for example. I have
used it in previous projects.
I have not had much time to experiment with how easily it can be mixed with
VTK code, but it should be reasonably simple. It would of course add an
extra dependency to your project, and could not be used in VTK code.
Marcus
--
Marcus D. Hanwell, Ph.D.
R&D Engineer, Kitware Inc.
(518) 881-4937
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091124/9b21d04e/attachment.htm>
More information about the vtkusers
mailing list