<div class="gmail_quote">On Tue, Nov 24, 2009 at 11:44 PM, Aashish Chaudhary <span dir="ltr"><<a href="mailto:aashish.chaudhary@kitware.com">aashish.chaudhary@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi, <br><br>I have extensively used GMTL library. Similar to Eigen its headers only and LGPL license <br><br><a href="http://ggt.sourceforge.net/" target="_blank">http://ggt.sourceforge.net/</a><br><br>It worked reasonably well with VTK and some other SceneGraph libraries for some of the projects me and my colleagues worked on earlier. May be some of concepts can be ported to VTK if not used directly? <br>
<br>~Regards, <br>Aashish<br><br><br><div class="gmail_quote"><div><div></div><div class="h5">On Tue, Nov 24, 2009 at 11:02 PM, Marcus D. Hanwell <span dir="ltr"><<a href="mailto:marcus.hanwell@kitware.com" target="_blank">marcus.hanwell@kitware.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5"><div class="gmail_quote"><div><div></div><div>On Tue, Nov 24, 2009 at 10:05 PM, David Doria <span dir="ltr"><<a href="mailto:daviddoria%2Bvtk@gmail.com" target="_blank">daviddoria+vtk@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; 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/%7Edoriad/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></div><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/" target="_blank">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.<font color="#888888"><br>R&D Engineer, Kitware Inc.<br>(518) 881-4937</font><br></div></div></blockquote></div>-- <br>Aashish Chaudhary<div class="im">
<br></div></blockquote></div><br>These are good suggestions for general purpose things. However, I was more interested in improving the interface to the vtkMath functions, as well as providing developers in VTK source an easy way to do these things. I realize vtkMatrix3x3 and vtkMatrix4x4 cover many cases of matrix manipulations - but even doing something as simple as subtracting/adding vectors the user has to write their own little subtraction loop:<br>
<br>double a[3];<br>double b[3];<br>//...fill a and b ...<br>double c[3]; <br><br>// Should be easy as c = a-b<br>//instead, we have to do:<br>for(unsigned int i = 0; i < 3; i++)<br>{<br>c[i] = a[i] - b[i];<br>}<br><br>
That just seems like something that is done quite often and is representative of the kind of thing that should have a little more "wrapping" (i.e. a vtkPoint or vtkVector class).<br><br>Do you not agree that VTK needs some built-ins like this?<br>
<br clear="all">Thanks,<br><br>David<br>