[Insight-users] matrix logarithm

Tom Vercauteren tom.vercauteren at m4x.org
Mon Jun 28 16:56:10 EDT 2010


Hi Zoltan,

As far as I know, getting the (generic) matrix logarithm in c++ (as
opposed to python or matlab) is a pain...

Last time I needed it, I wasn't able to find it. Hence, I made my own
(vnl based) from a previous version of people at Asclepios lab. You
will find this implementation in an Insight Journal submission of mine
(look in vnl_sd_matrix_tools.h):
http://hdl.handle.net/10380/3060

I am definitely not a linear algebra expert and the code is nothing to
be proud of. Writing good linear algebra is quite challenging. If you
wait long enough, it could well be that a decent logm will appear in
eigen:
http://bytebucket.org/eigen/eigen/issue/38/feature-request-more-matrix-functions-eg-matrix

That being said, if you know that your matrices are diagonalisable
(e.g. symmetric matrices), the problem becomes of course much simpler.

Anyhow, if the logm implementation in vnl_sd_matrix_tools suits your
need or if you enhance it, be it just by adding more code coverage,
let me know.

Hope this helps,
Tom

On Mon, Jun 28, 2010 at 14:00, Zoltan Seress <seress.zoltan at gmail.com> wrote:
> Hi all,
> Is there a way to get the logarithm (principal) of a matrix with ITK? I
> haven't found any, but it doesn't mean that there isn't.
> Thanks!
>
> --
> Zoli
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>


More information about the Insight-users mailing list