3D analysis of 100's of images stacked together using Trainable WEKA Segmentation 3D a plugin available on Fiji ImageJ

Hi,
I am working on doing 3D analysis of 150 images stacked together using Fiji ImageJ software. The method I am following is drag and drop all images together in fiji - stacking all images together - setting the scale to micrometer level - using trainable weka segmentation 3D - defining the classes - training the classifier, after initial training everything works well but if I have to refine the classes and train it again it doesn’t apply to all images. Further when I plan refining the images one by one it works well for the first few images but after that my computer shows some memory error as below.

WARNING: core mtj jar files are not available as resources to this classloader (sun.misc.Launcher$AppClassLoader@c387f44)
java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
	java.util.concurrent.FutureTask.report(FutureTask.java:122)
	java.util.concurrent.FutureTask.get(FutureTask.java:192)
	trainableSegmentation.FeatureStack3D.updateFeaturesMT(FeatureStack3D.java:1083)
	trainableSegmentation.WekaSegmentation.trainClassifier(WekaSegmentation.java:5279)
	trainableSegmentation.Weka_Segmentation$4.run(Weka_Segmentation.java:1496)

	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
	at trainableSegmentation.FeatureStack3D.updateFeaturesMT(FeatureStack3D.java:1083)
	at trainableSegmentation.WekaSegmentation.trainClassifier(WekaSegmentation.java:5279)
	at trainableSegmentation.Weka_Segmentation$4.run(Weka_Segmentation.java:1496)
Caused by: java.lang.OutOfMemoryError: Java heap space
[INFO] Reading available sites from https://imagej.net/
[INFO] Trying to install and execute the new updater
[ERROR] null
java.lang.ClassNotFoundException: net.imagej.ui.swing.updater.ImageJUpdater
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at net.imagej.ui.swing.updater.ImageJUpdater.run(ImageJUpdater.java:212)
	at org.scijava.command.CommandModule.run(CommandModule.java:199)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:168)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)
	at org.scijava.thread.DefaultThreadService$3.call(DefaultThreadService.java:238)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

I wanted to know if you could help me up with some solution for this? Also is there any other way/method instead of Trainable WEKA segmentation 3D which I can use for doing the 3D analysis of multiple images stacked together using Fiji ImageJ software? I highly appreciate all help in this regards.

Thanks!!

This error indicates that your Java process needs more memory (increased heap). Read this:

https://imagejdocu.tudor.lu/faq/technical/how_do_i_increase_the_memory_in_imagej

https://docs.openmicroscopy.org/bio-formats/5.8.2/users/imagej/managing-memory.html

See also plugin specific:

3 Likes

@Bio7 Thanks for your reply, It helped in resolving the memory error.