The following is an example of usage of the widget to visualize a local OME-TIFF image file.

Configure the Vitessce widget:

library(vitessceR)

# Create Vitessce view config
vc <- VitessceConfig$new(schema_version = "1.0.16", name = "My config")
dataset <- vc$add_dataset("My dataset")$add_object(
  MultiImageWrapper$new(
    image_wrappers = list(
      OmeTiffWrapper$new(name="Test", img_path="/Users/mkeller/Downloads/exemplar-001.pyramid.ome.tif")
    )
  )
)
spatial <- vc$add_view(dataset, Component$SPATIAL)
spatial_layers <- vc$add_view(dataset, Component$LAYER_CONTROLLER)
status <- vc$add_view(dataset, Component$STATUS)
desc <- vc$add_view(dataset, Component$DESCRIPTION)
desc <- desc$set_props(description = "Visualization of an OME-TIFF file.")
vc$layout(hconcat(
  spatial,
  hconcat(spatial_layers, vconcat(desc, status))
))

# Render the Vitessce widget
vc$widget(theme = "light")


vitessce/vitessceR documentation built on Oct. 12, 2024, 12:24 a.m.