In [ ]:
import tiffIO as tIO
import mouseVis as mv
import matplotlib.pyplot as plt
import numpy as np
import cv2
%matplotlib notebook
data = tIO.unzipChannels(tIO.loadTiff('SEP-GluA1-KI_tp1.tif'))
data2 = tIO.unzipChannels(tIO.loadTiff('SEP-GluA1-KI_tp2.tif'))
data3 = tIO.unzipChannels(tIO.loadTiff('SEP-GluA1-KI_tp3.tif'))
In [ ]:
mv.generateMultiVoxHist([data[0], data2[0], data3[0]], 'Intensity of Voxels on Chan 0 at Times 0, .25, and 24 Hours', bins=50, normed=True, xTitle='Pixel Integer Intensity', yTitle='Ratio of Image Space')
plt.show()
In [8]:
mv.generateMultiVoxHist([data[1], data2[1], data3[1]], 'Intensity of Voxels on Chan 1 at Times 0, .25, and 24 Hours', bins=50, normed=True, xTitle='Pixel Integer Intensity', yTitle='Ratio of Image Space')
plt.show()
In [14]:
testImg = data[0][0]
threshedImage = data[0][0].copy(0)
for rowInd in xrange(testImg.shape[0]):
for colInd in xrange(testImg.shape[1]):
if testImg[rowInd][colInd] < 21000:
threshedImage[rowInd][colInd] = 0
#For some reason, this is coming up as
#colored and not black and white through matplotlib
plt.figure()
plt.imshow(testImg)
plt.figure()
plt.imshow(threshedImage)
plt.show()
In [3]:
plt.figure()
mv.generateMultiVoxHist([data[0][0], data2[0][0], data3[0][0]], 'Intensity for Image 0 on Chan 0', 3, 50, normed=True, xTitle='Pixel Integer Intensity', yTitle='Percent of Image Area')
plt.show()
In [ ]: