How to access pixel values in MBF jpx file

We are an academic group trying to access pixel data in MBF-JPEG2000/*.jpx files from python code.
What would be the recommended way of doing this? Could you recommend a library / an interface?
Thanks!

We don’t use Python to handle image data in our software, so unfortunately we don’t have enough experience with what Python packages are available for handling image data to give a solid recommendation. However, there are a few different ways you could approach this, depending on what your needs are:

  • If you find a Python package that can handle JPEG2000 data, double-check that it includes the Part 2 spec extension (this is the piece that allows reading of JPX stacks in addition to single-plane JP2s).
  • If there’s a Python package for JPEG2000 data that you like, but doesn’t include the Part 2 spec extension, you could save your JPX stacks as series of individual JP2 files, then work with the JP2s.
  • If you’re comfortable working in a C language, you could try the Kakadu library (this is what we use in our software), or you might be able to find a Python package that provides bindings/wrappers for Kakadu features.
  • You could use MicroFile+ (one of our products) to convert any JP2/JPX files to OME-TIFF, which is an open-source format maintained by the Open Microscopy Environment group. These libraries are typically written in C++, but I’d encourage you to inquire further with them to see what options they might be able to offer.