Example #1
0
 def __init__(self, image=[[0.0]], min_size=64, **options):
     from skimage import morphology
     import numpy as np
     self.a = np.array(image, dtype=bool)
     for sl1 in range(self.a.shape[2]):
         self.a[:, :, sl1] = morphology.remove_small_objects(
             self.a[:, :, sl1], min_size, **options)
Example #2
0
 def __init__(self, image=[[0.0]], area_threshold=64, **options):
     from skimage import morphology
     import numpy as np
     self.a = np.array(image, dtype=bool)
     for sl1 in range(self.a.shape[2]):
         self.a[:, :, sl1] = morphology.remove_small_holes(
             self.a[:, :, sl1],
             area_threshold,
             connectivity=connectivity,
             in_place=in_place)
Example #3
0
 def __init__(self, image=[[0.0]], **options):
     from skimage.morphology import black_tophat
     import numpy as np
     self.bt = black_tophat(np.array(image), **options)
Example #4
0
 def __init__(self, image=[[0.0]], **options):
     from skimage.morphology import dilation
     import numpy as np
     self.dilated = dilation(np.array(image), **options)
Example #5
0
 def __init__(self, image=[[0.0]], **options):
     from skimage.morphology import erosion
     import numpy as np
     self.eroded = erosion(np.array(image), **options)
Example #6
0
 def image_cln(self: 'array_float'):
     return np.array(self.a, dtype=float)
Example #7
0
 def __init__(self, image=[[0.0]], **options):
     from skimage.morphology import closing
     import numpy as np
     self.cl = closing(np.array(image), **options)