diff --git a/qim3d/filters/_common_filter_methods.py b/qim3d/filters/_common_filter_methods.py index cbd97ce4dc711622970acf859bd25a8aa3cafefb..8ead1ba294f88a7e70b173b5da0c4a50a39697fa 100644 --- a/qim3d/filters/_common_filter_methods.py +++ b/qim3d/filters/_common_filter_methods.py @@ -172,12 +172,12 @@ class Pipeline: ) self.filters[name] = fn - def append(self, fn: Type[FilterBase]): + def append(self, fn: FilterBase): """ Appends a filter to the end of the sequence. Args: - fn: An instance of a FilterBase subclass to be appended. + fn (FilterBase): An instance of a FilterBase subclass to be appended. Example: ```python diff --git a/qim3d/mesh/_common_mesh_methods.py b/qim3d/mesh/_common_mesh_methods.py index d8cc0789ad2cf269bcac07a200257a880868afca..5e42b4e9df936e8af39039e81301ba19e7a76814 100644 --- a/qim3d/mesh/_common_mesh_methods.py +++ b/qim3d/mesh/_common_mesh_methods.py @@ -21,11 +21,11 @@ def from_volume( level (float, optional): The threshold value for Marching Cubes. If None, Otsu's method is used. step_size (int, optional): The step size for the Marching Cubes algorithm. allow_degenerate (bool, optional): Whether to allow degenerate (i.e. zero-area) triangles in the end-result. If False, degenerate triangles are removed, at the cost of making the algorithm slower. Default False. - padding (tuple of int, optional): Padding to add around the volume. + padding (tuple of ints, optional): Padding to add around the volume. **kwargs: Additional keyword arguments to pass to `skimage.measure.marching_cubes`. Returns: - trimesh: The generated mesh. + trimesh.Trimesh: The generated mesh. Example: ```python diff --git a/qim3d/operations/_common_operations_methods.py b/qim3d/operations/_common_operations_methods.py index 449b2d534bd3605ca3a550fd2570502375167b65..17f6bd0e517d21a608eca8154fab200d5f2f982d 100644 --- a/qim3d/operations/_common_operations_methods.py +++ b/qim3d/operations/_common_operations_methods.py @@ -22,7 +22,7 @@ def remove_background( **median_kwargs (Any): Additional keyword arguments for the Median filter. Returns: - np.ndarray: The volume with background removed. + filtered_vol (np.ndarray): The volume with background removed. Example: @@ -76,7 +76,7 @@ def fade_mask( **kwargs (Any): Additional keyword arguments for the edge fading. Returns: - vol_faded (np.ndarray): The volume with edge fading applied. + faded_vol (np.ndarray): The volume with edge fading applied. Example: ```python diff --git a/qim3d/segmentation/_common_segmentation_methods.py b/qim3d/segmentation/_common_segmentation_methods.py index 979ab6fd863841ff8d95b999f9832f1ed6fa4ceb..6baff849b112504bef23936cf99111608b21ff3e 100644 --- a/qim3d/segmentation/_common_segmentation_methods.py +++ b/qim3d/segmentation/_common_segmentation_methods.py @@ -14,10 +14,8 @@ def watershed(bin_vol: np.ndarray, min_distance: int = 5) -> tuple[np.ndarray, i too close will be merged, affecting the number of segmented objects. Default is 5. Returns: - tuple[np.ndarray, int]: - - Labeled volume (np.ndarray): A 3D array of the same shape as the input `bin_vol`, where each segmented object - is assigned a unique integer label. - - num_labels (int): The total number of unique objects found in the labeled volume. + labeled_vol (np.ndarray): A 3D array of the same shape as the input `bin_vol`, where each segmented object is assigned a unique integer label. + num_labels (int): The total number of unique objects found in the labeled volume. Example: ```python diff --git a/qim3d/viz/_data_exploration.py b/qim3d/viz/_data_exploration.py index 8a16b19466f359ba8f0ec6062402a3093a42528d..a4e4623776e9fb97f5076f14a17de5a0309cb7f1 100644 --- a/qim3d/viz/_data_exploration.py +++ b/qim3d/viz/_data_exploration.py @@ -48,7 +48,7 @@ def slices_grid( Args: volume (np.ndarray): The 3D volume to be sliced. slice_axis (int, optional): Specifies the axis, or dimension, along which to slice. Defaults to 0. - slice_positions (str, int, list, optional): One or several slicing levels. If None, linearly spaced slices will be displayed. Defaults to None. + slice_positions (str or int or list, optional): One or several slicing levels. If None, linearly spaced slices will be displayed. Defaults to None. num_slices (int, optional): Defines how many slices the user wants to be displayed. Defaults to 15. max_columns (int, optional): The maximum number of columns to be plotted. Defaults to 5. color_map (str, optional): Specifies the color map for the image. Defaults to "viridis". diff --git a/qim3d/viz/_detection.py b/qim3d/viz/_detection.py index fa34eef1505c73f27ef7ecaf7da827dd0b6cd28f..2cf9bbbe13f581f7341b8f405df323195e17801e 100644 --- a/qim3d/viz/_detection.py +++ b/qim3d/viz/_detection.py @@ -15,9 +15,9 @@ def circles(blobs, vol, alpha=0.5, color="#ff9900", **kwargs): it defaults to the middle slice of the volume. Args: - blobs (array-like): An array-like object of blobs, where each blob is represented + blobs (tuple): An array-like object of blobs, where each blob is represented as a 4-tuple (p, r, c, radius). Usually the result of `qim3d.processing.blob_detection(vol)` - vol (array-like): The 3D volume on which to plot the blobs. + vol (np.ndarray): The 3D volume on which to plot the blobs. alpha (float, optional): The transparency of the blobs. Defaults to 0.5. color (str, optional): The color of the blobs. Defaults to "#ff9900". **kwargs (Any): Arbitrary keyword arguments for the `slices` function.