Never mind, I figured it out. I had to create a itkImageF3_Pointer with the original itkImageF3 to access the data.<br><br><div><span class="gmail_quote">On 1/18/07, <b class="gmail_sendername">Blair Cruz</b> <<a href="mailto:blair.cruz@gmail.com">
blair.cruz@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello All,<br>I'm running ITK with the Java bindings to do some registration in a Java application I'm developing. I'm running into an EXCEPTION_ACCESS_VIOLATION when using the Java bindings. Here is whats happening.
<br><br>I create two itkImportImageFilterF3_Pointer objects for the fixedImage and movingImage. I populate these objects with the image data I need to register. I then create the code to do the registration and pass the filters to it. Eventually, I get back a itkImageF3 by calling:
<br><br>itkResampleImageFilterF3F3_Pointer.GetOutput() (by calling the instance of the resampling filter)<br><br>Then with the itkImageF3 object I read the data out of it. I do that by calling:<br><br>output.GetPixel(itkindex3_1 )
<br><br>Where output us the itkImageF3 I get back from the resampling filter. I can do this consistantly with no problems unless I allocate a large array to read into before I read the data from the itkImageF3. If I allocate a large array anytime before I read the itkImageF3 I get the EXCEPTION_ACCESS_VIOLATION. With the large array allocated ITK will step on my memory. It's also random when it blows up, sometimes reading 6 or 600 pixel values out of the itkImageF3.
<br><br>I also get the exceptions if I create the itkImageF3 object and write image data to it, then read it out right after.<br><br>I have been able to successfully read all the pixel values out of the registered itkImageF3 and display them to verify that the image was registering. I did this with a small class that I developed the registration code with. Once I moved it to the real application I get the exceptions.
<br><br>I'm in desperate need of help with this. I need to get cross platform registration working in my application and this appears to be the way to do it. Please let me know if you can help me on this issue.<br>
<br>
Here is the exception I'm getting:<br><br>#<br># An unexpected error has been detected by HotSpot Virtual Machine:<br>#<br># EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0b671da3, pid=8748, tid=9484<br>#<br># Java VM: Java HotSpot(TM) Client VM (
1.5.0_04-b05 mixed mode)<br># Problematic frame:<br># C [ITKCommonAJava.dll+0x241da3]<br>#<br># An error report file with more information is saved as hs_err_pid8748.log<br>#<br># If you would like to submit a bug report, please visit:
<br># <a href="http://java.sun.com/webapps/bugreport/crash.jsp" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://java.sun.com/webapps/bugreport/crash.jsp</a><br>#<br><br>Platform: WIndows XP SP2
<br>JVM: 1.5.0_04-b05<br><br>Thanks,<br><span class="sg">Blair Cruz<br><br><br><br><br>
</span></blockquote></div><br>