Recent advances in microscopy techniques enable whole-brain activity imaging of small animals at cellular resolution with their behavior. The soil nematode C. elegans is the only animal that all neurons and the wiring diagram of the whole nervous system are known completely, and is one of the ideal model animals for understanding the mechanisms of information processing of nervous system. We developed bio-image informatic methods to extract neural activities from three-dimensional time-lapse images of the retained nematode. However, existing methods often failed to track the neurons in the whole-brain images of behaving animals because the relationships of positions of neuronal nuclei changes drastically. The main objective of this project is developing a tracking method that controls order of tracking based on the similarity of the images and improves tracking accuracy.