Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 658a41a1 authored by NADAL Morgane's avatar NADAL Morgane
Browse files

tests frangi time and memory usage + frangi prms

parent d5cb64d0
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,8 @@ import multiprocessing as pl_
import os.path as ph_ # Pathlib not necessary
import warnings as wn_
from os import name as os_name_c
import os as os_
import psutil as mu_
from typing import Callable, Optional, Tuple
# import itk as ik_
......
......@@ -53,6 +53,7 @@ import brick.processing.graph_extraction as ge_
import os as os_
import sys as sy_
import time as tm_
import psutil as mu_
import matplotlib.pyplot as pl_
import numpy as np_
......@@ -118,7 +119,7 @@ image = in_.ImageVerification(image, channel)
# iv_.image_verification(image, channel) # -> PySide2 user interface # TODO: must return the modified image!
# /!\ 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
#
......@@ -186,6 +187,7 @@ beta = in_.ToPixel(beta, size_voxel_in_micron, decimals=1)
frangi_c = in_.ToPixel(frangi_c, size_voxel_in_micron)
# Perform frangi feature enhancement (via python or c - faster - implementation)
enhanced_ext, ext_scales = extension_t.EnhancedForDetection(
image_for_ext,
scale_range,
......@@ -198,7 +200,7 @@ enhanced_ext, ext_scales = extension_t.EnhancedForDetection(
in_parallel=in_parallel)
elapsed_time = tm_.gmtime(tm_.time() - start_time)
print(f"\nElapsed 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
ext_nfo["coarse_map"] = extension_t.CoarseMap(enhanced_ext, ext_low_c, ext_high_c, ext_selem_pixel_c)
......
......@@ -80,9 +80,8 @@ max_straight_sq_dist_c : 0.24050024 * (30 ** 2)
max_weighted_length_c : 0.24050024 * 20.0
[Frangi]
scale_range : 0.024,1,466
#0.745
# 0.1,3.1
scale_range : 0.024,1.466
# 0.1,6.1 for the entire image. stop at 3.1 for smaller images
; write min,max scale range
scale_step : 0.24
# 1.0
......@@ -90,10 +89,7 @@ alpha : 0.19
# 0.8
beta : 0.12
# 0.5
frangi_c : 0.5
; 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
frangi_c : 3
# 60.12506 # 500.0
bright_on_dark : True
method : c
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment