PCA plugin

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

PCA plugin

mungallj
Dear All.  I have been trying to run the PCA plugin without success.  I have got to the point where it seems to be running but I get the following error messages:

java.lang.OutOfMemoryError: Java heap space
        at bijnum.BIJutil.getFloatPixels(BIJutil.java:251)
        at bijnum.BIJutil.matrixFromImageStack(BIJutil.java:115)
        at bijnum.BIJutil.matrixFromImageStack(BIJutil.java:94)
        at PCA_.run(PCA_.java:46)
        at ij.plugin.filter.PlugInFilterRunner.processOneImage(PlugInFilterRunner.java:249)
        at ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:102)
        at ij.IJ.runUserPlugIn(IJ.java:185)
        at ij.ImageJ.runUserPlugIn(ImageJ.java:264)
        at ij.plugin.PlugInExecuter.run(Compiler.java:264)
        at java.lang.Thread.run(Unknown Source)

The stack I am working on comprises Landsat data, each slice being about 170 Mb in size - perhaps the files are too large?

any pointers would be most welcome!
Reply | Threaded
Open this post in threaded view
|

Re: PCA plugin

Nathaniel Ryckman
Yeah, you probably guessed the cause of the problem.

The documentation says, "By default, ImageJ is configured to use around 256 MB maximum".

Here is the documentation explaining how to increase your memory:

http://imagejdocu.tudor.lu/doku.php?id=faq:technical:how_do_i_increase_the_memory_in_imagej

mungallj wrote
Dear All.  I have been trying to run the PCA plugin without success.  I have got to the point where it seems to be running but I get the following error messages:

java.lang.OutOfMemoryError: Java heap space
        at bijnum.BIJutil.getFloatPixels(BIJutil.java:251)
        at bijnum.BIJutil.matrixFromImageStack(BIJutil.java:115)
        at bijnum.BIJutil.matrixFromImageStack(BIJutil.java:94)
        at PCA_.run(PCA_.java:46)
        at ij.plugin.filter.PlugInFilterRunner.processOneImage(PlugInFilterRunner.java:249)
        at ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:102)
        at ij.IJ.runUserPlugIn(IJ.java:185)
        at ij.ImageJ.runUserPlugIn(ImageJ.java:264)
        at ij.plugin.PlugInExecuter.run(Compiler.java:264)
        at java.lang.Thread.run(Unknown Source)

The stack I am working on comprises Landsat data, each slice being about 170 Mb in size - perhaps the files are too large?

any pointers would be most welcome!
Reply | Threaded
Open this post in threaded view
|

Re: PCA plugin

Juanjo Vega
In reply to this post by mungallj
Hi James,

That error is caused because java ran out of memory. To fix that you need to increase the maximum amount of memory for the imagej process.

For instance, you can assign up to 1GB of memory with: java -Xmx1024m -jar ij.jar

I don't know which ImageJ version you are using, but in my linux version I have a file call "run" which is an script with a line like the one above, so you could change that to use 1GB, or whatever, for future executions.

Sincerely,

Juanjo.

On May 31, 2011, at 9:46 PM, James E Mungall wrote:

> Dear All.  I have been trying to run the PCA plugin without success.  I have got to the point where it seems to be running but I get the following error messages:
>
> java.lang.OutOfMemoryError: Java heap space
> at bijnum.BIJutil.getFloatPixels(BIJutil.java:251)
> at bijnum.BIJutil.matrixFromImageStack(BIJutil.java:115)
> at bijnum.BIJutil.matrixFromImageStack(BIJutil.java:94)
> at PCA_.run(PCA_.java:46)
> at ij.plugin.filter.PlugInFilterRunner.processOneImage(PlugInFilterRunner.java:249)
> at ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:102)
> at ij.IJ.runUserPlugIn(IJ.java:185)
> at ij.ImageJ.runUserPlugIn(ImageJ.java:264)
> at ij.plugin.PlugInExecuter.run(Compiler.java:264)
> at java.lang.Thread.run(Unknown Source)
>
> The stack I am working on comprises Landsat data, each slice being about 170 Mb in size - perhaps the files are too large?
>
> any pointers would be most welcome!

------------------------------------------------------------
Juanjo Vega ([hidden email])

Unidad de Biocomputación. Laboratorio B-13.
Centro Nacional de Biotecnología. CNB-CSIC.
C\ Darwin, 3. Campus de Cantoblanco.
Universidad Autónoma de Madrid.
28049, Madrid, Spain.

http://www.cnb.csic.es
http://www.biocomp.cnb.csic.es

+34 91 585 4510

"Las mejores almas son capaces de los mayores vicios como de las mayores
virtudes, y aquellos que caminan despacio por el camino recto pueden
llegar más lejos que los que corren pero se apartan de él." - Discurso
del Método, René Descartes.