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

Method run

imagepy/menus/File/Samples ImageJ/ijsample_plgs.py:19–26  ·  view source on GitHub ↗
(self, para = None)

Source from the content-addressed store, hash-verified

17 def __call__(self): return self
18
19 def run(self, para = None):
20 try:
21 response = urlopen('http://imagej.net/images/'+self.name)
22 stream = StringIO(response.read())
23 img = imread(stream)
24 IPy.show_img([img], self.title)
25 except Exception as e:
26 IPy.write('Open url failed!\tErrof:%s'%sys.exc_info()[1])
27
28plgs = [IJImg(*i) for i in [('Leaf 36K', 'leaf.jpg'), ('Lena 68K', 'lena.jpg'), ('MRI Head 47K', 'mri.gif'),
29 ('AuPbSn 40 56K', 'AuPbSn40.jpg'), ('Blob 356K', 'blobs.gif'), ('Baboon 56K', 'baboon.jpg'),

Callers

nothing calls this directly

Calls 3

imreadFunction · 0.50
readMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected