Mentions légales du service

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

cleaning

parent f0c8c483
No related branches found
No related tags found
No related merge requests found
......@@ -192,7 +192,6 @@ class extension_t(glial_cmp_t):
result = image.copy()
if (low is not None) and (high is not None):
result = __HysterisisImage__(result, low, high)
# np_.save("D:\\MorganeNadal\\img512enhanced_norm_hyst_2.npy", result)
if selem is not None:
result = __MorphologicalCleaning__(result, selem)
......
......@@ -126,17 +126,15 @@ 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[:, 512:, 512:] # 512 # 562 # Just for development
# image = image[:, 512:, 512:] # 512 # 562 # Just for development
img_shape = image.shape
# np_.save("D:\\MorganeNadal\\img512.npy", image)
#
print(f"IMAGE: s.{img_shape} t.{image.dtype} m.{image.min()} M.{image.max()}")
# Intensity relative normalization (between 0 and 1).
image_for_soma = in_.IntensityNormalizedImage(image)
image_for_ext = in_.IntensityNormalizedImage(image)
# np_.save("D:\\MorganeNadal\\img512norm.npy", image_for_ext)
print(f"NRM-IMG: t.{image_for_soma.dtype} m.{image_for_soma.min():.2f} M.{image_for_soma.max():.2f}")
......@@ -213,13 +211,10 @@ enhanced_ext, ext_scales = extension_t.EnhancedForDetection(
method,
in_parallel=in_parallel)
# np_.save("D:\\MorganeNadal\\img512enhanced.npy", enhanced_ext)
elapsed_time = tm_.gmtime(tm_.time() - start_time)
print(f"Elapsed Time={tm_.strftime('%Hh %Mm %Ss', elapsed_time)}\n")
enhanced_ext = in_.IntensityNormalizedImage(enhanced_ext)
# np_.save("D:\\MorganeNadal\\img512enhanced_norm.npy", enhanced_ext)
# Creation of the enhanced maps
ext_nfo["coarse_map"] = extension_t.CoarseMap(enhanced_ext, ext_low_c, ext_high_c, ext_selem_pixel_c) # seuillage
......@@ -231,8 +226,6 @@ ext_nfo["lmp"], n_extensions = ms_.label(ext_nfo["map"], return_num=True)
# ext_nfo["lmp"] = relabel_sequential(ext_lmp)[0]
# n_extensions = ext_nfo["lmp"].max()
# np_.save("D:\\MorganeNadal\\img512enhanced_norm_hyst_morpho_2.npy", ext_nfo["lmp"])
extensions = tuple(
extension_t().FromMap(ext_nfo["lmp"], ext_scales, uid)
for uid in range(1, n_extensions + 1))
......@@ -372,8 +365,6 @@ print(f"\nElapsed Time={tm_.strftime('%Hh %Mm %Ss', elapsed_time)}")
if with_plot:
pl_.show()
# np_.save("D:\\MorganeNadal\\img512final_2.npy", som_nfo['soma_w_ext_lmp'])
po_.MaximumIntensityProjectionZ(som_nfo['soma_w_ext_lmp'])
# --- Extract all the extensions of all somas as a graph
......@@ -423,7 +414,7 @@ bins_curvature[-1] = np_.inf
# DF creation
features_df = ge_.ExtractFeaturesInDF(somas, size_voxel_in_micron, bins_length, bins_curvature, ext_scales)
features_df.to_csv("D:\\MorganeNadal\\M2 report\\features_512_.csv")
features_df.to_csv("...\\features.csv")
#
elapsed_time = tm_.gmtime(tm_.time() - start_time)
......
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