Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NutriMorph
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DEBREUVE Eric
NutriMorph
Commits
f1671d52
Commit
f1671d52
authored
3 years ago
by
DEBREUVE Eric
Browse files
Options
Downloads
Patches
Plain Diff
added gfp image
parent
6f5f04c4
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
brick/io/screen/soma_validation.py
+14
-1
14 additions, 1 deletion
brick/io/screen/soma_validation.py
nutrimorph.py
+1
-1
1 addition, 1 deletion
nutrimorph.py
with
15 additions
and
2 deletions
brick/io/screen/soma_validation.py
+
14
−
1
View file @
f1671d52
...
...
@@ -17,8 +17,10 @@ class soma_validation_window_t:
"
mip
"
,
"
mip_4_display
"
,
"
root
"
,
"
canvas_gfp
"
,
"
canvas
"
,
"
cursor_nfo
"
,
"
tk_image_gfp
"
,
"
tk_image
"
,
"
canvas_image
"
,
)
...
...
@@ -26,13 +28,16 @@ class soma_validation_window_t:
mip
:
array_t
mip_4_display
:
array_t
root
:
tknt
.
Tk
canvas_gfp
:
tknt
.
Canvas
canvas
:
tknt
.
Canvas
cursor_nfo
:
tknt
.
Label
tk_image_gfp
:
tk_image_t
tk_image
:
tk_image_t
canvas_image
:
int
def
__init__
(
self
,
gfp
:
array_t
,
lmap
:
array_t
,
mip_axis
:
int
=
-
1
,
color_version
:
bool
=
True
,
...
...
@@ -41,7 +46,9 @@ class soma_validation_window_t:
"""
with_cm:
"
plasma
"
and
"
viridis
"
seem to be good options
"""
mip
=
nmpy
.
max
(
lmap
,
axis
=
mip_axis
)
gfp_mip
=
nmpy
.
amax
(
gfp
,
axis
=
mip_axis
)
gfp_mip
*=
255.0
/
nmpy
.
amax
(
gfp_mip
)
mip
=
nmpy
.
amax
(
lmap
,
axis
=
mip_axis
)
if
color_version
:
if
with_cm
is
None
:
mip_4_display
=
_ColoredVersion
(
mip
)
...
...
@@ -51,6 +58,11 @@ class soma_validation_window_t:
mip_4_display
=
_ScaledVersion
(
mip
)
root
=
tknt
.
Tk
()
canvas_gfp
=
tknt
.
Canvas
(
root
,
width
=
gfp_mip
.
shape
[
1
],
height
=
gfp_mip
.
shape
[
0
])
tk_image_gfp
=
_TkImageFromNumpyArray
(
gfp_mip
,
root
)
_
=
canvas_gfp
.
create_image
(
0
,
0
,
anchor
=
"
nw
"
,
image
=
tk_image_gfp
)
canvas
=
tknt
.
Canvas
(
root
,
width
=
mip
.
shape
[
1
],
height
=
mip
.
shape
[
0
])
tk_image
=
_TkImageFromNumpyArray
(
mip_4_display
,
root
)
canvas_image
=
canvas
.
create_image
(
0
,
0
,
anchor
=
"
nw
"
,
image
=
tk_image
)
...
...
@@ -60,6 +72,7 @@ class soma_validation_window_t:
canvas
.
bind
(
"
<Motion>
"
,
self
.
_DisplayLabel
)
canvas
.
bind
(
"
<Button-1>
"
,
self
.
_DeleteSoma
)
canvas_gfp
.
grid
(
row
=
0
,
column
=
0
)
canvas
.
grid
(
row
=
0
,
column
=
1
)
cursor_nfo
.
grid
(
row
=
1
,
column
=
0
)
done_button
.
grid
(
row
=
1
,
column
=
1
)
...
...
This diff is collapsed.
Click to expand it.
nutrimorph.py
+
1
−
1
View file @
f1671d52
...
...
@@ -226,7 +226,7 @@ def NutriMorph(
if
with_plot
:
fb_
.
PlotSomas
(
somas
,
som_nfo
,
axes
)
elif
interactive
:
window
=
smvl
.
soma_validation_window_t
(
som_nfo
[
"
lmp
"
],
mip_axis
=
0
,
with_cm
=
"
viridis
"
)
window
=
smvl
.
soma_validation_window_t
(
image_for_soma
,
som_nfo
[
"
lmp
"
],
mip_axis
=
0
,
with_cm
=
"
viridis
"
)
n_somas
=
window
.
LaunchValidation
()
print
(
f
"
Validated Somas:
{
n_somas
}
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment