
Neuron, Morphology
| IM-00008 | Neurite-Measurement-for-the-Whole-Image |
| Application | Whole-image neurite measurement |
| Demo image | SH-SY5Y cells (courtesy of Dr. Ling-Wei Hsin ) |
| Language | IJM |
| Author | Szu-Ting Lin |
| DOI | ver2.0.0, ver2.1.0 |
| YouTube | CN, EN |
| GitHub | Neurite-Measurement-for-the-Whole-Image |
Introduction
This Fiji batch macro is designed to process neuron images with extensive clustering, especially those with low-contrast neurites. By utilizing the Local Thickness [1] and Skeletonize [2] plugins, we have developed a workflow for whole-image neurite measurement. The automatically saved Excel file provides the total neurite length and cell count for the entire image.
ver 2.1.0 – Updated on 2025/6/5 with the following changes:
- Set the binary background to white to prevent errors during skeletonization.
- Added: Enhance Contrast, Gaussian Blur, and Otsu-based thresholding (user adjustable) on neuron mask.
- Implemented dialog windows for selecting folders.
- Image names are more descriptive and user-friendly.
- Added 3 checkpoints to prevent runtime errors.
Examples
- The confocal image of SH-SY5Y cells was acquired using high-content imaging. (courtesy of Dr. Ling-Wei Hsin (Department of Pharmacy, National Taiwan University).
Description
- This is a batch IJM script.
- The demo image contains two channels: SH-SY5Y cells (green) and DAPI (blue).
- The script begins by splitting the channels and renaming them accordingly.
- Neurite Measurement
- Then creating neuron mask by using the RenyiEntropy[3] thresholding method.
- The neuron mask is duplicated, and local thickness is applied to approximate the soma mask.
- The neuron mask is skeletonized, and the soma mask is subtracted to isolate the neurites.
- The total length of the neurites is measured.
- Cell Count
- Otsu[4] thresholding is applied to the DAPI channel, and the result is converted to a mask.
- The DAPI mask is multiplied with the normalized neuron mask to remove non-neuron cells.
- The individual nucleus is identified by StarDist[5].
- The total cell number is counted, and the average neurite area per cell is calculated.
- All measurements are saved in a collection table.
- A composite image is generated to visualize the results: raw neurons in white, segmented nucleus in the glasbey on dark channel, and neurites in red.
- Both the composite image and measurement results are saved in the same output file.
Instruction
- Place the image in the same directory for batch analysis. Also, create a null file to serve as the output file.
- Drag the script and the demo image to Fiji.
- Press “Run” and choose the input and output file respectively.
- The collection table will be saved as an Excel file.
Tutorial
Acknowledgements
Thank to Dr. Shao-Chun, Peggy, Hsu, and Ms. Anchi Luo for their invaluable teaching and guidance!
Demo images are captured by Yu-Hsuan Lin and courtesy from Dr. Ling-Wei Hsin (Departrment of Pharmacy, National Taiwan University).
This work was supported by National Science and Technology Council NSTC 113-2320-B-002-076 to Shao-Chun Hsu.
Reference
- R. P. Dougherty and K.-H. Kunzelmann, “Computing Local Thickness of 3D Structures with ImageJ,” in Microscopy & Microanalysis 2007 Meeting, Ft. Lauderdale, FL, USA, Aug. 2007.
- T. Y. Zhang and C. Y. Suen, “A fast parallel algorithm for thinning digital patterns,” Communications of the ACM, vol. 27, no. 3, pp. 236–239, 1984.
- P. Sahoo, C. Wilkins, and J. Yeager, “Threshold selection using Renyi’s entropy,” Pattern Recognition, vol. 30, no. 1, pp. 71–84, Jan. 1997, doi: 10.1016/S0031-3203(96)00065-9.
- N. Otsu, “A threshold selection method from gray-level histograms,” IEEE Transactions on Systems, Man, and Cybernetics, vol. 9, no. 1, pp. 62–66, 1979, doi: 10.1109/TSMC.1979.4310076.
- M. Weigert and U. Schmidt, “Nuclei Instance Segmentation and Classification in Histopathology Images with StarDist,” in 2022 IEEE International Symposium on Biomedical Imaging Challenges (ISBIC), Kolkata, India, 2022, pp. 1–4, doi: 10.1109/ISBIC56247.2022.9854534.