<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Reading images into array
Step1:  Plotting images
Step2:  One can also use different matplotlib colormaps while plotting the images as demonstrated below.
Step3:  Saving arrays as text files/images
Step4:  The text file would contain many zeroes and few non-zero integers indicating the intensities at each pixel
<ASSISTANT_TASK:>
Python Code:
arr = io.imread('0mm_cam0.tif')
print 'Image has been loaded as a 2d numpy array with ', arr.shape, 'rows and columns. Datatype =', arr.dtype
Explanation: Reading images into array
End of explanation
io.implot('0mm_cam0.tif')
cd ../particle_images/
Explanation: Plotting images
End of explanation
io.implot('TomoImg_cam0_a00001.tif', cmap='jet')
Explanation: One can also use different matplotlib colormaps while plotting the images as demonstrated below.
End of explanation
io.imsave('raw_image_data.txt', arr)
Explanation: Saving arrays as text files/images
End of explanation
import scipy as sp
sparse_arr = sp.sparse.coo_matrix(arr)
print sparse_arr
Explanation: The text file would contain many zeroes and few non-zero integers indicating the intensities at each pixel
End of explanation
<END_TASK>