We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 67133c7 commit b157aaeCopy full SHA for b157aae
1 file changed
demo/demo.py
@@ -4,15 +4,26 @@
4
import javabridge
5
import bioformats
6
from bioformats import log4j
7
+import sys
8
9
javabridge.start_vm(class_path=bioformats.JARS,
10
run_headless=True)
11
try:
12
log4j.basic_config()
- image_path = os.path.join(os.path.dirname(bioformats.__file__), 'tests',
13
- 'Channel1-01-A-01.tif')
+ if len(sys.argv) < 2:
14
+ image_path = os.path.join(os.path.dirname(bioformats.__file__), 'tests',
15
+ 'Channel1-01-A-01.tif')
16
+ else:
17
+ image_path = sys.argv[1]
18
image, scale = bioformats.load_image(image_path, rescale=False,
19
wants_max_intensity=True)
- print image.shape
20
+ try:
21
+ import pylab
22
+
23
+ pylab.imshow(image)
24
+ pylab.gca().set_title(image_path)
25
+ pylab.show()
26
+ except:
27
+ print image.shape
28
finally:
29
javabridge.kill_vm()
0 commit comments