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

Method run

imagepy/menus/Image/Adjust/histogram_plgs.py:72–89  ·  view source on GitHub ↗
(self, ips, imgs, para = None)

Source from the content-addressed store, hash-verified

70 return True
71
72 def run(self, ips, imgs, para = None):
73 ips1 = ImageManager.get(para['img1'])
74 ips2 = ImageManager.get(para['img2'])
75 ips2.snapshot()
76
77 img = ips1.img
78 imgs = ips2.imgs
79
80 sl1, sl2 = ips1.get_nslices(), ips2.get_nslices()
81 cn1, cn2 = ips1.get_nchannels(), ips2.get_nchannels()
82 if not(ips1.img.dtype == np.uint8 and ips2.img.dtype == np.uint8):
83 IPy.alert('Two image must be type of 8-bit or rgb!')
84 return
85
86 for i in range(sl2):
87 self.progress(i, sl2)
88 match(img, imgs[i])
89 ips2.update()
90
91plgs = [Normalize, Match]

Callers

nothing calls this directly

Calls 7

matchFunction · 0.85
get_nslicesMethod · 0.80
get_nchannelsMethod · 0.80
getMethod · 0.45
snapshotMethod · 0.45
progressMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected