Launch the Jupyter-notebook extension from Imaris
... then work in your web browser localhost:8888 (or whichever port is indicated in the command window).
In [1]:
%reload_ext XTIPython
In [2]:
#This is to use matplotlib inside jupyter-notebook:
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
#This gets the Green / Red data from Imaris:
Green = BridgeLib.GetDataVolume(vDataSet,0,0) #Channel 0, timepoint 0
Red = BridgeLib.GetDataVolume(vDataSet,1,0) #Channel 1, timepoint 0
print "Green shape:",Green.shape,"min-max:",np.min(Green),np.max(Green),"type:",Green.dtype
print "Red shape:",Red.shape,"min-max:",np.min(Red),np.max(Red),"type:",Red.dtype
#This computes the max projection:
GreenMax = np.max(Green,axis=0); RedMax = np.max(Red,axis=0);
#This displays the Green and Red projections side by side:
fig, axs = plt.subplots(1,2, figsize=(10,20))
axs[0].set_title("Green"); axs[1].set_title("Red");
im1 = axs[0].imshow(GreenMax,cmap="gray"); im2 = axs[1].imshow(RedMax,cmap="gray")