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

more fixes

parent 33ce2344
No related branches found
No related tags found
1 merge request!144Docstrings
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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".
......
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment