New visualization toolset

Dear all,

I’m glad to present you my toolset focused on visualization and handling of stacks and hyperstacks :
Visualization_toolset.ijm (29.6 KB)

Future uptades will be released on GitHub.

It is based on my own basic needs in the lab, prior to any analysis :
With all new confocal images, give them nice color LUTs, adjust the contrasts, visualize all channels
and save them all as they are in a specific directory.

I hope that some will find this tool useful and I look forward to your feedback!

This toolset provides tools for single images :

  • Set image LUTs : (up to 5)

    • A dialog let you select LUTs for each channels and then apply them to your multichannel image.

  • Auto-contrast Adjustment :

    • Especially usefull for stacks (but not restricted to), this macro resets the min and max based on the entire stack so you can navigate through slices without signal saturation.
  • Splitview :

    • For multichannel visualization, Splitview creates a RGB montage of composite and splited channels.
      Grayscale splitview creates a linear montage with colored overlay and grey channels.
      You can still navigate through slices or frames.

  • Tools for all opended images :

    • Set all LUTs :
      applies the chosen LUTs to all opened images.

    • Reset all contrasts :
      Adjust the contrast to all channels of all opened images.

    • Maximum Z project all :
      Will run a maximal intensity projection on all opended stacks, close the stacks and run “Tile” to see all windows.
      Can be handy to get a quick overview of hyperstacks content.

    • Save all :
      Saves all opened images as Tiff in a specified directory.

  • The must-have macro shortcut : (from Nick George)

    • [Q] easy switch between Color and Composite mode on multichannel images
  • A collection of keyboard shortcuts for tools and additionnal shortcuts for what I think are frequently used commands when handling stacks or hyperstacks:

    Macro shortcut :

    • [A] Enhance Contrast, saturated=0.3 : almost same as “Auto” button in Brightness tool
    • [r] Auto-contrast on active channel of selected image
    • [R] Auto-contrast on all channels of selected image
    • [S] Colored splitview tool
    • [p] Grayscale splitview
  • Numerical keys shortcuts for basic LUTs:

    • [n1] Grays
    • [n2] Green
    • [n3] Red
    • [n4] Cyan
    • [n5] Magenta
    • [n6] yellow
  • Frequently used commands :

    • [E] Tile : reorder windows to see all
    • [y] Open the usefull tool ‘synchronize windows’
    • [q] Arrange channels order
    • [d] Split Channels
    • [M] Merge channels
    • [D] Duplicate (complete image or selection)
    • [g] Z projection dialog
    • [G] run a maximal intensity projection
    • [T] Save as Tiff
  • Installation :

    • Place the Visualization_toolset.ijm file in the toolset directory of your ImageJ or Fiji application.
    • Find the toolset in the toolset menu of imageJ bar ( [>>] button).

Finally, I wrote the Visualization_Toolset.ijm file in the most readable way possible (I did my best) in order to be easily customized or adjusted. For example if you don’t like keyboard shortcuts, you can delete them or change the [key].

Best,
Kevin

8 Likes

Hi,
Nice tool, but when I intend to run this macro, I find some errors.
What is the correct way to run this macro?

Hi @WeisongZhao,
Sorry, for macs the installation can be tricky the first time :
On ImageJ toolbar, go to File / Show Folder / Macros.
It will open a Finder window. Place Visualization_toolset in the “toolsets” folder.
You can find more details on toolsets there. It should work!
Best,
Kevin

1 Like

Hi @K_Taz ,

Looks cool! We might steal some idea to add them to our BIOP Channel Tools using ActionBar. Side note, we really like ActionBar since it allows to easily create user interface with buttons (which can be easier for newcomers).

An appreciated function is also to Save and Load parameters file, so our users can keep only the raw files and re-apply the exact same settings to the current image or current folder of images.

Cheers,

R

5 Likes

Hi Kevin,
A really nice tool! Thank’s
Best regards. KL

1 Like

Hi @romainGuiet ,
Thank you feel free to steal anything you want!
As a huge fan of Imagej I’m only too happy to have something to share with the community :wink:

Cheers,

Kevin

3 Likes
  • Can you consider adding more LUT? For some imaging setups I would need 6 channels.
  • Some way of adjusting gamma per channel would be nice
  • Could you add an option to invert a LUT? Typically grays are easier to see when inverted, for a dim signal…
    Thanks for your tool!

Hi @ccros ,
Thanks for trying this tool!

  • Yes no problem for the LUTs, next update I will make it up to 7, It should be enought I think?
  • I will look about a gamma adjusting tool, it seems like a cool project!
  • About that, if you explore the .ijm file, you should find these lines:
/*
//Built-in Stack and LUT menus
 macro "Stacks Menu Built-in Tool" {}
 macro "LUT Menu Built-in Tool" {}
*/

remove the /* and */ , to include the original Stack and LUT menus of Imagej on the toolset. The LUT menu provides an “invert LUT” function.

Best,

Kevin

I just tried this and the split view give me this:

Hi @sebi06 ,
Yes the splitview tool can only work on multicolor Zstacks OR timelapses (Combine function only works on stacks, not hyperstacks). So if you want to use the splitview I suggest to run a maximal intensity projection on you timelapse.
Please tell me if it works
Best,
Kevin

Ok, I did not know this. No worries.

1 Like

I’m a huge fan of the [Q] easy switch between Color and Composite mode! I think most (all?) of these should get rolled into #fiji- they help out with basic usability for multichannel images.

2 Likes

Right! This is the specific macro that triggered me for learning imageJ macro language ^^
It also converted me for custom keyboard shortcuts, for daily use it’s a game changer.

Dear all,

I updated the visualization toolset.
You can now set LUTs for up to 7 channels.
I also corrected possible bugs when handling different images types.

Please don’t hesitate to tell me if I missed something.
Also, if you have an idea for a new tool, I will be happy to try making it !

You can find the last version here : Visualization_toolset.ijm (30.1 KB)
or on GitHub.

Best,
Kevin

Hi all,
In this last version I added a new icon for some customizable settings:

  • for the Auto-contrast icon you can now choose to adjust the current channel or all a once.
  • and for the composite switch tool (Q key), you can choose to either switch between composite and
    color / grayscale / or cycle the three.

And finally, now by pressing space + numerical keys from 1 to 7, you can toggle view of corresponding channels. Just like with the Channels Tool of imagej. (thanks to @jerome!)
You can find the last version on GitHub

Best,
Kevin

1 Like

Hi all,

I released a new version of the toolset on GitHub with some new features:

A new “Special Splitview” tool in the menu icon let you choose parameters :

  • color or grayscale for splitted channels.
  • squared, horizontal or vertical montage.
  • Plus the possibility to add labels fused to the splitview with color extracted from individual LUTs.

A new gammaLUT tool :

  • adapted from John Lim’s Gamma_LUT tool, you get visual gamma adjustment on you images by modifying the current LUT of your channel, without modification of pixels data. To reset the original aspect you just have to apply the original LUT.
    It keeps the channels color and works on hyperstacks.

Finally the possibility to toggle a channel on all opened images by pressing alt + numerical key corresponding to the channel’s number. (Quite handy for me).

Complete description is on the GitHub page.

hope you like it !

Best,
Kevin

2 Likes