Extracting layer 0 from svs file using vips and openslide

Siddharth Samsi samsi at osc.edu
Mon Jul 9 14:18:54 EDT 2012


Hello,
I am trying to use vips and openslide to extract layer 0 into an uncompressed tiff. I expect the resulting image to be larger than 4GB and am using libtiff 4.0.1 which has built-in support for BigTIFF. 
Some specifics of my configuration : 

System : Red Hat Enterprise Linux 6
OpenSlide version : 3.2.6, compiled with libtiff 4.0.1 and OpenJpeg
Vips version : 7.28.8, compiled with libtiff 4.0.1 and linked with OpenSlide 3.2.6

After compilation, I used ldd to confirm that both OpenSlide and vips were linked against the same libtiff, version 4.0.1. 
Following the instructions I found on this mailing list I ran :

vips openslideload cmu-2.svs cmu-2-new.tiff

TIFFSetField: cmu-2-new.tiff: Unknown tag 317
TIFFAppendToStrip: Maximum TIFF file size exceeded
wbuffer_write: write failed
unix error: Unknown error 18446744073709551615
vips_region_prepare_to: dest too small
vips_region_prepare_to: dest too small
TIFFAppendToStrip: Maximum TIFF file size exceeded
vips_cache_drop_all:

When vips exits, the output file (cmu-2-new.tiff) is a little over 4GB. I assumed that since both the packages being used are linked against the correct libtiff library, it should not have given up when the file exceeded 4GB. Am I missing something ? Is there an input argument to openslide load that isn't documented ? 

As an alternative I am currently using the following : 

vips tiffsave example.svs example-vips.tif --pyramid --tile --tile-width=256 --tile-height=256 --bigtiff

This does work, but it produces an image with 4-channel sRGB profile, which I need to convert to RGB in order to use it with IIPImage. That's another issue I haven't quite resolved yet. 

Thanks ,
Sid



More information about the openslide-users mailing list