- Description, p1
- Installation, p1
- Demo Image 1 - Barycenter (...), p1
- Demo Image 2 - Multi selection, p1
- Example of Sorting, p1
- Applications, p1
- Publication, p1
- Code and references, p2
The « Sort Selections in Overlays » macro is an example of handling vectorial objects - named overlays in ImageJ - by using single or composite selection of different nature. This brief page gives examples of use, and an application in cellular neurology.
Description:
Get overlays elements from any kind of selection (line, freehand etc...) with the options of inclusion, exclusion and intersection (using exclusion removes selected overlays). It allows sorting of the selected overlays elements from their colors. Compatible with composite images and barycenter option in the updated 21/01/2022.
Installation:
From the code page here (06/02/2013, first version) or code page here (update, 21/02/2022), select all and copy the text. Then open a new macro window on ImageJ (Plugins -> New -> Macro menu), paste the text code and install it ("Macro -> Install Macros" ImageJ text editor menu).
Demo Image 1 - Barycenter option:
A demo image of human macrophages culture is downloadable from the macro menu. Once the code installed as explained above, open the demo image by the "Plugins -> Macros -> Open Sample Image 1" menu. A four channel composite image is then opened, containing nuclei and cell compartments detected as overlays from different colors and a selections.
Cyan selections can be removed by clicking in the image and then restored by « Edit ->
Selection -> Restore Selection » ImageJ’s menu. Channels can be selected by « Image -> Color -> Chanels Tools... »
Run the sorting by "Plugin -> Macros -> Sort Selections in Overlays". The "Included" and "Intersection" options lead the selection of two nuclei instead of one for the selected cell (see picture below). Note: "Included" option only would return no nucleus for the left neighbor cell.
The same sorting using the "Barycentre included" option in addition to "Included" and "Intersection" options leads the selection of one nucleus instead of two with the precedent settings. Only objects which barycentre are included in the selection are selected (see bellow).
Demo Image 2 - Multi selections:
A demo image of neuron cells culture is downloadable from the macro menu. Once the code installed as explained above, open the demo image by the "Plugins -> Macros -> Open Sample Image 2" menu. A two channel composite image is then opened, containing detected objects as overlays from different colors and two user selections.
elements (red), V-Glut (green) pre-synaptic elements. Image courtesy of Pr.O. Stettler.
Experiment author: Asma Soltani. Image acquisition and processing: Gilles Carpentier,
laser confocal microscope Olympus IX81 FV 1000.
Right, the same with detected objets (overlays) and user selections (yellow).
Yellow selections can be removed by clicking in the image and then restored by « Edit ->
Selection -> Restore Selection » ImageJ’s menu. Overlays can be hidden/showed
by « Image -> Overlay -> Hide/Show » ImageJ’s menus.
Example of Sorting:
After opening the demo image, select « Sort Selection In Overlays » function in the menu accessible through "Plugins -> Macros". Run the default settings to get the following result:
vectorial objects retained are those included and at the intersection of the limits of the polygonal
and free hand selections.
Applications:
In the demo image, the selections are made by the user. The object sorting can also work automatically by using selections made from activation of overlays by user menu actions or macro code. This can be done through the ROI Manager interface, by the "Combine" option. The next pictures detail how to proceed.
First, from the demo image the sorting of green objects in and at the intersection with user selections was performed. Resulting overlays were converted into a composite selection by using the ROI Manager:
ROI Manager (ImageJ menu : Image-> Overlay -> To Roi Manger).
Then sorting of red objects in intersection with previously sorted green objects was performed after restoring the composite selection obtained from the ROI Manager (ImageJ menu : Edit-> Selection -> Restore Selection) in the initial demo image and then "Plugin -> Macros -> Sort Selections in Overlays" menu.
left image shows the result of the sorting using the same composite selection restored in the
initial demo image.
Publication:
This kind of operation implemented in an original program allowed to put in evidence synaptic alterations in mouse neurone primary culture:
- Below: example of object sorting used in the paper :
The slide show exhibits a confocal image analysis of a neuron synaptic area from a mouse hyppocampal neuron culture in conditioned medium. The first one shows the user selection in the initial image. The second one shows in yellow the intersection between red and green labelling after detection (not shown). It was performed according the same principle than described above.
| prev | next |
Soltani A, Lebrun S, Carpentier G, Zunino G, Chantepie S, Maïza A, Bozzi Y, Desnos C, Darchen F, Stettler O. Increased signaling by the autism-related Engrailed-2 protein enhances dendritic branching and spine density, alters synaptic structural matching, and exaggerates protein synthesis. PLoS One. 2017 Aug 15;12(8):e0181350. doi: 10.1371/journal.pone.0181350. Abstact, Paper.