<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1141" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=466263318-05062003><FONT face=Arial color=#0000ff
size=2>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.</FONT></SPAN></DIV>
<DIV><SPAN class=466263318-05062003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=466263318-05062003><FONT face=Arial color=#0000ff size=2>-Bill
Leue</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Greg Scott
[mailto:g.scott@oneteldsl.net]<BR><B>Sent:</B> Thursday, June 05, 2003 2:26
PM<BR><B>To:</B> vtkusers@public.kitware.com<BR><B>Subject:</B> [vtkusers]
Getting image data quickly into Java objects<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>I've seen in the past people have asked a similar
question, yet I've found no answers.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Any suggestions would be much
appreciated.</FONT></DIV>
<DIV><FONT face=Arial size=2>Thanks</FONT></DIV>
<DIV><FONT face=Arial size=2>Greg</FONT></DIV>
<DIV> </DIV></BLOCKQUOTE></BODY></HTML>