From 4168da7334e4bc1d53284def79a63bf4824d13e0 Mon Sep 17 00:00:00 2001 From: s214735 <s214735@dtu.dk> Date: Thu, 9 Jan 2025 14:27:54 +0100 Subject: [PATCH] minor fixes --- qim3d/processing/_layers.py | 4 ++-- qim3d/viz/colormaps/_segmentation.py | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/qim3d/processing/_layers.py b/qim3d/processing/_layers.py index ced17394..d35e5078 100644 --- a/qim3d/processing/_layers.py +++ b/qim3d/processing/_layers.py @@ -12,7 +12,7 @@ def segment_layers(data:np.ndarray, inverted:bool = False, n_layers:int = 1, del data (np.ndarray): 2D or 3D array on which it will be computed inverted (bool): If True, it will invert the brightness of the image. Defaults to False n_layers (int): Determines amount of layers to look for (result in a layer and background). Defaults to 1. - delta (float): Patameter determining smoothness. Defaults to 1. + delta (float): Parameter determining smoothness. Defaults to 1. min_margin (int or None): Parameter for minimum margin. If more layers are wanted, a margin is necessary to avoid layers being identical. Defaults to None. max_margin (int or None): Parameter for maximum margin. If more layers are wanted, a margin is necessary to avoid layers being identical. Defaults to None. wrap (bool): If True, starting and ending point of the border between layers are at the same level. Defaults to False. @@ -91,7 +91,7 @@ def get_lines(segmentations:list|np.ndarray) -> list: segmentations (list of arrays): List of arrays where each array is 2D segmentation with only 2 classes. Returns: - segmentation_lines (list): List of 1D numpy arrays + segmentation_lines (list): List of 1D numpy arrays. """ segmentation_lines = [np.argmin(s, axis=0) - 0.5 for s in segmentations] return segmentation_lines \ No newline at end of file diff --git a/qim3d/viz/colormaps/_segmentation.py b/qim3d/viz/colormaps/_segmentation.py index e765e19b..1f9b0ff8 100644 --- a/qim3d/viz/colormaps/_segmentation.py +++ b/qim3d/viz/colormaps/_segmentation.py @@ -83,9 +83,6 @@ def segmentation( <<<<<<< HEAD color_map = qim3d.viz.colormaps.segmentation(num_labels, style = 'bright') qim3d.viz.slicer(labeled_volume, slice_axis = 1, color_map=color_map) -======= - cmap = qim3d.viz.colormaps.segmentation(num_labels, style = 'bright') - qim3d.viz.slicer(labeled_volume, slice_axis = 1, color_map=cmap) >>>>>>> c82fb8c (More changes) ```  -- GitLab