tferr / Scripts

:microscope::cocktail: Home of the ImageJ BAR: A collection of Broadly Applicable Routines for ImageJ
https://imagej.net/BAR
GNU General Public License v3.0
24 stars 18 forks source link

Profile multiple channels in the same plot #6

Closed tferr closed 9 years ago

tferr commented 9 years ago

Extending Analyze>Plot Profile to multiple channels (for situations where the "Live option" is not satisfactory) seems to be a rather popular request. Something like extending the RGBProfilesTool to composite images.

There are probably dozens of implementations out there already like the ones here or here. Fiji's Scripting Examples also feature several templates for this. But Jerome Mutterer assembled the neatest one: simple, short, efficient with auto-detection of LUTs that works great.

@mutterer would you be OK if we include your gist in the BAR repository?

mutterer commented 9 years ago

Hi @tferr ! Thanks for enhancing this macro. I've written this several times myself, that's why I ended saving it as a gist. You're very welcome to include it in the useful BAR repository. Thank you!

tferr commented 9 years ago

Hi @mutterer Thanks a lot! In the end, I realized that it had to feature a live view, so I opted for a BeanShell implementation.

It guesses LUTs (using @rasband getChannelColor) and respects the active channels checkboxes in the Channels widget, for toggling profiles in real-time. The only really I regret I have is that the script is no longer as succinct as your macro was but the extra features make it worth it.

Anyway, your idea of using bit-twiddling to detect LUTs was so inspiring I had to add you the contributors list. I'll definitely keep an eye on your gists and will try harder to use them in future BARs. Thanks again!