Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #5092 (closed)

Opened 13 years ago

Closed 11 years ago

Support .ndpi files with width or height > 65500

Reported by: mlinkert Owned by: mlinkert
Priority: critical Milestone: 5.0.0-beta1
Component: Bio-Formats Version: n.a.
Keywords: n.a. Cc: philippe.mailly@…, smithd@…, taewooko@…, andreas.dander@…, Richard.Ingram@…, qn.trinh-xuan@…, kim.linton@…, anitha.kannan@…
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: n.a.

Description (last modified by mlinkert)

Many .ndpi files contain JPEG streams that have a width and/or height larger than 65500 (the maximum size supported by Java's JPEG decoder. The maximum size allowed in the JPEG specification is 65535, and it is not uncommon to have .ndpi files that contain much larger images.

After some investigation, it looks like Hamamatsu has written their very own JPEG encoder/decoder to work around the limitations in the JPEG specification, as no other decoder that I can find actually supports this.
A lot of investigation has already gone into this ticket, and given the scope of work required I don't see it happening for 4.3.

When we finally do have time to sort this out, the plan is roughly:

1) See if there is a way to strip off the dimension information and just read all of the tiles using Java's built-in JPEG support. We can then re-pack the tiles using the dimension information stored in the .ndpi file.

2) Failing (1), see if we can write our own Java interface to the JPEG native libraries included with the JRE that would accomplish the same thing as (1).

3) If neither (1) nor (2) work, we'll need to write our own baseline JPEG decoder that allows the image dimensions to be overridden.

Change History (18)

comment:1 Changed 13 years ago by Melissa Linkert <melissa@…>

(In [4d346e2b279677ec57d6d443833762f6abeb4fe7/bioformats.git]) Prevent errors for .ndpi files that use a DNL marker.

See #5092. The problem now is what to do about images which have a
width or height > 65535 (the maximum width and height allowed in a JPEG
stream).

comment:2 Changed 13 years ago by Melissa Linkert <melissa@…>

(In [de977aa84dffe5a14583689bfbd5d57703192290/bioformats.git]) Prevent errors for .ndpi files that use a DNL marker.

See #5092. The problem now is what to do about images which have a
width or height > 65535 (the maximum width and height allowed in a JPEG
stream).

comment:3 Changed 13 years ago by Melissa Linkert <melissa@…>

(In [de977aa84dffe5a14583689bfbd5d57703192290/bioformats.git]) Prevent errors for .ndpi files that use a DNL marker.

See #5092. The problem now is what to do about images which have a
width or height > 65535 (the maximum width and height allowed in a JPEG
stream).

comment:4 Changed 13 years ago by mlinkert

  • Cc philippe.mailly@… added
  • Description modified (diff)
  • Sprint changed from 2011-05-05 (11) to 2011-05-19 (12)
  • Summary changed from Update JIMI service to handle JPEG streams with DNL markers to Update tile-based JPEG decoder to handle images that are too large

comment:5 Changed 13 years ago by mlinkert

  • Cc smithd@… added

comment:6 Changed 13 years ago by mlinkert

  • Summary changed from Update tile-based JPEG decoder to handle images that are too large to BUG: Update tile-based JPEG decoder to handle images that are too large

comment:7 Changed 13 years ago by mlinkert

  • Description modified (diff)
  • Milestone changed from OMERO-Beta4.3 to Unscheduled
  • Remaining Time changed from 1 to 5
  • Sprint 2011-05-19 (12) deleted
  • Summary changed from BUG: Update tile-based JPEG decoder to handle images that are too large to Support .ndpi files with width or height > 65500

comment:8 Changed 13 years ago by mlinkert

  • Cc taewooko@… added

comment:9 Changed 13 years ago by Melissa Linkert <melissa@…>

(In [200b08be344e4969c259fad783737e254fcfe86b/bioformats.git]) Throw an exception if the dimensions are unsupported.

...instead of silently returning incorrect pixels. See #5092.

comment:10 Changed 13 years ago by Melissa Linkert <melissa@…>

(In [200b08be344e4969c259fad783737e254fcfe86b/bioformats.git]) Throw an exception if the dimensions are unsupported.

...instead of silently returning incorrect pixels. See #5092.

comment:11 Changed 13 years ago by Melissa Linkert <melissa@…>

(In [4dcd4aee06124aad6ef6ed4004d0906f662f8a94/bioformats.git]) Throw an exception if the dimensions are unsupported.

...instead of silently returning incorrect pixels. See #5092.
(cherry picked from commit 200b08be344e4969c259fad783737e254fcfe86b)

comment:12 Changed 13 years ago by Melissa Linkert <melissa@…>

(In [4dcd4aee06124aad6ef6ed4004d0906f662f8a94/bioformats.git]) Throw an exception if the dimensions are unsupported.

...instead of silently returning incorrect pixels. See #5092.
(cherry picked from commit 200b08be344e4969c259fad783737e254fcfe86b)

comment:13 Changed 12 years ago by mlinkert

  • Cc andreas.dander@… added

comment:14 Changed 12 years ago by saloynton

  • Cc Richard.Ingram@… added

comment:15 Changed 12 years ago by mlinkert

  • Cc qn.trinh-xuan@… added

comment:16 Changed 12 years ago by mlinkert

  • Milestone changed from Unscheduled to OMERO-4.5

Updated outline of what needs to happen and the target completion date:

  • native library bundling [7 September]
    • create a JAR file that contains the libjpegturbo native libraries
    • adopt a solution for loading native libraries from a JAR file
  • underlying JPEG infrastructure [15 September]
    • update existing JPEG readers to use libjpegturbo when available
    • update JPEG support to allow tile access
  • NDPI-specific updates [30 September]
    • make any necessary updates to libjpegturbo and/or the tile accessors to account for dimensions > 65500
    • update the NDPI reader to respect recent large-image API changes
  • testing, with assistance from the rest of the team [5 October]

The idea is then to have this ready for the late fall release (4.5?).

comment:17 Changed 12 years ago by mlinkert

  • Cc kim.linton@… anitha.kannan@… added

comment:18 Changed 11 years ago by mlinkert

  • Remaining Time changed from 5 to 0
  • Resolution set to fixed
  • Status changed from new to closed

Fixed with merging of https://github.com/openmicroscopy/bioformats/pull/159

Builds for testing are available here: http://hudson.openmicroscopy.org.uk/view/Bio-Formats/job/BIOFORMATS-trunk/
There is not yet a stable release with this functionality.

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.70532 sec.)

We're Hiring!