In [2]:
import numpy as np
import scipy
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import matplotlib as mpl
from skimage import data, io, filters
from skimage.morphology import disk
%matplotlib inline
Limitation of scipy.ndimage and matplotlib.image¶
Using imread() from either scipy.ndimage or maptplotlib.image results in importing only the first image of a tif (multichannel) time sequence.
In [3]:
im=scipy.ndimage.imread("/home/dati/GBM_persson/data/15.02.05_cal-GBM5-pBJclop/ph633/1_20_40.tif")
print(im.ndim, im.shape, 'max = ', im.max())
plt.imshow(im)
Out[3]:
In [4]:
im=mpl.image.imread("/home/dati/GBM_persson/data/15.02.05_cal-GBM5-pBJclop/ph633/1_20_40.tif")
print(im.ndim, im.shape, 'max = ', im.max())
plt.imshow(im)
Out[4]:
scikit-image¶
In [5]:
im = io.imread("/home/dati/GBM_persson/data/15.02.05_cal-GBM5-pBJclop/ph633/1_20_40.tif")
print(im.ndim, im.shape, 'max = ', im.max())
plt.imshow(im[0])
Out[5]:
This post was written entirely in the IPython notebook. You can download this notebook.