FW: [vtkusers] Basic Linear algebra in vtk
Atwood, Robert C
r.atwood at imperial.ac.uk
Thu Jan 11 07:14:44 EST 2007
oops I should have replied to list instead of default 'reply' button!
Browsing the class list of vtk
http://www.vtk.org/doc/nightly/html/classes.html I see there's a few
operations available in the vtkMath class. However, I believe for
efficiency and speed most of the operations appear to be fixed matrix
dimension of 2x2 or 3x3 but there's a few operations that work on
general square matrix. Have a look at that, but then I defer to other
list members with more knowledge of vtk classes.
Myself, I might just write a c routine to do that operation if I did not
want to use a library like vxl or gsl.
On the other hand, I still recommend having a look at vxl (intended for
computer vision) since it has some operations eg. 'svd.recompose(rank)'
which I think do exactly what you want, already avaliable as a
templated class and using netlib routines, and it already uses cmake for
building.
-----Original Message-----
From: Arne Hansen [mailto:bsd.diverse at gmail.com]
Sent: 11 January 2007 08:51
To: Atwood, Robert C
Subject: Re: [vtkusers] Basic Linear algebra in vtk
hmmm is there really no way to do this in vtk?
2007/1/10, Atwood, Robert C <r.atwood at imperial.ac.uk>:
I find the VNL (vxl) libraries for such things , that are
inlcuded
along with ITK or available on their own are quite compatible
(at least
with ITK, haven't really used directly with VTK so far but I'm
guessing
it's easy to incorporate the classes in a VTK application too)
http://paine.wiau.man.ac.uk/pub/doc_vxl/index.html
<http://paine.wiau.man.ac.uk/pub/doc_vxl/index.html>
> -----Original Message-----
> From: vtkusers-bounces+r.atwood=imperial.ac.uk at vtk.org
> [mailto: vtkusers-bounces+r.atwood=imperial.ac.uk at vtk.org
<mailto:vtkusers-bounces+r.atwood=imperial.ac.uk at vtk.org> ] On
> Behalf Of Arne Hansen
> Sent: 10 January 2007 17:54
> To: VTK
> Subject: [vtkusers] Basic Linear algebra in vtk
>
> I am writing my vtk-programs in c++. I have a matrix of
> eigenshapes, a meanshape and a vector of eigenmodes.
> In order to visualize these (PCA-visualization) i need to
> somehow multiply them in vtk with a variance vector
> containing weights.
>
> so
>
> meanshape+eigenshapes*(weights*eigenmodes)
>
> this will result in a vector which i then need to reshape
> into a 3D volume before i can visualize it as an isosurface,
> using the vtkContourFilter, in vtk.
>
> These operations are very easily done in matlab, but how can
> i do these matrix multiplications and matrix reshaping in VTK?
>
> I hope someone can help me out.
> Thank you very much
>
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list