Retrieves the QPTIFFMetadata object (an OME-organised
hierarchy of slide / image / channel / scale metadata) stored inside a
QPTIFFImage. The generic falls back to
metadata for S4 objects such as
SummarizedExperiment, so metadata(img) and
metadata(spe) both work when bgnormR is loaded.
Arguments
- x
A
QPTIFFImage.- ...
Unused.
Value
A QPTIFFMetadata object (a named list).
Details
The returned object mirrors the OME hierarchy:
slideSlide-constant identity (id, barcode, operator, ...).
imagesOne scene per distinct image, each with
image_info(optics, camera, scan_resolution),channels(per-channelname,fluorophore,dye_from_name,exposure_time_us, wavelengths,color_rgb, ...) andscales(per pyramid level).acquisition_formatOne of
"brightfield","polaris_scanband","fusion_paged","ome_tiff","ome_zarr", or"unknown".
Use the accessors (qpi_format, qpi_channels,
qpi_pixel_size_um, channel_table, ...) rather
than indexing the nested list directly.
Examples
path <- system.file("extdata", "PA_HNC_sample.ome.tiff", package = "bgnormR")
img <- read_qptiff(path)
#> Reading TIFF directory structure ...
#> Reading OME-TIFF metadata ...
#> Reading IFD page layouts ...
#> Loading 5 channel(s) ...
#> Loading 5 channel(s) ...
meta <- metadata(img)
#> Error: unable to find an inherited method for function ‘metadata’ for signature ‘x = "QPTIFFImage"’
qpi_format(meta)
#> Error: object 'meta' not found
# Per-channel dye information as a tidy table
channel_table(meta)[, c("name", "fluorophore", "dye_from_name")]
#> Error: object 'meta' not found