OpenSlide Only Recognizing Topmost Layer

Benjamin Gilbert bgilbert at cs.cmu.edu
Wed Jun 11 04:57:07 EDT 2014


On 06/10/2014 03:19 PM, Kim, Timothy H. wrote:
> I am currently working on a Java project that uses the OpenSlide library
> to visualize large tiled pyramidal TIFF files. However, the image files
> that we are currently working with are single-layered full resolution
> TIFF images, which is not a compatible format with OpenSlide.

Tiled TIFFs should be compatible even if they are single-level. 
Stripped TIFFs are not.

>                       convert.define("tiff:tile-geometry=256x256");

So you've asked for a tiled TIFF...

>                       convert.define("tiff:rows-per-strip=16");

...but RowsPerStrip doesn't make sense for a tiled image.  You should be 
able to omit this line.

> When we convert an image into a pyramidal TIFF using the im4java API,
> OpenSlide only recognizes the full-resolution layer of the image (Layer
> 0). OpenSlide can still open and visualize the image, but it is very
> laggy when scrolling and zooming because the pyramid functionality is
> lost.

Carl is right that the SubfileType is the problem; it should be 0x1 
(reduced-resolution image) rather than 0x2 (multi-page document).  That 
was a bug in ImageMagick that was fixed a while ago (r6061).

I noticed this in the im4java output:

> Software: GraphicsMagick 1.3.19 2013-12-31 Q16 http://www.GraphicsMagick.org/

im4java isn't using ImageMagick, it's using GraphicsMagick, which 
probably has a similar bug.  You could try reporting it to the 
GraphicsMagick developers.

--Benjamin Gilbert



More information about the openslide-users mailing list