VIPS image processing system now supports OpenSlide
Benjamin Gilbert
bgilbert at cs.cmu.edu
Tue Apr 17 14:24:42 EDT 2012
VIPS is an image processing system that can work with large images
without loading the entire image into RAM. It includes a library,
libvips, and a graphical interface, nip2. As of libvips 7.28.3 and nip2
7.28.2, VIPS supports reading whole-slide images with OpenSlide.
VIPS is available here:
http://www.vips.ecs.soton.ac.uk/
Exporting slide data with vips
------------------------------
libvips includes a command-line program, "vips", that can be used to
export data from a whole-slide image to another format.
To convert level 0 of a slide to an LZW-compressed tiled TIFF:
vips openslideload CMU-1.mrxs slide.tiff[tile,compression=lzw]
To convert level 3 instead:
vips openslideload --level 3 CMU-1.mrxs \
slide.tiff[tile,compression=lzw]
or, equivalently:
vips tiffsave CMU-1.mrxs[level=3] slide.tiff --tile \
--compression=lzw
To save the "label" associated image as a PNG:
vips openslideload --associated label CMU-1.mrxs label.png
Viewing a slide with nip2
-------------------------
nip2 is the VIPS GUI. It can only work with one slide level at a time,
so it does not provide an efficient zoomable interface. However, unlike
other conventional image viewers/editors, it can handle very large images.
nip2 has a slightly different syntax for loading slides.
To load level 0:
nip2 CMU-1.mrxs
To load level 3:
nip2 CMU-1.mrxs:3
To load the "label" associated image:
nip2 CMU-1.mrxs:,label
Okay, but don't you mean "layer"?
---------------------------------
OpenSlide 3.3 and above will use the term "level" instead of "layer",
since the first seems to be more commonly used for pyramidal images.
The VIPS OpenSlide interface follows the new convention.
--Benjamin Gilbert
More information about the openslide-users
mailing list