<div class="gmail_quote">On Tue, Nov 24, 2009 at 10:05 PM, David Doria <span dir="ltr"><<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
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.<br>
<br>I have started working on vtkMatrix here:<br><a href="http://www.rpi.edu/~doriad/VTK_List/vtkMatrix/" target="_blank">http://www.rpi.edu/~doriad/VTK_List/vtkMatrix/</a><br><br>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?<br>
<br clear="all"></blockquote><div>What about using a general purpose library such as Eigen when more features are needed?</div><div><br></div><div><a href="http://eigen.tuxfamily.org/">http://eigen.tuxfamily.org/</a></div>
<div><br></div><div>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.</div>
<div><br></div><div>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.</div>
<div><br></div><div>Marcus</div><div>-- </div></div>Marcus D. Hanwell, Ph.D.<br>R&D Engineer, Kitware Inc.<br>(518) 881-4937<br>