[vtkusers] The simplest question i guess......vtkShortArray()

ALIZIER Julien AUSY julien.alizier-ausy at irsn.fr
Tue Sep 7 10:21:34 EDT 2004


Hi Rohan Naukudkar,


Have you tried :

"void vtkShortArray::SetArray  (short * array, vtkIdType size,  int save)   
 
   This method lets the user specify data to be held by the array. The array
argument is a pointer to the data. size is the size of the array supplied by
the user. Set save to 1 to keep the class from deleting the array when it
cleans up or reallocates memory. The class uses the actual array provided;
it does not copy the data from the suppled array. "

HTH

-- Julien
 


-----Message d'origine-----
De : Rohan Naukudkar [mailto:rohan_vtk at yahoo.com]
Envoyé : dimanche 5 septembre 2004 18:24
À : vtkusers at vtk.org
Objet : [vtkusers] The simplest question i guess......vtkShortArray()


Hi Everyone,
    I have a image file of 15MB of type short. I want to read this file into
a vtkShortArray. I am using JAVA and VTK. I am doing it this way,
    vtkShortArray arr = new vtkShortArray();
 and then using the arr.InsertNextValue() method for inserting the elements
of the array which is taking a lot more time for me. Since i am using java
each time i insert an element into an array then its making a native call
and is going out of the Java Virtual Machine and so its taking very much
time (almost 6-7 min).
    Does any body have an idea how to pass the java array to a vtkShortArray
as reference so that the bulk of the data can be passed as a chunk data...

Thanks in advance,
cheers ,
Rohan


Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!



More information about the vtkusers mailing list