[ITK] [ITK-users] VNL Functions in Python

Matt McCormick matt.mccormick at kitware.com
Tue Apr 12 11:59:23 EDT 2016


Hi Robert,

> So far, I've used all the functions from numpy when I needed one, as don't
> see the additional effort that I'd need when wrapping.
> However, I have one question about the transpose method from VNL.
> Does this one "really" transpose the matrix, like the " ' " operator from
> matlab , or does it execute a non-conjugate transpose, like the " .' "
> operator in matlab?

There are both transpose() and conjugate_transpose() methods.  See here:

  http://www.vtk.org/vxl/doc/release/core/vnl/html/classvnl__matrix.html


> Another thing, when using VNL, I use the itk.F and itk.UC types. In numpy, I
> use the "normal" float and char types from python. Could this be a future
> source for problems, as the types may not work together?

The itk.F is a "normal" float and itk.UC is "normal" unsigned char.
To make our Python code more literate, we should use itk.ctype.

Instead of

  PixelType = itk.F

use

  PixelType = itk.ctype('float')

Both

  itk.F == itk.ctype('float')

and

  itk.UC == itk.ctype('unsigned char')

return True.

HTH,
Matt
_____________________________________
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.php

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://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list