Commit f927924d authored by Saad Jbabdi's avatar Saad Jbabdi
Browse files

Cleanup+Paul's BigImageViewer

parent f462c104
#!/usr/bin/env python
#from PIL import Image
import matplotlib as mpl
# mpl.use('macosx')
mpl.use('wxagg')
from matplotlib.widgets import RectangleSelector, Slider
......@@ -22,8 +20,6 @@ import time
import tifffile as tif
from skimage import io as skio
#Image.MAX_IMAGE_PIXELS = None
# pilfered from https://stackoverflow.com/a/19306776
......@@ -195,24 +191,11 @@ def main():
# Read image
print("Reading input Image '{}' ...".format(image_name))
t0 = time.clock()
#im = Image.open(image_name)
im = skio.imread(image_name)
print(" ... this took {} seconds".format(time.clock()-t0))
image_base = op.basename(image_name)
# # Compare performances of readers
# t0 = time.clock()
# im = tif.imread(image_name)
# print(" ... tifffile took {} seconds".format(time.clock()-t0))
# t0 = time.clock()
# im = skio.imread(image_name)
# print(" ... skimage took {} seconds".format(time.clock()-t0))
# exit
# Resample image before showing it
print("Displaying ({} x {} pixels)...".format(*im.shape[:2]))
fig = plt.figure()
ax = fig.add_subplot(111)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment