[vtkusers] Getting image data quickly into Java objects
Leue, William M (Research)
leue at crd.ge.com
Thu Jun 5 14:35:57 EDT 2003
Personally, I would write a tiny bit of JNI code to copy the data that
underlies the ScalarPointer into the desired Java array. You have do the
pointer defererencing in C, since Java does not support C-style pointers.
-Bill Leue
-----Original Message-----
From: Greg Scott [mailto:g.scott at oneteldsl.net]
Sent: Thursday, June 05, 2003 2:26 PM
To: vtkusers at public.kitware.com
Subject: [vtkusers] Getting image data quickly into Java objects
I've seen in the past people have asked a similar question, yet I've found
no answers.
I would like to move the RGB data from a vtkImageData instance into Java,
i.e. into a byte[] array. As I understand it, the usual GetScalarPointer
methods are not available in the Java wrapping of VTK.
Can anyone suggest a fast way to do this, other than looping through the
entire image data doing GetPoint... on each one, which returns, say a float.
Any suggestions would be much appreciated.
Thanks
Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030605/7a8bf7d0/attachment.htm>
More information about the vtkusers
mailing list