示例#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)
示例#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)
示例#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)
示例#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)
示例#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)
示例#6
0
 def image_cln(self: 'array_float'):
     return np.array(self.a, dtype=float)
示例#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)