ClearVolume / imglib2-clearvolume

11 stars 3 forks source link

Images > 2GiB are not supported #2

Open skalarproduktraum opened 9 years ago

skalarproduktraum commented 9 years ago

Even if the present graphics card has enough memory, the plugin bails out with

java.lang.RuntimeException: Number of elements in Container too big, use for example CellContainer instead: 5086604250 > 2147483647
at net.imglib2.img.array.ArrayImgFactory.numEntitiesRangeCheck(ArrayImgFactory.java:71)
at net.imglib2.img.array.ArrayImgFactory.createByteInstance(ArrayImgFactory.java:79)
at net.imglib2.img.array.ArrayImgFactory.createByteInstance(ArrayImgFactory.java:58)
at de.mpicbg.jug.clearvolume.ClearVolumeUnsignedShortType.createSuitableNativeImg(ClearVolumeUnsignedShortType.java:320)
at net.imglib2.img.array.ArrayImgFactory.create(ArrayImgFactory.java:63)
at de.mpicbg.jug.clearvolume.ImgLib2ClearVolume.makeClearVolumeUnsignedShortTypeCopy(ImgLib2ClearVolume.java:355)
at de.mpicbg.jug.clearvolume.ImgLib2ClearVolume.makeClearVolumeUnsignedShortTypeCopies(ImgLib2ClearVolume.java:328)
at de.mpicbg.jug.clearvolume.ImgLib2ClearVolume.initRealImgs(ImgLib2ClearVolume.java:419)
at de.mpicbg.jug.clearvolume.gui.ClearVolumeManager.run(ClearVolumeManager.java:156)
at de.mpicbg.jug.clearvolume.gui.GenericClearVolumeGui.launchClearVolumeManager(GenericClearVolumeGui.java:208)
at de.mpicbg.jug.clearvolume.gui.GenericClearVolumeGui.<init>(GenericClearVolumeGui.java:135)
at de.mpicbg.jug.plugins.ClearVolumePlugin.run(ClearVolumePlugin.java:80)
at org.scijava.command.CommandModule.run(CommandModule.java:201)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:167)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:126)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:65)
at org.scijava.thread.DefaultThreadService$2.call(DefaultThreadService.java:191)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[ERROR] Module threw exception
java.lang.RuntimeException: Number of elements in Container too big, use for example CellContainer instead: 5086604250 > 2147483647
at net.imglib2.img.array.ArrayImgFactory.numEntitiesRangeCheck(ArrayImgFactory.java:71)
at net.imglib2.img.array.ArrayImgFactory.createByteInstance(ArrayImgFactory.java:79)
at net.imglib2.img.array.ArrayImgFactory.createByteInstance(ArrayImgFactory.java:58)
at de.mpicbg.jug.clearvolume.ClearVolumeUnsignedShortType.createSuitableNativeImg(ClearVolumeUnsignedShortType.java:320)
at net.imglib2.img.array.ArrayImgFactory.create(ArrayImgFactory.java:63)
at de.mpicbg.jug.clearvolume.ImgLib2ClearVolume.makeClearVolumeUnsignedShortTypeCopy(ImgLib2ClearVolume.java:355)
at de.mpicbg.jug.clearvolume.ImgLib2ClearVolume.makeClearVolumeUnsignedShortTypeCopies(ImgLib2ClearVolume.java:328)
at de.mpicbg.jug.clearvolume.ImgLib2ClearVolume.initRealImgs(ImgLib2ClearVolume.java:419)
at de.mpicbg.jug.clearvolume.gui.ClearVolumeManager.run(ClearVolumeManager.java:156)
at de.mpicbg.jug.clearvolume.gui.GenericClearVolumeGui.launchClearVolumeManager(GenericClearVolumeGui.java:208)
at de.mpicbg.jug.clearvolume.gui.GenericClearVolumeGui.<init>(GenericClearVolumeGui.java:135)
at de.mpicbg.jug.plugins.ClearVolumePlugin.run(ClearVolumePlugin.java:80)
at org.scijava.command.CommandModule.run(CommandModule.java:201)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:167)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:126)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:65)
at org.scijava.thread.DefaultThreadService$2.call(DefaultThreadService.java:191)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

@fjug suggested to use cell images. Maybe @tpietzsch also has some suggestions? :)

The bug was originally reported by @yafshar.

royerloic commented 9 years ago

Yes, that’s a limitation of the ClearVolume - imaglib2 bridge. We need to improve that, the only way to send >2G images to ClearVolume is via the CoreMem API. We will look into it.

On 18 Aug 2015, at 12:18, Ulrik Guenther notifications@github.com wrote:

Even if the present graphics card has enough memory, the plugin bails out with

java.lang.RuntimeException: Number of elements in Container too big, use for example CellContainer instead: 5086604250 > 2147483647 at net.imglib2.img.array.ArrayImgFactory.numEntitiesRangeCheck(ArrayImgFactory.java:71) at net.imglib2.img.array.ArrayImgFactory.createByteInstance(ArrayImgFactory.java:79) at net.imglib2.img.array.ArrayImgFactory.createByteInstance(ArrayImgFactory.java:58) at de.mpicbg.jug.clearvolume.ClearVolumeUnsignedShortType.createSuitableNativeImg(ClearVolumeUnsignedShortType.java:320) at net.imglib2.img.array.ArrayImgFactory.create(ArrayImgFactory.java:63) at de.mpicbg.jug.clearvolume.ImgLib2ClearVolume.makeClearVolumeUnsignedShortTypeCopy(ImgLib2ClearVolume.java:355) at de.mpicbg.jug.clearvolume.ImgLib2ClearVolume.makeClearVolumeUnsignedShortTypeCopies(ImgLib2ClearVolume.java:328) at de.mpicbg.jug.clearvolume.ImgLib2ClearVolume.initRealImgs(ImgLib2ClearVolume.java:419) at de.mpicbg.jug.clearvolume.gui.ClearVolumeManager.run(ClearVolumeManager.java:156) at de.mpicbg.jug.clearvolume.gui.GenericClearVolumeGui.launchClearVolumeManager(GenericClearVolumeGui.java:208) at de.mpicbg.jug.clearvolume.gui.GenericClearVolumeGui.(GenericClearVolumeGui.java:135) at de.mpicbg.jug.plugins.ClearVolumePlugin.run(ClearVolumePlugin.java:80) at org.scijava.command.CommandModule.run(CommandModule.java:201) at org.scijava.module.ModuleRunner.run(ModuleRunner.java:167) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:126) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:65) at org.scijava.thread.DefaultThreadService$2.call(DefaultThreadService.java:191) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) [ERROR] Module threw exception java.lang.RuntimeException: Number of elements in Container too big, use for example CellContainer instead: 5086604250 > 2147483647 at net.imglib2.img.array.ArrayImgFactory.numEntitiesRangeCheck(ArrayImgFactory.java:71) at net.imglib2.img.array.ArrayImgFactory.createByteInstance(ArrayImgFactory.java:79) at net.imglib2.img.array.ArrayImgFactory.createByteInstance(ArrayImgFactory.java:58) at de.mpicbg.jug.clearvolume.ClearVolumeUnsignedShortType.createSuitableNativeImg(ClearVolumeUnsignedShortType.java:320) at net.imglib2.img.array.ArrayImgFactory.create(ArrayImgFactory.java:63) at de.mpicbg.jug.clearvolume.ImgLib2ClearVolume.makeClearVolumeUnsignedShortTypeCopy(ImgLib2ClearVolume.java:355) at de.mpicbg.jug.clearvolume.ImgLib2ClearVolume.makeClearVolumeUnsignedShortTypeCopies(ImgLib2ClearVolume.java:328) at de.mpicbg.jug.clearvolume.ImgLib2ClearVolume.initRealImgs(ImgLib2ClearVolume.java:419) at de.mpicbg.jug.clearvolume.gui.ClearVolumeManager.run(ClearVolumeManager.java:156) at de.mpicbg.jug.clearvolume.gui.GenericClearVolumeGui.launchClearVolumeManager(GenericClearVolumeGui.java:208) at de.mpicbg.jug.clearvolume.gui.GenericClearVolumeGui.(GenericClearVolumeGui.java:135) at de.mpicbg.jug.plugins.ClearVolumePlugin.run(ClearVolumePlugin.java:80) at org.scijava.command.CommandModule.run(CommandModule.java:201) at org.scijava.module.ModuleRunner.run(ModuleRunner.java:167) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:126) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:65) at org.scijava.thread.DefaultThreadService$2.call(DefaultThreadService.java:191) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) @fjug https://github.com/fjug suggested to use cell images. Maybe @tpietzsch https://github.com/tpietzsch also has some suggestions? :)

The bug was originally reported by @yafshar https://github.com/yafshar.

— Reply to this email directly or view it on GitHub https://github.com/ClearVolume/imglib2-clearvolume/issues/2.

Dr. Loïc Alain Royer

Post-Doc - Myers Lab Max Planck Institute of Molecular Cell Biology and Genetics Pfotenhauerstr. 108 01307 Dresden

Too short? Here's why: http://emailcharter.org/