Hi Nikhil,<br><br>You forgot to load the system library.<br><br>You have to add the following line in your code as well as having depending on your system the directory that content the vtk library inside the environment vairiable PATH/LD_LIBRARY_PATH/DYLD_LIBRARY_PATH (win/unix/mac).<br>
<br><pre><span class="java-keyword">static</span> { <br>    <span class="java-object">System</span>.loadLibrary(<span class="java-quote">&quot;vtkCommonJava&quot;</span>); <br>    <span class="java-object">System</span>.loadLibrary(<span class="java-quote">&quot;vtkFilteringJava&quot;</span>); <br>
    <span class="java-object">System</span>.loadLibrary(<span class="java-quote">&quot;vtkIOJava&quot;</span>); <br>    <span class="java-object">System</span>.loadLibrary(<span class="java-quote">&quot;vtkImagingJava&quot;</span>); <br>
    <span class="java-object">System</span>.loadLibrary(<span class="java-quote">&quot;vtkGraphicsJava&quot;</span>); <br>    <span class="java-object">System</span>.loadLibrary(<span class="java-quote">&quot;vtkRenderingJava&quot;</span>); <br>
    <span class="java-keyword">try</span> {<br>      <span class="java-object">System</span>.loadLibrary(<span class="java-quote">&quot;vtkHybridJava&quot;</span>);<br>    } <span class="java-keyword">catch</span> (Throwable e) {<br>
      <span class="java-object">System</span>.out.println(<span class="java-quote">&quot;cannot load vtkHybrid, skipping...&quot;</span>);<br>    }<br>    <span class="java-keyword">try</span> {<br>      <span class="java-object">System</span>.loadLibrary(<span class="java-quote">&quot;vtkVolumeRenderingJava&quot;</span>);<br>
    } <span class="java-keyword">catch</span> (Throwable e) {<br>      <span class="java-object">System</span>.out.println(<span class="java-quote">&quot;cannot load vtkVolumeRendering, skipping...&quot;</span>);<br>    }<br>
  }</pre>Seb<br><br><div class="gmail_quote">On Fri, Apr 23, 2010 at 2:57 PM, nikhil singhania <span dir="ltr">&lt;<a href="mailto:niksinghania@gmail.com">niksinghania@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Sir,<br>
I am writing a code to convert java array to image data..but getting an error:<br>
<br>
&quot;Exception in thread &quot;main&quot; java.lang.UnsatisfiedLinkError:<br>
vtk.vtkImageData.VTKInit()J<br>
        at vtk.vtkImageData.VTKInit(Native Method)<br>
        at vtk.vtkObject.&lt;init&gt;(vtkObject.java:96)<br>
        at vtk.vtkDataObject.&lt;init&gt;(vtkDataObject.java:1206)<br>
        at vtk.vtkDataSet.&lt;init&gt;(vtkDataSet.java:225)<br>
        at vtk.vtkImageData.&lt;init&gt;(vtkImageData.java:347)<br>
        at javaapplication2.fileread.main(fileread.java:49)&quot;<br>
<br>
here is some part of code...<br>
<br>
  vtkImageData image = new vtkImageData();<br>
  image.SetDimensions(500, 500, 50);<br>
  image.SetOrigin(0.0, 0.0, 0.0);<br>
  image.SetSpacing(0.33,0.33,0.33);<br>
  image.SetScalarTypeToChar();<br>
  image.AllocateScalars();<br>
  vtkDataArray array = image.GetPointData().GetScalars();<br>
<br>
  for(int iZ = 0; iZ &lt; 50; iZ++){<br>
            for(int iY= 0; iY &lt; 500; iY++){<br>
                      for(int iX = 0; iX &lt; 500; iX++){<br>
                                 array.InsertNextTuple1(arr[iZ][iY][iX]);<br>
                        }<br>
               }<br>
   }<br>
<br>
Please help.<br>
<br>
Thank You.<br>
--<br>
Nikhil Kumar<br>
rit2007033<br>
b.tech IT 6th sem<br>
IIIT Allahabad<br>
contact@9793905858<br>
email: <a href="mailto:rit2007033@iiita.ac.in">rit2007033@iiita.ac.in</a><br>
          <a href="mailto:niksinghania@gmail.com">niksinghania@gmail.com</a><br>
<a href="http://profile.iiita.ac.in/RIT2007033/" target="_blank">http://profile.iiita.ac.in/RIT2007033/</a><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br>