[Rtk-users] using rtk in matlab : input images for filters from matlab data types

Julia Semyakishkina prekrasnaya1985 at gmail.com
Thu Mar 23 06:14:25 EDT 2017


Hello.
In matlab example from http://wiki.openrtk.org/index.php/SimpleRTK volume
which is projected generates in SheppLoganPhantomFilter(). But i have my
own volume, that is stored in matlab regular matrix for example.

What i want to do:
forward = py.JosephForwardProjectionImageFilter();
forward.SetGeometry(g);
projs = forward.Execute(projs, volume);

The problem is to initialize the volume parameter.
By this code
data_size = size(matimg);
transpose = matimg';
result=py.numpy.reshape(transpose(:)', int32(data_size));
volume = py.Image.fromarray(result);

i store volume in type of py.Image, but in Execute() method i have to pass
py.SimpleRTK.SimpleRTK.Image type. So, is there way to do such convertation
? Or is there some another way to init py.SimpleRTK.SimpleRTK.Image with my
own matlab data ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/rtk-users/attachments/20170323/fcb2c23e/attachment.html>


More information about the Rtk-users mailing list