Title: | An interactive multi-channel image viewer for R |
---|---|
Description: | This R package supports interactive visualization of multi-channel images and segmentation masks generated by imaging mass cytometry and other highly multiplexed imaging techniques using shiny. The cytoviewer interface is divided into image-level (Composite and Channels) and cell-level visualization (Masks). It allows users to overlay individual images with segmentation masks, integrates well with SingleCellExperiment and SpatialExperiment objects for metadata visualization and supports image downloads. |
Authors: | Lasse Meyer [aut, cre] , Nils Eling [aut] |
Maintainer: | Lasse Meyer <[email protected]> |
License: | GPL-3 |
Version: | 1.7.0 |
Built: | 2024-11-29 07:28:31 UTC |
Source: | https://github.com/bioc/cytoviewer |
This shiny R application allows users to interactively visualize multi-channel
images and segmentation masks generated by imaging mass cytometry and other
highly multiplexed imaging techniques. The cytoviewer
interface is
divided into image-level (Composite and Channels) and cell-level visualization
(Masks). It allows users to overlay individual images with segmentation masks,
integrates well with SingleCellExperiment
and SpatialExperiment
objects for metadata visualization and supports image downloads.
cytoviewer( image = NULL, mask = NULL, object = NULL, cell_id = NULL, img_id = NULL )
cytoviewer( image = NULL, mask = NULL, object = NULL, cell_id = NULL, img_id = NULL )
image |
(optional) a |
mask |
(optional) a |
object |
(optional) a |
cell_id |
character specifying the |
img_id |
character specifying the |
A Shiny app object for interactive multi-channel image visualization and exploration
The functionality of cytoviewer
depends on which input objects are
user-provided. Below we describe the four use cases in respect to input
objects and functionality.
1. Usage of cytoviewer with images, masks and object
The full functionality of cytoviewer can be leveraged when
image
, mask
and object
are provided.
This allows image-level visualization (Composite and Channels),
cell-level visualization, overlaying images with segmentation masks
as well as metadata visualization.
2. Usage of cytoviewer with images only
If only image
is specified, image-level visualization (Composite and
Channels) is possible.
3. Usage of cytoviewer with images and masks
Image-level visualization (Composite and Channels), overlaying of images with
masks and cell-level visualization is feasible when image
and
mask
are provided.
4. Usage of cytoviewer with masks and object
If mask
and object
are specified, cell-level visualization
as well as metadata visualization is possible.
Lasse Meyer ([email protected])
plotPixels
for the function underlying
image-level visualization
plotCells
for the function underlying
cell-level visualization
cytomapperShiny
for a shiny application that
visualizes gated cells on images
# Load example datasets from cytomapper library(cytomapper, quietly = TRUE) data("pancreasImages") data("pancreasMasks") data("pancreasSCE") # 1. Use cytoviewer with images, masks and object app <- cytoviewer(image = pancreasImages, mask = pancreasMasks, object = pancreasSCE, img_id = "ImageNb", cell_id = "CellNb") if (interactive()) { shiny::runApp(app, launch.browser = TRUE) } ## Other input variations (see "The input objects" section): # 2. Use cytoviewer with images app_1 <- cytoviewer(image = pancreasImages) if (interactive()) { shiny::runApp(app_1, launch.browser = TRUE) } # 3. Use cytoviewer with images and masks app_2 <- cytoviewer(image = pancreasImages, mask = pancreasMasks, img_id = "ImageNb") if (interactive()) { shiny::runApp(app_2, launch.browser = TRUE) } # 4. Use cytoviewer with masks and object app_3 <- cytoviewer(mask = pancreasMasks, object = pancreasSCE, img_id = "ImageNb", cell_id = "CellNb") if (interactive()) { shiny::runApp(app_3, launch.browser = TRUE) }
# Load example datasets from cytomapper library(cytomapper, quietly = TRUE) data("pancreasImages") data("pancreasMasks") data("pancreasSCE") # 1. Use cytoviewer with images, masks and object app <- cytoviewer(image = pancreasImages, mask = pancreasMasks, object = pancreasSCE, img_id = "ImageNb", cell_id = "CellNb") if (interactive()) { shiny::runApp(app, launch.browser = TRUE) } ## Other input variations (see "The input objects" section): # 2. Use cytoviewer with images app_1 <- cytoviewer(image = pancreasImages) if (interactive()) { shiny::runApp(app_1, launch.browser = TRUE) } # 3. Use cytoviewer with images and masks app_2 <- cytoviewer(image = pancreasImages, mask = pancreasMasks, img_id = "ImageNb") if (interactive()) { shiny::runApp(app_2, launch.browser = TRUE) } # 4. Use cytoviewer with masks and object app_3 <- cytoviewer(mask = pancreasMasks, object = pancreasSCE, img_id = "ImageNb", cell_id = "CellNb") if (interactive()) { shiny::runApp(app_3, launch.browser = TRUE) }