Error loading a dicom image using ImageJ as an applet in a webpage

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Error loading a dicom image using ImageJ as an applet in a webpage

charo-2
Hi,
I have a question about ImageJ applet.
I'm trying to run ImageJ as an applet in a webpage like this example:
http://imageja.sourceforge.net/applet.html
with a dicom image rather than a jpg image, but  it doesn't work. I get
this error:

java.lang.OutOfMemoryError: Java heap space
    at ij.plugin.DicomDecoder.getString(DICOM.java:271)
    at ij.plugin.DicomDecoder.getHeaderInfo(DICOM.java:752)
    at ij.plugin.DicomDecoder.addInfo(DICOM.java:677)
    at ij.plugin.DicomDecoder.getFileInfo(DICOM.java:623)
    at ij.plugin.DICOM.run(DICOM.java:89)
    at ij.IJ.runPlugIn(IJ.java:144)
    at ij.IJ.runPlugIn(IJ.java:126)
    at ij.io.Opener.openURL(Opener.java:279)
    at ij.ImagePlus.<init>(ImagePlus.java:123)
    at ij.ImageJApplet.init(ImageJApplet.java:93)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

How can i load a dicom image in an ImageJ applet as a web page?

Thanks very much for your help.

Regards
Reply | Threaded
Open this post in threaded view
|

Re: Error loading a dicom image using ImageJ as an applet in a webpage

dscho
Hi,

On Mon, 30 Jun 2008, charo wrote:

> I have a question about ImageJ applet.
> I'm trying to run ImageJ as an applet in a webpage like this example:
> http://imageja.sourceforge.net/applet.html
> with a dicom image rather than a jpg image, but  it doesn't work. I get this
> error:
>
> java.lang.OutOfMemoryError: Java heap space

That means that the dicom image is larger than the applet memory settings
allow.

You can change that setting on the client computer, but you will have to
do it on _every_ computer that loads the applet individually.

Assuming that you are a Windows guy, and not really knowing what I am
talking about (just parroting what Google gave me): In Start>Control
Panel>Java, you should be able to go to the Java tab, view the "Java
Applet Runtime Settings" and add something like "-Xmx512m" to the "Java
Runtime Parameters".

In the alternative, you could look into providing a Java WebStart file,
where you have to sign the .jar but can then set the memory from there
(without requiring the user to change anything herself).

Hth,
Dscho