ClearVolume and large images

When trying to open a very large (5000 x 4000 x 3000) image in ClearVolume I get an error (below). Is it possible to open images of this size, perhaps by converting the image before ClearVolume? @fjug?

Ubuntu 18.04
ImageJ 1.52n
Latest ClearVolume

Everything else seems ok, ClearVolume finds the GPU and OpenCL ok. I don’t currently have CUDA installed, but presumably that’s not necessary?


[ERROR] Module threw exception
java.lang.RuntimeException: Number of elements in ArrayImg too big, use for example CellImg instead: 113125075200 > 2147483647
	at net.imglib2.img.array.ArrayImgFactory.numEntitiesRangeCheck(
	at net.imglib2.img.array.ArrayImgFactory.create(
	at net.imglib2.img.array.ArrayImgFactory.create(
	at de.mpicbg.jug.clearvolume.ImgLib2ClearVolume.makeClearVolumeUnsignedShortTypeCopy(
	at de.mpicbg.jug.clearvolume.ImgLib2ClearVolume.makeClearVolumeUnsignedShortTypeCopies(
	at de.mpicbg.jug.clearvolume.ImgLib2ClearVolume.initRealImgs(
	at de.mpicbg.jug.clearvolume.gui.GenericClearVolumeGui.launchClearVolumeManager(
	at de.mpicbg.jug.clearvolume.gui.GenericClearVolumeGui.<init>(
	at org.scijava.thread.DefaultThreadService$
	at java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.util.concurrent.ThreadPoolExecutor$

Hi @adamltyson and welcome to the forum :slight_smile:

We wrote ClearVolume in a way that it’s required the dataset you want to visualise fits in the GPU memory. With a 5000x4000x3000 occupying at least 60GiB of memory, that is does unfortunately not work.

I have the following suggestions for you, all of them require though that you convert them to BigDataViewer’s format first, see on how to do this. For visualising your dataset, you can then do one or more of the following:

  • use BigDataViewer directly, in BDV you can browse your dataset by arbitrarily aligned slices
  • @tpietzsch has recently written a volume visualiser named BigVolumeViewer, for which there is an update site at, which you can use
  • as a third option, @kephale and I are currently developing a replacement for the old 3D Viewer in Fiji, supporting VR headsets, customizable scenes, etc., named sciview. sciview is also available via an update site (see New sciview preview release for more details). Thanks to @tpietzsch, we also have preliminary support for BDV datasets in sciview now.

I hope this gets you a bit further. Let us know if you encounter any issues.



Thanks @skalarproduktraum ! For some reason I thought images only had to load into RAM for ClearVolume. I’ll try BigVolumeViewer (I’ve had a lot of success with BigDataViewer before).

Thanks again,

1 Like

So ClearVolume works nicely when I load images that fit into GPU memory. However, if I use FIJI to reduce a large image in size (Image -> Scale), I still get the same error. I’ve tried a few images, and fresh FIJI installs. Do you have any ideas?


Hi again! I have to admit that I had actually misread your original traceback – the issue you’re seeing does not come from the image not fitting in the GPU memory (which of course it still needs to), but actually from the problem that the image needs to fit into a Java array, which CellImg uses as a backing store. This means you’re limited to 2GB. Everything below that should work. Sorry for the confusion.