ome / bioformats

Bio-Formats is a Java library for reading and writing data in life sciences image file formats. It is developed by the Open Microscopy Environment. Bio-Formats is released under the GNU General Public License (GPL); commercial licenses are available from Glencoe Software.
https://www.openmicroscopy.org/bio-formats
GNU General Public License v2.0
379 stars 241 forks source link

Libjpeg-turbo exception when converting/opening .ndpi file. #3756

Open michaellee1 opened 2 years ago

michaellee1 commented 2 years ago

Summary

I'm trying to convert an .ndpi file (Hamamatsu) to .tif, but the NDPI reader is throwing an error when I run conversion.

I've tried converting using:

  1. bfconvert
  2. python-bioformats bindings

to read in the image, and I'm getting the exact same error on both:

Exception

Exception in thread "main" java.lang.UnsatisfiedLinkError: 'void org.libjpegturbo.turbojpeg.TJDecompressor.init()'
    at org.libjpegturbo.turbojpeg.TJDecompressor.init(Native Method)
    at org.libjpegturbo.turbojpeg.TJDecompressor.<init>(TJDecompressor.java:81)
    at loci.formats.services.JPEGTurboServiceImpl.getTile(JPEGTurboServiceImpl.java:346)
    at loci.formats.services.JPEGTurboServiceImpl.getTile(JPEGTurboServiceImpl.java:249)
    at loci.formats.in.NDPIReader.openBytes(NDPIReader.java:217)
    at loci.formats.FormatReader.openBytes(FormatReader.java:919)
    at loci.formats.ImageReader.openBytes(ImageReader.java:449)
    at loci.formats.tools.ImageConverter.getTile(ImageConverter.java:1085)
    at loci.formats.tools.ImageConverter.convertPlane(ImageConverter.java:798)
    at loci.formats.tools.ImageConverter.testConvert(ImageConverter.java:727)
    at loci.formats.tools.ImageConverter.main(ImageConverter.java:1126)

I'm actually able to open the image using FIJI's Bioformats plugin, but I'd like to do it programmatically. I'm stuck here on what can be done to convert these images using bioformats - is there a way to resolve this issue?

petebankhead commented 2 years ago

I am also unable to open .ndpi files because of libturbo issues if I am running on an ARM-based Mac and JDK intended for aarch64. However it works for me on the same Mac if I use a JDK intended for Intel processors.

Could this be the problem?

(Sorry for interjecting if not - I was meaning to report the Mac-specific behavior as it may soon become a blocker to releasing an apple-silicon-friendly version of QuPath.)

imagesc-bot commented 2 years ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/apple-m1-qupath/51637/8

imagesc-bot commented 1 year ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/omero-web-issues-with-fpbioimage-app-and-ndpi-files/78581/6

imagesc-bot commented 1 year ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/qupath-v0-4-3-fails-to-open-some-hamamatsu-ndpi-files-on-m1-mac/78887/2