Skip to content
Snippets Groups Projects

3d removal of background

Merged s204159 requested to merge 3d_removal into main
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
+ 2
2
@@ -223,12 +223,12 @@ def tophat(vol, **kwargs):
Remove background from the volume
Args:
vol: The volume to remove background from
radius: The radius of the structuring element (default: 1)
radius: The radius of the structuring element (default: 3)
background: color of the background, 'dark' or 'bright' (default: 'dark'). If 'bright', volume will be inverted.
Returns:
vol: The volume with background removed
"""
radius = kwargs["radius"] if "radius" in kwargs else 1
radius = kwargs["radius"] if "radius" in kwargs else 3
background = kwargs["background"] if "background" in kwargs else "dark"
if background == "bright":
Loading