diff --git a/qim3d/viz/_cc.py b/qim3d/viz/_cc.py index ebb67d036c152a379832dbbc066660fe08adab2b..63731f2fdd420950f460eccde429397053f813fa 100644 --- a/qim3d/viz/_cc.py +++ b/qim3d/viz/_cc.py @@ -21,7 +21,7 @@ def plot_cc( Parameters: connected_components (CC): The connected components object. - component_indexs (list | tuple, optional): The components to plot. If None the first max_cc_to_plot=32 components will be plotted. Defaults to None. + component_indexs (list or tuple, optional): The components to plot. If None the first max_cc_to_plot=32 components will be plotted. Defaults to None. max_cc_to_plot (int, optional): The maximum number of connected components to plot. Defaults to 32. overlay (np.ndarray, optional): Overlay image. Defaults to None. crop (bool, optional): Whether to crop the image to the cc. Defaults to False. diff --git a/qim3d/viz/_data_exploration.py b/qim3d/viz/_data_exploration.py index a4e4623776e9fb97f5076f14a17de5a0309cb7f1..7cc75c2a8f13a1a7083d032b0e7d8ff85f3b865e 100644 --- a/qim3d/viz/_data_exploration.py +++ b/qim3d/viz/_data_exploration.py @@ -604,7 +604,7 @@ def chunks(zarr_path: str, **kwargs): Function to visualize chunks of a Zarr dataset using the specified visualization method. Args: - zarr_path (str): Path to the Zarr dataset. + zarr_path (str or os.PathLike): Path to the Zarr dataset. **kwargs (Any): Additional keyword arguments to pass to the visualization method. Example: diff --git a/qim3d/viz/_k3d.py b/qim3d/viz/_k3d.py index 382c220e6615865eeaa314dbde69a1711d6246c3..21626cf85fe5a57cb3d9954ef014fa4189c2577c 100644 --- a/qim3d/viz/_k3d.py +++ b/qim3d/viz/_k3d.py @@ -43,7 +43,7 @@ def volumetric( file will be saved. Defaults to False. grid_visible (bool, optional): If True, the grid is visible in the plot. Defaults to False. color_map (str or matplotlib.colors.Colormap or list, optional): The color map to be used for the volume rendering. If a string is passed, it should be a matplotlib colormap name. Defaults to None. - constant_opacity (bool, float): Set to True if doing an object label visualization with a corresponding color_map; otherwise, the plot may appear poorly. Defaults to False. + constant_opacity (float): Set to True if doing an object label visualization with a corresponding color_map; otherwise, the plot may appear poorly. Defaults to False. vmin (float, optional): Together with vmax defines the data range the colormap covers. By default colormap covers the full range. Defaults to None. vmax (float, optional): Together with vmin defines the data range the colormap covers. By default colormap covers the full range. Defaults to None samples (int, optional): The number of samples to be used for the volume rendering in k3d. Defaults to 512. diff --git a/qim3d/viz/_local_thickness.py b/qim3d/viz/_local_thickness.py index 243dc36066bd1fd99e307f04b6e94bf17abf7a25..0f63c64165c965c58db59df7aa0ff986c677f0e4 100644 --- a/qim3d/viz/_local_thickness.py +++ b/qim3d/viz/_local_thickness.py @@ -30,13 +30,13 @@ def local_thickness( number of slices and rounded to the nearest integer. If None, the middle slice will be used for 3D images. Unused for 2D images. Defaults to None. show (bool, optional): If True, displays the plot (i.e. calls plt.show()). Defaults to False. - figsize (Tuple[int, int], optional): The size of the figure. Defaults to (15, 5). + figsize (tuple, optional): The size of the figure. Defaults to (15, 5). Raises: ValueError: If the slice index is not an integer or a float between 0 and 1. Returns: - If the input is 3D, returns an interactive widget. Otherwise, returns a matplotlib figure. + local_thickness (widgets.interactive or plt.Figure): If the input is 3D, returns an interactive widget. Otherwise, returns a matplotlib figure. Example: ```python diff --git a/qim3d/viz/_structure_tensor.py b/qim3d/viz/_structure_tensor.py index 63d141c41ae9dd365e89a9d82c959d08173d76a6..a34640330e648bd5b785255b5a5234dee087f1e5 100644 --- a/qim3d/viz/_structure_tensor.py +++ b/qim3d/viz/_structure_tensor.py @@ -44,7 +44,7 @@ def vectors( be used. Defaults to None. grid_size (int, optional): The size of the grid. Defaults to 10. interactive (bool, optional): If True, returns an interactive widget. Defaults to True. - figsize (Tuple[int, int], optional): The size of the figure. Defaults to (15, 5). + figsize (tuple, optional): The size of the figure. Defaults to (15, 5). show (bool, optional): If True, displays the plot (i.e. calls plt.show()). Defaults to False. Raises: @@ -52,7 +52,7 @@ def vectors( ValueError: If the slice index is not an integer or a float between 0 and 1. Returns: - fig (Union[plt.Figure, widgets.interactive]): If `interactive` is True, returns an interactive widget. Otherwise, returns a matplotlib figure. + fig (widgets.interactive or plt.Figure): If `interactive` is True, returns an interactive widget. Otherwise, returns a matplotlib figure. Note: The orientation of the vectors is visualized using an HSV color map, where the saturation corresponds to the vector component diff --git a/qim3d/viz/itk_vtk_viewer/run.py b/qim3d/viz/itk_vtk_viewer/run.py index 8fa5e6b8edc85573ccbb78e19c7838c08a8d6d23..cd0d5721286fee8c78466615f35880555ebea465 100644 --- a/qim3d/viz/itk_vtk_viewer/run.py +++ b/qim3d/viz/itk_vtk_viewer/run.py @@ -89,7 +89,7 @@ def itk_vtk( is not installed, it raises a NotInstalledError. Args: - filename (str, optional): Path to the file or OME-Zarr store to be visualized. Trailing slashes in + filename (str or or.PathLike, optional): Path to the file or OME-Zarr store to be visualized. Trailing slashes in the path are normalized. Defaults to None. open_browser (bool, optional): If True, opens the visualization in a new browser tab. Defaults to True.