Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Kimberly Isobel Meechan
Image Data Explorer
Commits
089d657e
Commit
089d657e
authored
Jun 19, 2020
by
Jean-Karim Heriche
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added option to rescale image intensity.
parent
ea32e946
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
image_data_explorer.R
image_data_explorer.R
+11
-5
No files found.
image_data_explorer.R
View file @
089d657e
...
...
@@ -61,7 +61,7 @@ ui <- function(request) {
## Custom CSS to:
## - Reduce white space around boxes
## - Ch
e
nge font size
## - Ch
a
nge font size
## - Change postion and size of notification box
tags
$
head
(
tags
$
style
(
HTML
(
'[class*="col-lg-"],[class*="col-md-"],
...
...
@@ -145,7 +145,9 @@ ui <- function(request) {
),
## Select column containing image file names
uiOutput
(
"fileColumn1"
),
uiOutput
(
"fileColumn2"
)
checkboxInput
(
"normalize.img1"
,
"Rescale intensity for image 1"
,
TRUE
),
uiOutput
(
"fileColumn2"
),
checkboxInput
(
"normalize.img2"
,
"Rescale intensity for image 2"
,
TRUE
)
),
box
(
width
=
3
,
title
=
"ROIs"
,
solidHeader
=
TRUE
,
status
=
"primary"
,
...
...
@@ -416,7 +418,8 @@ server <- function(input, output, session) {
settings
<-
list
(
"selectedVar"
=
input
$
selectedVar
,
"colsOnHover"
=
input
$
colsOnHover
,
"colsToHide"
=
input
$
colsToHide
,
"groupLabels"
=
input
$
groupLabels
,
"roiX"
=
input
$
roiX
,
"roiY"
=
input
$
roiY
,
"roiFrame"
=
input
$
roiFrame
,
"imgRoot"
=
rv
$
inputChoices
[[
"imgRoot"
]],
"fileCol1"
=
input
$
fileCol1
,
"fileCol2"
=
input
$
fileCol2
)
"fileCol1"
=
input
$
fileCol1
,
"fileCol2"
=
input
$
fileCol2
,
"normalize.img1"
=
input
$
normalize.img1
,
"normalize.img2"
=
input
$
normalize.img2
)
saveRDS
(
settings
,
file
)
}
)
...
...
@@ -440,13 +443,14 @@ server <- function(input, output, session) {
updateSelectizeInput
(
session
=
session
,
inputId
=
"roiFrame"
,
selected
=
rv
$
inputChoices
[[
"roiFrame"
]])
updateSelectizeInput
(
session
=
session
,
inputId
=
"fileCol1"
,
selected
=
rv
$
inputChoices
[[
"fileCol1"
]])
updateSelectizeInput
(
session
=
session
,
inputId
=
"fileCol2"
,
selected
=
rv
$
inputChoices
[[
"fileCol2"
]])
updateCheckboxInput
(
session
=
session
,
inputId
=
"normalize.img1"
,
value
=
rv
$
inputChoices
[[
"normalize.img1"
]])
updateCheckboxInput
(
session
=
session
,
inputId
=
"normalize.img2"
,
value
=
rv
$
inputChoices
[[
"normalize.img2"
]])
})
# Vector of user input names (i.e. inputId) that we may want to restore from file
# Values are stored in rv$inputChoices
inputChoices.params
<-
c
(
"selectedVar"
,
"colsOnHover"
,
"colsToHide"
,
"groupLabels"
,
"roiX"
,
"roiY"
,
"roiFrame"
,
"imgRoot"
,
"fileCol1"
,
"fileCol2"
)
"roiFrame"
,
"imgRoot"
,
"fileCol1"
,
"fileCol2"
,
"normalize.img1"
,
"normalize.img2"
)
rv
<-
reactiveValues
(
inputChoices
=
setNames
(
vector
(
"list"
,
length
(
inputChoices.params
)),
inputChoices.params
),
data
=
NULL
,
currentRows
=
NULL
,
selectedRows
=
NULL
,
clusters
=
NULL
,
imgRoot
=
NULL
,
imgPath1
=
NULL
,
imgPath2
=
NULL
,
pixelPosition
=
NULL
,
selectedFrame
=
NULL
,
...
...
@@ -864,6 +868,7 @@ server <- function(input, output, session) {
colorMode
(
image1
)
=
Color
image1
<-
drawCircle
(
image1
,
rv
$
pixelPosition
[
1
],
rv
$
pixelPosition
[
2
],
r
,
"red"
,
fill
=
TRUE
,
z
=
1
)
}
if
(
input
$
normalize.img1
)
{
image1
<-
normalize
(
image1
)}
display
(
image1
,
method
=
'browser'
)
}
})
...
...
@@ -877,6 +882,7 @@ server <- function(input, output, session) {
colorMode
(
image2
)
=
Color
image2
<-
drawCircle
(
image2
,
rv
$
pixelPosition
[
1
],
rv
$
pixelPosition
[
2
],
r
,
"red"
,
fill
=
TRUE
,
z
=
1
)
}
if
(
input
$
normalize.img2
)
{
image2
<-
normalize
(
image2
)}
display
(
image2
,
method
=
'browser'
)
}
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment