[ITK] SimpleITK get reference to voxel data pointer in Python
Coert Metz
c.metz at quantib.com
Fri Nov 28 03:35:57 EST 2014
Hi Matt,
Thanks, this is exactly what I need. I want to pass the pointer to a DLL
with C-API.
Coert
On Fri, Nov 28, 2014 at 4:15 AM, Matt McCormick <matt.mccormick at kitware.com>
wrote:
> Hi Coert,
>
> There is a GetArrayFromImage function that can get a NumPy array from
> a SimpleITK image. Then possibly use the numpy ctypes support [1]. It
> depends on what you want to do...
>
> HTH,
> Matt
>
> [1]
> http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.ctypes.html
>
> On Thu, Nov 27, 2014 at 1:58 PM, Coert Metz <c.metz at quantib.com> wrote:
> > Hi all,
> >
> > I would like to get access to the voxel data pointer of a SimpleITK image
> > from Python. I see there is a method GetBufferAsInt16 which would suffice
> > but it does not seem to wrapped in Python. Is there a way to still access
> > this voxel data pointer?
> >
> > Regards,
> > --
> > Coert Metz, PhD
> > Research & Development Engineer | Quantib B.V.
> > c.metz at quantib.com | +31 650 68 60 28
> >
> > This message may contain confidential or privileged information. If you
> are
> > not the addressee, please notify the sender and delete it from your
> files.
> > _______________________________________________
> > Community mailing list
> > Community at itk.org
> > http://public.kitware.com/mailman/listinfo/community
> >
>
--
Coert Metz, PhD
Research & Development Engineer | Quantib B.V. <http://www.quantib.com/>
c.metz at quantib.com | +31 650 68 60 28
--
This message may contain confidential or privileged information. If you are
not the addressee, please notify the sender and delete it from your files.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20141128/36b276d2/attachment.html>
More information about the Community
mailing list