<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi All,<br><br>I am getting the above error while trying to run a program that reads DICOM images and does 3d visualization.<br>After searching through the mailing list, I found similar posts, but none of them solved the problem .<br>I included the static code block :<br>static { <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.loadLibrary("vtkCommonJava"); <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.loadLibrary("vtkFilteringJava"); <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.loadLibrary("vtkIOJava"); <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.loadLibrary("vtkImagingJava"); <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.loadLibrary("vtkGraphicsJava"); <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.loadLibrary("vtkRenderingJava");
 <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; }<br><br>and made sure the system variables are set correctly. Still no luck :(<br><br>Can someone lend a helping hand? Any help is appreciated.<br>Here is the code :<br><br>public class WrapperVtkRenderVolume {<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; vtkRenderer renderer = new vtkRenderer();<br>&nbsp;&nbsp;&nbsp; vtkRenderWindow renderWindow = new vtkRenderWindow();<br>&nbsp;&nbsp;&nbsp; vtkRenderWindowInteractor renInteractor = new vtkRenderWindowInteractor();<br>&nbsp;&nbsp;&nbsp; vtkImageData imageData = new vtkImageData();<br>&nbsp;&nbsp;&nbsp; vtkPiecewiseFunction opacityTransferFunction = new vtkPiecewiseFunction();<br>&nbsp;&nbsp;&nbsp; vtkVolumeProperty volumeProperty = new vtkVolumeProperty();<br>&nbsp;&nbsp;&nbsp; vtkVolume volume = new vtkVolume();<br>&nbsp;&nbsp;&nbsp; vtkVolumeTextureMapper3D volumeMapper = new vtkVolumeTextureMapper3D();<br>&nbsp;&nbsp;&nbsp; vtkColorTransferFunction
 colorTransferFunction = new vtkColorTransferFunction();<br>&nbsp;&nbsp;&nbsp; vtkFixedPointVolumeRayCastMapper volumeMapperSoftware = new vtkFixedPointVolumeRayCastMapper();<br><br>&nbsp;&nbsp;&nbsp; public WrapperVtkRenderVolume(int cxWin, int cyWin) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SetupSceneBasics();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ResetSize(cxWin, cyWin);<br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; private void ResetSize(int cxWin, int cyWin) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; renderWindow.SetSize(cxWin, cyWin);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; private void SetupSceneBasics() {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; renderer.SetBackground(0, 0, 0);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; renderWindow.AddRenderer(renderer);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
 renInteractor.SetRenderWindow(renderWindow);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; public boolean LoadVolumeFromFolder(String strFolderPath) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; renderWindow.Render();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; vtkDICOMImageReader imageReader = new vtkDICOMImageReader();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; switch (imageReader.GetNumberOfScalarComponents()) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case 3:<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; LoadColorDataset(imageReader.GetOutput());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SetupRendererVolume();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;
 &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; imageReader.Delete();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; renderer.ResetCamera();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return true;<br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; private boolean SetupRendererVolume() {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; opacityTransferFunction.AddPoint(0, 0);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; opacityTransferFunction.AddPoint(255, 1);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; volumeProperty.SetIndependentComponents(0);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; volumeProperty.SetScalarOpacity(opacityTransferFunction);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; volumeProperty.SetInterpolationTypeToLinear();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; volumeProperty.ShadeOff();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; volume.SetProperty(volumeProperty);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
 <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; volumeMapper.SetInput(imageData);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(isRenderSupported()) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; volumeMapper.SetSampleDistance(1.0);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; volume.SetMapper(volumeMapper);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; renderer.AddVolume(volume);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } else {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println("Your graphics board does not support the vtkVolumeTextureMapper3D class");<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return false;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return true;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; private boolean isRenderSupported()
 {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return (volumeMapper.IsRenderSupported(volumeProperty) == 1)?true:false;<br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; private void LoadColorDataset(vtkImageData imageDataFromReader) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; imageData.SetScalarTypeToUnsignedChar();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; imageData.SetNumberOfScalarComponents(4);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; imageData.SetDimensions(imageDataFromReader.GetDimensions());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; imageData.SetSpacing(imageDataFromReader.GetSpacing());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; imageData.SetOrigin(imageDataFromReader.GetOrigin());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; imageData.AllocateScalars();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for(int z = 0; z &lt; imageData.GetDimensions()[2]; z++) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //TODO : this is
 incomplete<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; public void Start() {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; renInteractor.Initialize();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; renInteractor.Start();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; }<br><br>}<br></td></tr></table><br>