Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ui <- fluidPage(titlePanel("Choose cells"),
- fluidRow(style = "margin: 15px;",
- column(4,h3("Input data"),div(id = "Available", style = "min-height: 600px;",lapply(1:6, function(i) {plotOutput(paste0('stack_image', i),inline = T)}))),
- column(4,h3("Postive class"),div(id = "Postive_class", style = "min-height: 600px;")),
- column(4,h3("Negative class"),div(id = "Negative_class", style = "min-height: 600px;"))),
- fluidRow(style = "margin: 15px;",
- column(12,downloadButton("Postive", label = "Download Potive"),downloadButton("Negative", label = "Download negative"))),
- dragulaOutput("dragula"))
- server <- function(input, output) {
- Image_corrdinate <- reactive({
- setwd("~/Desktop/Gil_LabWork/AIMS/Shiny/123118/temp")
- Image_corrdinate<-readRDS("xy.rds")
- })
- output$dragula <- renderDragula({
- dragula(c("Available", "Postive_class","Negative_class"))
- })
- lapply(1:6, function(i) {
- output[[paste0('stack_image', i)]] <- renderPlot({
- req(Image_corrdinate()[,,,i])
- plot(Image_corrdinate()[,,,i]*5,cex=1, cex.lab=1)}, height = 100, width = 100 )
- })
- output$Postive <- downloadHandler({
- state <- dragulaValue(input$dragula)
- saveRDS(state$Postive_class,"negative.rds")
- })
- output$Negative <- downloadHandler({
- state <- dragulaValue(input$dragula)
- saveRDS(state$Negative_class,"potive.rds")
- })
- }
- shinyApp(ui = ui, server = server)
Add Comment
Please, Sign In to add comment