Constructor
VipsImageopenslideload
Declaration [src]
int
vips_openslideload (
const char* filename,
VipsImage** out,
...
)
Description [src]
Optional arguments:
level: %gint, load this levelassociated: %gchararray, load this associated imageattach_associated: %gboolean, attach all associated images as metadataautocrop: %gboolean, crop to image boundsrgb: %gboolean, output RGB (not RGBA) pixels
Read a virtual slide supported by the OpenSlide library into a VIPS image. OpenSlide supports images in Aperio, Hamamatsu, MIRAX, Sakura, Trestle, and Ventana formats.
To facilitate zooming, virtual slide formats include multiple scaled-down
versions of the high-resolution image. These are typically called
“levels”. By default, vips_openslideload() reads the highest-resolution
level (level 0). Set level to the level number you want.
In addition to the slide image itself, virtual slide formats sometimes
include additional images, such as a scan of the slide’s barcode.
OpenSlide calls these “associated images”. To read an associated image,
set associated to the image’s name.
A slide’s associated images are listed in the
“slide-associated-images” metadata item.
If you set attach_associated, then all associated images are attached as
metadata items. Use vips_image_get_image() on out to retrieve them. Images
are attached as “openslide-associated-XXXXX”, where XXXXX is the name of the
associated image.
By default, the output of this operator is RGBA. Set rgb to enable RGB output.
See also: vips_image_new_from_file().
This constructor is not directly available to language bindings.
Parameters
filename-
Type:
const char*File to load.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. out-
Type:
VipsImageDecompressed image.
The argument will be set by the function. The caller of the function takes ownership of the returned data, and is responsible for freeing it. ...-
Type:
NULL-terminated list of optional named arguments.