diff --git a/docs/assets/screenshots/gui-annotation_tool.gif b/docs/assets/screenshots/gui-annotation_tool.gif new file mode 100644 index 0000000000000000000000000000000000000000..c106bcd09bbb0701bed2dbe127133c651f10b59a Binary files /dev/null and b/docs/assets/screenshots/gui-annotation_tool.gif differ diff --git a/docs/assets/screenshots/interactive_edge_fading.png b/docs/assets/screenshots/interactive_edge_fading.png deleted file mode 100644 index 443c2827ac1e0c05cd08ef80eed907343812e111..0000000000000000000000000000000000000000 Binary files a/docs/assets/screenshots/interactive_edge_fading.png and /dev/null differ diff --git a/docs/assets/screenshots/viz-fade_mask.gif b/docs/assets/screenshots/viz-fade_mask.gif new file mode 100644 index 0000000000000000000000000000000000000000..3ef2aba7b79af9306c1917a75d92d6cd3474d6ff Binary files /dev/null and b/docs/assets/screenshots/viz-fade_mask.gif differ diff --git a/docs/processing.md b/docs/processing.md index 8ecbce5063504f25ce132d8972f45b6021652cad..ab737cb3ff984210f03ee249f18b87622a7a9495 100644 --- a/docs/processing.md +++ b/docs/processing.md @@ -17,3 +17,4 @@ Here, we provide functionalities designed specifically for 3D image analysis and - remove_background - watershed - edge_fade + - fade_mask diff --git a/docs/releases.md b/docs/releases.md index 50372a1de82bd8730db03743793883544172125a..b6e158634f9908fc2901e353a8b4d83580b0beea 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -9,9 +9,17 @@ As the library is still in its early development stages, **there may be breaking And remember to keep your pip installation [up to date](/qim3d/#upgrade) so that you have the latest features! +### v0.3.6 (30/05/2024) +- Refactoring for performance improvement +- Welcome message for the CLI +- Introduction of `qim3d.processing.fade_mask` 🎉 + + ### v0.3.5 (27/05/2024) - Added runtime and memory usage in the documentation - Introduction of `qim3d.utils.generate_volume` 🎉 +- Introduction of `preview` CLI 🎉 + ### v0.3.4 (22/05/2024) - Documentation for `qim3d.viz.plot_cc` diff --git a/docs/viz.md b/docs/viz.md index e0ea9f1d5a64a2456ad4f740f857350ee72d0936..691d31b496d472bd1725300f59ab7019d3155e4f 100644 --- a/docs/viz.md +++ b/docs/viz.md @@ -12,7 +12,7 @@ The `qim3d` library aims to provide easy ways to explore and get insights from v - vectors - plot_cc - colormaps - - interactive_edge_fade + - interactive_fade_mask ::: qim3d.viz.colormaps options: diff --git a/qim3d/gui/annotation_tool.py b/qim3d/gui/annotation_tool.py index 571f53cce62630d280935f4086f210fe972af7ca..da66452814755d3af254a076b4c40063f4a66321 100644 --- a/qim3d/gui/annotation_tool.py +++ b/qim3d/gui/annotation_tool.py @@ -10,9 +10,14 @@ Or launched from a python script ```python import qim3d -app = qim3d.gui.annotation_tool.Interface() -app.launch() +vol = qim3d.examples.NT_128x128x128 +annotation_tool = qim3d.gui.annotation_tool.Interface() + +# We can directly pass the image we loaded to the interface +app = annotation_tool.launch(vol[0]) ``` + + """ import getpass diff --git a/qim3d/viz/img.py b/qim3d/viz/img.py index 53f6fe7dea0b83dfd39f843c612ce1507f830aab..24980b5c6ab872652ce8ad04d89a84e3c9449314 100644 --- a/qim3d/viz/img.py +++ b/qim3d/viz/img.py @@ -562,19 +562,19 @@ def vol_masked(vol, vol_mask, viz_delta=128): def interactive_fade_mask(vol: np.ndarray, axis: int = 0): """ Interactive widget for visualizing the effect of edge fading on a 3D volume. + This can be used to select the best parameters before applying the mask. + Args: vol (np.ndarray): The volume to apply edge fading to. axis (int, optional): The axis along which to apply the fading. Defaults to 0. - Returns: - np.ndarray: The volume with edge fading applied. - Example: ```python import qim3d - qim3d.viz.img.interactive_edge_fade(vol, geometric='cylindrical', axis=0) + vol = qim3d.examples.cement_128x128x128 + qim3d.viz.interactive_fade_mask(vol) ``` -  +  """