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
f4754ed3
Commit
f4754ed3
authored
Oct 28, 2020
by
Jean-Karim Heriche
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed image duplication in viewers.
parent
9cc00a1b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
R/explore_image.R
R/explore_image.R
+2
-2
R/explore_image2.R
R/explore_image2.R
+4
-4
No files found.
R/explore_image.R
View file @
f4754ed3
...
...
@@ -42,10 +42,10 @@ explore_image_server <-function(input, output, session, rv){
if
(
!
is.null
(
rv
$
roiFrame
)
&&
rv
$
roiFrame
!=
""
)
{
## Figure out what the 3rd dimension is
if
(
rv
$
metadataImg1
$
coreMetadata
$
sizeZ
==
1
&&
rv
$
metadataImg1
$
coreMetadata
$
sizeT
>
1
)
{
slice.def
=
list
(
T
=
rv
$
selectedFrame
)
slice.def
=
list
(
T
=
unique
(
rv
$
selectedFrame
)
)
}
else
if
(
rv
$
metadataImg1
$
coreMetadata
$
sizeZ
>
1
&&
rv
$
metadataImg1
$
coreMetadata
$
sizeT
==
1
)
{
slice.def
=
list
(
Z
=
rv
$
selectedFrame
)
slice.def
=
list
(
Z
=
unique
(
rv
$
selectedFrame
)
)
}
}
## Use Bio-Formats to read one image
...
...
R/explore_image2.R
View file @
f4754ed3
...
...
@@ -26,9 +26,9 @@ explore_image_server2 <-function(input, output, session, rv){
## Deal with eventual Windows-style paths
## Not sure if necessary, not fully tested
rootDir
<-
file.path
(
strsplit
(
rv
$
imgRoot
,
'\\\\'
))
if
(
!
is.null
(
rv
$
imgPath
1
)
&&
length
(
unique
(
rv
$
imgPath
1
))
==
1
&&
if
(
!
is.null
(
rv
$
imgPath
2
)
&&
length
(
unique
(
rv
$
imgPath
2
))
==
1
&&
length
(
unique
(
rv
$
selectedFrame
))
<=
1
&&
!
is.null
(
rv
$
fileCol
1
)
&&
rv
$
fileCol
1
!=
""
){
!
is.null
(
rv
$
fileCol
2
)
&&
rv
$
fileCol
2
!=
""
){
rv
$
imgPath2
<-
gsub
(
"[[:space:]]"
,
""
,
rv
$
imgPath2
)
filePath2
<-
file.path
(
rootDir
,
strsplit
(
rv
$
imgPath2
[
1
],
'\\\\'
))
validate
(
need
(
filePath2
!=
""
&&
file.exists
(
filePath2
),
"File not found. Check that you selected the correct image root directory."
))
...
...
@@ -37,10 +37,10 @@ explore_image_server2 <-function(input, output, session, rv){
if
(
!
is.null
(
rv
$
roiFrame
)
&&
rv
$
roiFrame
!=
""
)
{
## Figure out what the 3rd dimension is
if
(
rv
$
metadataImg2
$
coreMetadata
$
sizeZ
==
1
&&
rv
$
metadataImg2
$
coreMetadata
$
sizeT
>
1
)
{
slice.def
=
list
(
T
=
rv
$
selectedFrame
)
slice.def
=
list
(
T
=
unique
(
rv
$
selectedFrame
)
)
}
else
if
(
rv
$
metadataImg2
$
coreMetadata
$
sizeZ
>
1
&&
rv
$
metadataImg2
$
coreMetadata
$
sizeT
==
1
)
{
slice.def
=
list
(
Z
=
rv
$
selectedFrame
)
slice.def
=
list
(
Z
=
unique
(
rv
$
selectedFrame
)
)
}
}
## Use Bio-Formats to read one image
...
...
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