Skip to content
Snippets Groups Projects
Commit c7a34b68 authored by s214735's avatar s214735
Browse files

more fixes

parent 8968d7ca
Branches
No related tags found
No related merge requests found
...@@ -175,12 +175,12 @@ class Pipeline: ...@@ -175,12 +175,12 @@ class Pipeline:
) )
self.filters[name] = fn self.filters[name] = fn
def append(self, fn: Type[FilterBase]): def append(self, fn: FilterBase):
""" """
Appends a filter to the end of the sequence. Appends a filter to the end of the sequence.
Args: Args:
fn: An instance of a FilterBase subclass to be appended. fn (FilterBase): An instance of a FilterBase subclass to be appended.
Example: Example:
```python ```python
......
...@@ -21,11 +21,11 @@ def from_volume( ...@@ -21,11 +21,11 @@ def from_volume(
level (float, optional): The threshold value for Marching Cubes. If None, Otsu's method is used. 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. 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. 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`. **kwargs: Additional keyword arguments to pass to `skimage.measure.marching_cubes`.
Returns: Returns:
trimesh: The generated mesh. trimesh.Trimesh: The generated mesh.
Example: Example:
```python ```python
......
...@@ -22,7 +22,7 @@ def remove_background( ...@@ -22,7 +22,7 @@ def remove_background(
**median_kwargs (Any): Additional keyword arguments for the Median filter. **median_kwargs (Any): Additional keyword arguments for the Median filter.
Returns: Returns:
np.ndarray: The volume with background removed. filtered_vol (np.ndarray): The volume with background removed.
Example: Example:
...@@ -76,7 +76,7 @@ def fade_mask( ...@@ -76,7 +76,7 @@ def fade_mask(
**kwargs (Any): Additional keyword arguments for the edge fading. **kwargs (Any): Additional keyword arguments for the edge fading.
Returns: Returns:
vol_faded (np.ndarray): The volume with edge fading applied. faded_vol (np.ndarray): The volume with edge fading applied.
Example: Example:
```python ```python
......
...@@ -14,10 +14,8 @@ def watershed(bin_vol: np.ndarray, min_distance: int = 5) -> tuple[np.ndarray, i ...@@ -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. too close will be merged, affecting the number of segmented objects. Default is 5.
Returns: Returns:
tuple[np.ndarray, int]: 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.
- Labeled volume (np.ndarray): A 3D array of the same shape as the input `bin_vol`, where each segmented object num_labels (int): The total number of unique objects found in the labeled volume.
is assigned a unique integer label.
- num_labels (int): The total number of unique objects found in the labeled volume.
Example: Example:
```python ```python
......
...@@ -50,7 +50,7 @@ def slices_grid( ...@@ -50,7 +50,7 @@ def slices_grid(
Args: Args:
volume (np.ndarray): The 3D volume to be sliced. 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_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. 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. 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". color_map (str, optional): Specifies the color map for the image. Defaults to "viridis".
......
...@@ -15,9 +15,9 @@ def circles(blobs: tuple[float,float,float,float], vol: np.ndarray, alpha: float ...@@ -15,9 +15,9 @@ def circles(blobs: tuple[float,float,float,float], vol: np.ndarray, alpha: float
it defaults to the middle slice of the volume. it defaults to the middle slice of the volume.
Args: 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)` 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. alpha (float, optional): The transparency of the blobs. Defaults to 0.5.
color (str, optional): The color of the blobs. Defaults to "#ff9900". color (str, optional): The color of the blobs. Defaults to "#ff9900".
**kwargs (Any): Arbitrary keyword arguments for the `slices` function. **kwargs (Any): Arbitrary keyword arguments for the `slices` function.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment