saalfeldlab / n5-utils

simple standalone BigDataViewer for multiple N5 (or HDF5) datasets
Other
8 stars 16 forks source link

Length is too large #34

Open snehashis-roy opened 1 year ago

snehashis-roy commented 1 year ago

I want to convert a 5D image (XYCZT format) of size 114x113x1x25x7200. I created a h5 file that I want to convert to n5 to visualize with the N5-Viewer of BigDataViewer in Fiji. Here is the command,

n5-copy -i N00046_4D.h5 -o N00046_4D.n5

The output is the following

 attributes:
/data
java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Length is too large (2318760000)
    at net.imglib2.cache.util.CacheAsUncheckedCacheAdapter.get(CacheAsUncheckedCacheAdapter.java:78)
    at net.imglib2.img.cell.LazyCellImg$LazyCells.get(LazyCellImg.java:104)
    at net.imglib2.img.list.AbstractLongListImg$LongListRandomAccess.get(AbstractLongListImg.java:274)
    at net.imglib2.img.cell.CellRandomAccess.getCell(CellRandomAccess.java:142)
    at net.imglib2.img.cell.CellRandomAccess.updatePosition(CellRandomAccess.java:480)
    at net.imglib2.img.cell.CellRandomAccess.<init>(CellRandomAccess.java:136)
    at net.imglib2.img.cell.AbstractCellImg.randomAccess(AbstractCellImg.java:104)
    at net.imglib2.img.cell.AbstractCellImg.randomAccess(AbstractCellImg.java:51)
    at net.imglib2.util.Util.getTypeFromInterval(Util.java:806)
    at org.janelia.saalfeldlab.n5.imglib2.N5Utils.save(N5Utils.java:1367)
    at org.janelia.saalfeldlab.Copy.copyDataset(Copy.java:262)
    at org.janelia.saalfeldlab.Copy.copyGroup(Copy.java:311)
    at org.janelia.saalfeldlab.Copy.call(Copy.java:356)
    at org.janelia.saalfeldlab.Copy.call(Copy.java:157)
    at picocli.CommandLine.executeUserObject(CommandLine.java:1853)
    at picocli.CommandLine.access$1100(CommandLine.java:145)
    at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2255)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2249)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2213)
    at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2080)
    at picocli.CommandLine.execute(CommandLine.java:1978)
    at org.janelia.saalfeldlab.Copy.main(Copy.java:200)
Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Length is too large (2318760000)
    at net.imglib2.cache.ref.SoftRefLoaderCache.get(SoftRefLoaderCache.java:145)
    at net.imglib2.cache.util.LoaderCacheAsCacheAdapter.get(LoaderCacheAsCacheAdapter.java:76)
    at net.imglib2.cache.util.CacheAsUncheckedCacheAdapter.get(CacheAsUncheckedCacheAdapter.java:74)
    ... 21 more
Caused by: java.lang.IllegalArgumentException: Length is too large (2318760000)
    at ch.systemsx.cisd.base.mdarray.MDAbstractArray.getLength(MDAbstractArray.java:422)
    at ch.systemsx.cisd.base.mdarray.MDAbstractArray.getLength(MDAbstractArray.java:396)
    at ch.systemsx.cisd.hdf5.HDF5BaseReader.tryGetSpaceParameters(HDF5BaseReader.java:724)
    at ch.systemsx.cisd.hdf5.HDF5BaseReader.getSpaceParameters(HDF5BaseReader.java:671)
    at ch.systemsx.cisd.hdf5.HDF5UnsignedShortReader$15.call(HDF5UnsignedShortReader.java:871)
    at ch.systemsx.cisd.hdf5.HDF5UnsignedShortReader$15.call(HDF5UnsignedShortReader.java:1)
    at ch.systemsx.cisd.hdf5.cleanup.CleanUpCallable.call(CleanUpCallable.java:40)
    at ch.systemsx.cisd.hdf5.HDF5UnsignedShortReader.readMDArrayBlockWithOffset(HDF5UnsignedShortReader.java:895)
    at org.janelia.saalfeldlab.n5.hdf5.N5HDF5Reader.readBlock(N5HDF5Reader.java:736)
    at org.janelia.saalfeldlab.n5.imglib2.N5CacheLoader.get(N5CacheLoader.java:117)
    at org.janelia.saalfeldlab.n5.imglib2.N5CacheLoader.get(N5CacheLoader.java:87)
    at net.imglib2.cache.ref.SoftRefLoaderCache.get(SoftRefLoaderCache.java:135)
    ... 23 more

The file is located here,

https://hpc.nih.gov/~roys5/N00046_4D.h5