In [26]:
from tomokth.operators import io
In [5]:
%matplotlib inline
In [9]:
cd assignment/calibration_images/
In [3]:
arr = io.imread('0mm_cam0.tif')
In [4]:
print 'Image has been loaded as a 2d numpy array with ', arr.shape, 'rows and columns. Datatype =', arr.dtype
In [10]:
io.implot('0mm_cam0.tif')
In [11]:
cd ../particle_images/
One can also use different matplotlib colormaps while plotting the images as demonstrated below.
In [12]:
io.implot('TomoImg_cam0_a00001.tif', cmap='jet')
In [25]:
io.imsave('raw_image_data.txt', arr)
The text file would contain many zeroes and few non-zero integers indicating the intensities at each pixel
In [27]:
import scipy as sp
sparse_arr = sp.sparse.coo_matrix(arr)
print sparse_arr
In [ ]: