<div dir="ltr">Hi Matt,<div><br></div><div>Thanks, this is exactly what I need. I want to pass the pointer to a DLL with C-API.</div><div><br></div><div>Coert</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 28, 2014 at 4:15 AM, Matt McCormick <span dir="ltr"><<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="im HOEnZb">Hi Coert,<br>
<br>
There is a GetArrayFromImage function that can get a NumPy array from<br>
a SimpleITK image. Then possibly use the numpy ctypes support [1]. It<br>
depends on what you want to do...<br>
<br>
HTH,<br>
Matt<br>
<br>
[1] <a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.ctypes.html" target="_blank">http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.ctypes.html</a><br>
<br>
On Thu, Nov 27, 2014 at 1:58 PM, Coert Metz <<a href="mailto:c.metz@quantib.com">c.metz@quantib.com</a>> wrote:<br>
</span><div class="HOEnZb"><div class="h5">> Hi all,<br>
><br>
> I would like to get access to the voxel data pointer of a SimpleITK image<br>
> from Python. I see there is a method GetBufferAsInt16 which would suffice<br>
> but it does not seem to wrapped in Python. Is there a way to still access<br>
> this voxel data pointer?<br>
><br>
> Regards,<br>
> --<br>
> Coert Metz, PhD<br>
> Research & Development Engineer | Quantib B.V.<br>
> <a href="mailto:c.metz@quantib.com">c.metz@quantib.com</a> | <a href="tel:%2B31%20650%2068%2060%2028" value="+31650686028">+31 650 68 60 28</a><br>
><br>
</div></div><div class="HOEnZb"><div class="h5">> This message may contain confidential or privileged information. If you are<br>
> not the addressee, please notify the sender and delete it from your files.<br>
> _______________________________________________<br>
> Community mailing list<br>
> <a href="mailto:Community@itk.org">Community@itk.org</a><br>
> <a href="http://public.kitware.com/mailman/listinfo/community" target="_blank">http://public.kitware.com/mailman/listinfo/community</a><br>
><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><font color="#000000"><span style="font-family:arial;font-size:small">Coert Metz, PhD</span></font><div><div dir="ltr"><div style="font-size:small;font-family:arial"><font color="#000000">Research & Development Engineer | <a href="http://www.quantib.com/" target="_blank">Quantib B.V.</a></font></div><div style="font-size:small;font-family:arial"><div><font color="#000000"><a href="mailto:c.metz@quantib.com" target="_blank">c.metz@quantib.com</a> | +31 650 68 60 28</font></div></div></div></div></div></div>
</div>
<br>
<font face="Arial, Helvetica, sans-serif" size="1" style="background-color:white">This message may contain confidential or privileged information. If you are not the addressee, please notify the sender and delete it from your files.</font>