[ome-devel] in-memory reading

Roger Leigh rleigh at dundee.ac.uk
Fri Sep 1 15:14:45 BST 2017


On 01/09/17 10:00, Manuel Stritt wrote:
> Dear all,
>
> I'm trying to use the in-memory reading method as documented here:
>
> https://docs.openmicroscopy.org/bio-formats/5.6.0/developers/in-memory.html
>
> in combination with a NDPI reader + BufferedImageReader:

Making this into a compilable example, the stack trace is this:

% javac -classpath artifacts/loci_tools.jar test.java
% java -Xmx12g -classpath ./artifacts/loci_tools.jar:. test
Reading file into memory from disk...
3544235 bytes read.
log4j:WARN No appenders could be found for logger (loci.common.Location).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
more info.
size reader: 3968 x4864
Exception: java.lang.IndexOutOfBoundsException
java.lang.IndexOutOfBoundsException
         at java.nio.Buffer.checkBounds(Buffer.java:567)
         at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:149)
         at loci.common.ByteArrayHandle.read(ByteArrayHandle.java:152)
         at
loci.common.RandomAccessInputStream.read(RandomAccessInputStream.java:613)
         at
loci.formats.services.JPEGTurboServiceImpl.getTile(JPEGTurboServiceImpl.java:304)
         at
loci.formats.services.JPEGTurboServiceImpl.getTile(JPEGTurboServiceImpl.java:235)
         at loci.formats.in.NDPIReader.openBytes(NDPIReader.java:191)
         at loci.formats.FormatReader.openBytes(FormatReader.java:886)
         at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:334)
         at
loci.formats.gui.BufferedImageReader.openImage(BufferedImageReader.java:86)
         at test.main(test.java:45)

The error appears to be deep inside NDPIReader.openBytes inside
JPEGTurboService.


Regards,
Roger

--
Dr Roger Leigh -- Open Microscopy Environment
Wellcome Trust Centre for Gene Regulation and Expression,
College of Life Sciences, University of Dundee, Dow Street,
Dundee DD1 5EH Scotland UK   Tel: (01382) 386364

The University of Dundee is a registered Scottish Charity, No: SC015096
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.java
Type: text/x-java
Size: 1983 bytes
Desc: not available
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20170901/765d936a/attachment.java>


More information about the ome-devel mailing list