Forked from mutterer/multichannel_profile_plot.ijm
Last active
August 29, 2015 14:09
-
-
Save tferr/863b630d7da2dbcdbed0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// yet another multichannel profile plotter | |
// with smart(?) lookuptables | |
Stack.getDimensions(w, h, c, z, t); | |
p = getProfile(); | |
getStatistics(null, null, min, max); | |
Plot.create("Multi-Channel Profile Plot", "Distance (pixels)", "Value"); | |
Plot.setLimits(0,p.length,min,max); | |
for (i=1;i<=c;i++) { | |
Stack.setChannel(i); | |
p = getProfile(); | |
Plot.setColor(getLutColorName()); | |
Plot.add("line", p); | |
} | |
Plot.show(); | |
function getLutColorName() { | |
colors = newArray("black","blue","green", "cyan", "red", "magenta", "yellow", "black"); | |
getLut(reds, greens, blues); | |
col = round(reds[255]/200)<<2+round(greens[255]/200)<<1+round(blues[255]/200); | |
return colors[col]; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment