-
Notifications
You must be signed in to change notification settings - Fork 16
Spine Analyzer
The tools allow to semi-automatically segment dendritic spines in 3D+t images and to measure their volumes and the intensities of the signal within in different channels over time.
You can find the source code in git-hub here.
You must have MorphoLibJ installed.
To install the tool download the file spine_analyzer.ijm and put it into the folder macros/toolsets
of your FIJI installation. In FIJI, select the spine_analyzer
-toolset from the more tools button >>
. On the toolset, click on the Install or Update Tool
(the rightmost tool of the toolset).
Note: In case you do not have jython installed
the first time you run the installation, only jython will be installed. You then have to retsart FIJI and click on the Install or Update Tool
again.
After the installation finished, restart FIJI. Select the spine_analyzer
-toolset from the >>
-button of the ImageJ launcher.
- the first button opens this help page
- the
s
-button runs segmentation of a spine within a region of interest (ROI) - the pipette-tool allows to select the label of a spine for the usage with the bucket-tool
- the bucket-tool replaces the label of a spine in a frame with the selected label (select the background to remove a spine in a frame)
- the next button adds a dendrite, on a frame, defined by a polyline-roi
- the first tacking-button tracks the dendrites
- the second tracking-button tracks the spines and gives the same label to a spine in different frames
- the paper-clip button attaches spines to the closest dendrite
- the next button allows to measure the spines in the image
- the last button allows to install or update the spine-analyzer
The first step is to add dendrites and to track them in the different frames. Once that is done, you can segment spines, track them over time and attach them to the closest dendrite. The last step is to measure the volume and intensity of the spines in different channels over time.
Make a polyline selection on the center of a dendrite, then press the Add Dendrite`- button
[F6]``. The first time you do this, the operation will take longer than usual, because the image will be initialized for the tool. Subsequent operations will be faster.
![](https://private-user-images.githubusercontent.com/7602420/294469697-074269d2-4dab-40f0-a456-8594b734b02b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxNDE0NzIsIm5iZiI6MTcyNjE0MTE3MiwicGF0aCI6Ii83NjAyNDIwLzI5NDQ2OTY5Ny0wNzQyNjlkMi00ZGFiLTQwZjAtYTQ1Ni04NTk0Y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5YjNmOGUwMTI4NWFjOGE3MGI0YWQwMjg4YzI5MmI2NGFmOSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.5rs16IHWPLWI-KDPWSYBfiO7QRPzWpaE2i2RgoXpJVI)
Go to the next frame and repeat the procedure. Then repeat for the next dendrite. Once you added all incarnations of all dendrites you're interested in, press the Track Dendrites
-button. The same dendrite on different frames should be displayed in the same color after the tracking.
Hint: If you want to copy a dendrite from one frame to another, choose the rectangle roi tool and click on the roi of the dendrite in the source frame. Change to the target frame. Press ctrl+a
followed ctrl+e
. You now have a new selection corresponding to the original one on the new frame. You can move it around as a whole using the arrow-keys
of your keyboard and you can modify the individual points using the handles. Once done modifying, press the Add Dendrite
-button.
![](https://private-user-images.githubusercontent.com/7602420/294500391-2795e5ae-baed-487f-b94b-028b037d904d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxNDE0NzIsIm5iZiI6MTcyNjE0MTE3MiwicGF0aCI6Ii83NjAyNDIwLzI5NDUwMDM5MS0yNzk1ZTVhZS1iYWVkLTQ4N2YtYjk0Yi0wMjhiMDM3ZDkwNGQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MTJUMTEzOTMyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Yzg3ZjBmOTEzNGU4ZWY2YzEyOWYwMjc1MjgxY2ZlMTIyNDA3MDU3NTUzNzY3NmMwYWMyZmQxYmQ0NTEzMDk1MyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.22aCePzbPplqa8L3qx6x25prY3lK8xEPoj3c41Lp9jw)
- the maximum distance a dendrite can move between two frames in physical units
Use the freehand selection tool to make a selection around a spine. Make sure the spine is completely inside of the selection on all slices. Then press the s
-button to segment the spine in 3D on the current frame.
Repeat the procedure for the next frame. Do the same for all other spines on the selected dendrites. Then press the Track Spines
-button and finally the Attach Spines
-button to attach each spine to its closest dendrite.
If necessary you can restrict the segmentation of a spine to a sub-stack between a first and last slice. You can set the first slice to the current slice using the keyboard-shortcut 1
. To set the last slice to the current slice, use the keyboard-shortcut 2
. The sub-stack remains active, until you reset it using the keyboard-short 0
.
- Spine Segmentation Channel (0 for active)
- the channel used for the segmentation of the spines
- Threshold
- the threshold value used for the segmentation of the spine, if the value is 0 an auto-thresholding method is used
- Auto-Thresholding Method
- the auto-thresholding method used to segment the spines within the roi given by the user
- Lookup Table
- the lookup table used to display the labels of the segmented spines
- Start Slice (0 for first)
-
If different from zero, the segmentation of the spines is restricted to the slices between start-slice and end-slice. The keyboard shortcut for this is
1
.2
sets the end-slice and0
resets both options to 0. - End Slice (0 for last)
-
If different from zero, the segmentation of the spines is restricted to the slices between start-slice and end-slice. The keyboard shortcut for this is
1
.2
sets the end-slice and0
resets both options to 0. - Label for next spine segmentation
- The label that will be used for the next spine segmentation.
- the maximal distance between the centers of a spine in two different frames
You can manually change the label of a spine in a frame. To do so, first select the new label for spine. To select the new label use the pipette-tool. You can either set the new label in the options of the tool or with the pipette-tool activated click on an existing label. Then activate the bucket tool and click on the label you want to replace.
By selecting the background, i.e. the label zero, as the new label, you can delete a label in a frame.
- the selected label, it will be used as the new value by the bucket-tool
- in "selected label"-mode the bucket-tool will replace a label by the currently selected label while in "next label"-mode it will replace a label by the next unused label, i.e. the maximum of the existing labels plus one.
Before pressing the Measure
button, make sure that you attached the spines to the dendrites by pressing the Attach Spines
button. Two results tables will be shown. One containing the length of each dendrite in each frame, its number of spines and the spine density. The other one showing the measurements (volume and intensity in each channel) for each spine per frame.
- Show Dendrite Measurements
- If selected the features of the dendrites, like length and spine density are measured. The dendrites must have been tracked and the spines must have been attached to the dendrites.
- Show Spine Measurements
- If selected the spines attached to a dendrite a measured. The dendrites must have been tracked and the spines must have been attached to the dendrites.
- Show All Spine Measurements
- If selected all spines are measured, independent of their attachment to a dendrite. It is enough to have the spines tracked or created with consistent labels across the frames for this to work.