Skip to content

Commit

Permalink
Merge pull request #41 from william-hutchison/update-gate
Browse files Browse the repository at this point in the history
Update gate
  • Loading branch information
william-hutchison authored Sep 24, 2024
2 parents d88367b + 04b4a7b commit 0d67253
Show file tree
Hide file tree
Showing 7 changed files with 107 additions and 416 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: tidySpatialExperiment
Title: SpatialExperiment with tidy principles
Version: 1.1.4
Version: 1.1.5
Authors@R: c(
person("William", "Hutchison", email = "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0009-0001-6242-4269")),
Expand Down
15 changes: 8 additions & 7 deletions R/methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -352,24 +352,25 @@ gate_interactive <-
}

# Prepare spatial information
image <-
spe |>
SpatialExperiment::imgRaster() |>
magick::image_read()
image_info <-
SpatialExperiment::imgData(spe)[image_index, ]@listData$data[[1]] |>
SpatialExperiment::imgRaster() |>
magick::image_read() |>
magick::image_info()

image_x_size <-
magick::image_info(image)$width /
image_info$width /
SpatialExperiment::imgData(spe)[image_index, ]@listData$scaleFactor

image_y_size <-
magick::image_info(image)$height /
image_info$height /
SpatialExperiment::imgData(spe)[image_index, ]@listData$scaleFactor

image_uri <-
SpatialExperiment::imgData(spe)[image_index, ]@listData$data[[1]] |>
SpatialExperiment::imgRaster() |>
plotly::raster2uri()

# Create plot
plot <-
data |>
Expand Down
Loading

0 comments on commit 0d67253

Please sign in to comment.