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
658a41a1
Commit
658a41a1
authored
4 years ago
by
NADAL Morgane
Browse files
Options
Downloads
Patches
Plain Diff
tests frangi time and memory usage + frangi prms
parent
d5cb64d0
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
brick/processing/frangi3.py
+2
-0
2 additions, 0 deletions
brick/processing/frangi3.py
nutrimorph.py
+4
-2
4 additions, 2 deletions
nutrimorph.py
parameters.ini
+3
-7
3 additions, 7 deletions
parameters.ini
with
9 additions
and
9 deletions
brick/processing/frangi3.py
+
2
−
0
View file @
658a41a1
...
@@ -38,6 +38,8 @@ import multiprocessing as pl_
...
@@ -38,6 +38,8 @@ import multiprocessing as pl_
import
os.path
as
ph_
# Pathlib not necessary
import
os.path
as
ph_
# Pathlib not necessary
import
warnings
as
wn_
import
warnings
as
wn_
from
os
import
name
as
os_name_c
from
os
import
name
as
os_name_c
import
os
as
os_
import
psutil
as
mu_
from
typing
import
Callable
,
Optional
,
Tuple
from
typing
import
Callable
,
Optional
,
Tuple
# import itk as ik_
# import itk as ik_
...
...
This diff is collapsed.
Click to expand it.
nutrimorph.py
+
4
−
2
View file @
658a41a1
...
@@ -53,6 +53,7 @@ import brick.processing.graph_extraction as ge_
...
@@ -53,6 +53,7 @@ import brick.processing.graph_extraction as ge_
import
os
as
os_
import
os
as
os_
import
sys
as
sy_
import
sys
as
sy_
import
time
as
tm_
import
time
as
tm_
import
psutil
as
mu_
import
matplotlib.pyplot
as
pl_
import
matplotlib.pyplot
as
pl_
import
numpy
as
np_
import
numpy
as
np_
...
@@ -118,7 +119,7 @@ image = in_.ImageVerification(image, channel)
...
@@ -118,7 +119,7 @@ image = in_.ImageVerification(image, channel)
# iv_.image_verification(image, channel) # -> PySide2 user interface # TODO: must return the modified image!
# iv_.image_verification(image, channel) # -> PySide2 user interface # TODO: must return the modified image!
# /!\ conflicts between some versions of PySide2 and Python3
# /!\ conflicts between some versions of PySide2 and Python3
#
image = image[:,
800:, 800
:] # 512 # 562 # Just for development
image
=
image
[:,
512
:,
512
:]
# 512 # 562 # Just for development
img_shape
=
image
.
shape
img_shape
=
image
.
shape
#
#
...
@@ -186,6 +187,7 @@ beta = in_.ToPixel(beta, size_voxel_in_micron, decimals=1)
...
@@ -186,6 +187,7 @@ beta = in_.ToPixel(beta, size_voxel_in_micron, decimals=1)
frangi_c
=
in_
.
ToPixel
(
frangi_c
,
size_voxel_in_micron
)
frangi_c
=
in_
.
ToPixel
(
frangi_c
,
size_voxel_in_micron
)
# Perform frangi feature enhancement (via python or c - faster - implementation)
# Perform frangi feature enhancement (via python or c - faster - implementation)
enhanced_ext
,
ext_scales
=
extension_t
.
EnhancedForDetection
(
enhanced_ext
,
ext_scales
=
extension_t
.
EnhancedForDetection
(
image_for_ext
,
image_for_ext
,
scale_range
,
scale_range
,
...
@@ -198,7 +200,7 @@ enhanced_ext, ext_scales = extension_t.EnhancedForDetection(
...
@@ -198,7 +200,7 @@ enhanced_ext, ext_scales = extension_t.EnhancedForDetection(
in_parallel
=
in_parallel
)
in_parallel
=
in_parallel
)
elapsed_time
=
tm_
.
gmtime
(
tm_
.
time
()
-
start_time
)
elapsed_time
=
tm_
.
gmtime
(
tm_
.
time
()
-
start_time
)
print
(
f
"
\n
Elapsed Time=
{
tm_
.
strftime
(
'
%Hh %Mm %Ss
'
,
elapsed_time
)
}
"
)
print
(
f
"
Elapsed Time=
{
tm_
.
strftime
(
'
%Hh %Mm %Ss
'
,
elapsed_time
)
}
\n
"
)
# Creation of the enhanced maps
# Creation of the enhanced maps
ext_nfo
[
"
coarse_map
"
]
=
extension_t
.
CoarseMap
(
enhanced_ext
,
ext_low_c
,
ext_high_c
,
ext_selem_pixel_c
)
ext_nfo
[
"
coarse_map
"
]
=
extension_t
.
CoarseMap
(
enhanced_ext
,
ext_low_c
,
ext_high_c
,
ext_selem_pixel_c
)
...
...
This diff is collapsed.
Click to expand it.
parameters.ini
+
3
−
7
View file @
658a41a1
...
@@ -80,9 +80,8 @@ max_straight_sq_dist_c : 0.24050024 * (30 ** 2)
...
@@ -80,9 +80,8 @@ max_straight_sq_dist_c : 0.24050024 * (30 ** 2)
max_weighted_length_c
:
0.24050024
*
20.0
max_weighted_length_c
:
0.24050024
*
20.0
[Frangi]
[Frangi]
scale_range
:
0.024,1,466
scale_range
:
0.024,1.466
#0.745
# 0.1,6.1 for the entire image. stop at 3.1 for smaller images
# 0.1,3.1
; write min,max scale range
; write min,max scale range
scale_step
:
0.24
scale_step
:
0.24
# 1.0
# 1.0
...
@@ -90,10 +89,7 @@ alpha : 0.19
...
@@ -90,10 +89,7 @@ alpha : 0.19
# 0.8
# 0.8
beta
:
0.12
beta
:
0.12
# 0.5
# 0.5
frangi_c
:
0.5
frangi_c
:
3
; For an image ranging from 0 to 65280 : frangi_c btw 0 and 1.
; For an image from 200 to 65280 : frangi_c btw 1 and 10
; highly depends on the size of the extensions in the image and on their intensity
# 60.12506 # 500.0
# 60.12506 # 500.0
bright_on_dark
:
True
bright_on_dark
:
True
method
:
c
method
:
c
...
...
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