From 73e36b94e7782499ee28dd0f8caf169958c02f26 Mon Sep 17 00:00:00 2001 From: George Chen <72078254+jiajic@users.noreply.github.com> Date: Fri, 30 Aug 2024 19:45:44 -0400 Subject: [PATCH] Update methods-plot.R --- R/methods-plot.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/R/methods-plot.R b/R/methods-plot.R index 8e53a170..e3e540a6 100644 --- a/R/methods-plot.R +++ b/R/methods-plot.R @@ -504,9 +504,8 @@ setMethod("plot", signature(x = "affine2d", y = "missing"), function(x, ...) { ))] a$x <- giottoLargeImage@raster_object - # Determine likely image bitdepth - if (is.null(max_intensity)) { + if (is.null(max_intensity) || is.na(max_intensity)) { bitDepth <- ceiling(log(x = giottoLargeImage@max_intensity, base = 2)) # Assign discovered bitdepth as max_intensity max_intensity <- 2^bitDepth - 1