Skip to content

Commit

Permalink
print messages to find lag in cropped plot
Browse files Browse the repository at this point in the history
  • Loading branch information
mzarowka committed Mar 20, 2024
1 parent 36e9ecd commit 9c0e379
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,9 @@ run_core <- function(autoSave = TRUE){

zoomedPlot <- reactive({
if (!is.null(input$plotBrush)){
print("cropping zoomedPlot...")
a1 <- terra::crop(x=coreImage(),y=terra::ext(c(x_range(input$plotBrush)[1], x_range(input$plotBrush)[2], y_range(input$plotBrush)[1], y_range(input$plotBrush)[2])))
print("plotting zoomedPlot...")
suppressWarnings(terra::plotRGB(x = a1, r = RGBlayers()[1], g = RGBlayers()[2], b = RGBlayers()[3], stretch = "hist"))
} else {
terra::plotRGB(x = coreImage(), r = RGBlayers()[1], g = RGBlayers()[2], b = RGBlayers()[3], stretch = "hist")
Expand All @@ -867,7 +869,10 @@ run_core <- function(autoSave = TRUE){

output$cropped_plot <- renderPlot({

print("cropping cropped_plot...")

a1 <- terra::crop(x=coreImage(),y=terra::ext(allParams$cropImage))
print("plotting cropped_plot...")
suppressWarnings(terra::plotRGB(x = a1, r = RGBlayers()[1], g = RGBlayers()[2], b = RGBlayers()[3], stretch = "hist"))

if (sum(complete.cases(analysisRegions$DT))>0){
Expand Down

0 comments on commit 9c0e379

Please sign in to comment.