Skip to content
Snippets Groups Projects

Implemented 3D connected components as wrapper class for scipy.ndimage.label

2 files
+ 36
16
Compare changes
  • Side-by-side
  • Inline

Files

+ 1
1
@@ -40,7 +40,7 @@ class CC:
@@ -40,7 +40,7 @@ class CC:
"""
"""
if index is None:
if index is None:
volume = self._connected_components
volume = self._connected_components
if index == "random":
elif index == "random":
index = np.random.randint(1, self.cc_count + 1)
index = np.random.randint(1, self.cc_count + 1)
volume = self._connected_components == index
volume = self._connected_components == index
else:
else:
Loading