MCPcopy Create free account
hub / github.com/Image-Py/imagepy / set_imgs

Method set_imgs

imagepy/core/wraper/imageplus.py:40–52  ·  view source on GitHub ↗
(self, imgs)

Source from the content-addressed store, hash-verified

38 self.title = ImageManager.name(title)
39
40 def set_imgs(self, imgs):
41 self.is3d = not isinstance(imgs, list)
42 self.scrchanged = True
43 self.snap = None
44 self.imgs = imgs
45 self.height, self.width = self.size = self.imgs[0].shape[:2]
46 self.imgtype = get_img_type(self.imgs)
47 self.channels = 1 if self.imgs[0].ndim==2 else self.imgs[0].shape[2]
48 self.dtype = self.imgs[0].dtype
49
50 if self.dtype == np.uint8:
51 self.range = (0, 255)
52 else: self.range = self.get_updown()
53
54 def get_updown(self):
55 arr = np.array(([(i.min(),i.max()) for i in self.imgs]))

Callers 12

__init__Method · 0.95
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
mouse_downMethod · 0.80
mouse_moveMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80

Calls 2

get_updownMethod · 0.95
get_img_typeFunction · 0.85

Tested by

no test coverage detected