the development of advanced imaging methods has revealed that living cells exhibit highly dynamic structural remodeling [ 1 , 2 ] .
the rate and structural details of cellular motility can change over development or in response to the environment in ways that reveal important details about cellular signaling mechanisms [ 35 ] .
useful commercial and public domain programs are available to identify and measure the movements of relatively large cell structures like amoeboid pseudopodia [ 68 ] as well as fine features like growth cone filopodia , astrocytic protrusions , and dendritic spines [ 11 , 12 ] .
analysis of these kinds of sparsely distributed cellular protrusions may be amenable to the use of image skeletonization or active contour tracing to select the features of interest and to track end - tips for motility analysis .
an alternative approach is to measure perimeter shape changes of an entire cell by analyzing the difference between an original image and an  eroded  image from which all fine processes have been filtered away .
however , if the features of interest are very dense and spindly , overlapping and oriented in many directions as in the case of astrocytes and radial glia [ 13 , 14 ] , quantitative measurements of motility become particularly challenging for any of the above methods .  
we have previously introduced a method for quantifying motility in cells with densely packed , fine processes as part of a study analyzing dynamic remodeling of midbrain radial glia . after collecting a time series of 2-photon z - stacks , maximum intensity projections
( i.e. , maximum intensity value at each x - y position through the z - stack is used to generate a 2d projection ) are aligned to correct for drift and then images are preprocessed by binarization using sobel edge detection , followed by pixel dilation to remove gaps generated by the edge detection procedure .
the algorithm then calculates a motility index , defined as the mean number of redistributed ( added or lost ) pixels between processed images at sequential time points . to deal with the wide range of different cell sizes , indices are normalized for size by dividing by cell area ( in pixels ) .  
one potential limitation of this approach is that normalizing pixel counts to the 2d projection area of each cell can distort the results due to variations in cell shapes and sizes .
for example , z - projections of very long , narrow cells like radial glia will give dramatically different measurements of 2d projected area depending on whether a cell is viewed parallel or perpendicular to its radial axis .
although this index is still highly sensitive for measuring relative changes in motility of individual cells imaged from the same angle over time in response to different treatment conditions , the area normalization used to calculate the motility index introduces a source of artifact that limits its usefulness for comparing multiple cells that might be imaged at a range of different orientations .   in this paper
, we introduce several significant improvements to our original method that make important advances toward correcting these limitations .
the new approach offers greater sensitivity for cell motility analysis while decreasing the impact of total cell area on measurements by using an algorithm based on spatial boxcar averaging of redistributed pixels .
this new motility index provides a value that better correlates with the mean elongation and retraction speeds of moving filopodial processes , eliminating the need to normalize by total cell area .
boxcar averaging measures motility preferentially in the dynamic parts of the image by giving more weight to pixel redistributions that occur in close proximity to other redistributions and are thus more likely to be part of real restructuring events .
in addition , for high - temporal - resolution imaging , we have added a noise filter based on the temporal frequency power spectra of the pixels , optimized to preserve biological activity while removing imaging artifacts .
we present these new tools as part of an open - source program for the popular matlab platform with a customizable user interface that can easily be applied to measure motility of a wide variety of cell types and structures .
the cells examined for this study are radial glia in the optic tectum of albino xenopus laevis tadpoles at developmental stage 47 .
radial glia have many fine filopodial processes that undergo continuous structural remodeling over the timescale of minutes ( figure 1 ) .
the optic tectum in stage 45 tadpoles was bulk electroporated   with a dna plasmid encoding membrane - targeting farnesylated egfp ( egfp - f ) .
tectal radial glia cells were imaged two days later using a custom - built two - photon laser - scanning microscope with a 60  1.1 na water - immersion objective ( olympus ) .
a maitai - bb femtosecond pulsed ti  :  sapphire laser ( newport / spectra physics ) was used to generate excitation light at 910  nm . in preparation for imaging ,
tadpoles were paralyzed by immersion in 0.2  mm pancuronium bromide ( sigma ) solution in 0.1x modified barth 's solution with hepes ( vwr ) .
images of individual egfp - f - expressing cells in live albino tadpoles were collected as z - series stacks of 50150 optical sections sized 512 pixels  512 pixels ( 79.5  m  79.5  m ) m at 1  m step size . in a typical experiment ,
subsequently , mk-801 maleate ( 100  m , tocris ) was injected intraventricularly into the tadpoles at the level of the optic tectum .
after a 20  min incubation , another 3 images were captured at 5  min intervals to assess the effects of the treatment on motility . in another set of experiments to estimate the contribution of sample drift and noise artifact , animals were euthanized in 0.2% ms222 ( sigma ) and fixed by immersion in 4% paraformaldehyde ( pfa , vwr ) for 2 hours prior to imaging .  
two - photon z - series stacks were processed by blind deconvolution using autoquant software . as all images of cells were captured in vivo , surrounding neurons and skin cells expressing egfp as well as autofluorescent melanophores were sometimes present in a subset of z - series images , above or below the cell of interest where they could interfere with the automatic motility assessment .
these non - glia objects were removed manually using imagej from the z - series stacks .
the careful removal of extraneous objects from the stacks is critical for obtaining accurate measurements and typically takes about 30 minutes per 100 optical sections .  
the inherent voxel anisotropy in 2-photon microscopy  axial resolution is always poorer than resolution within the focal plane  makes perfect 3d registration of image stacks impractical .
we therefore designed our motility analysis for 2d time series and took precautions to minimize rotation during image acquisition .
tadpoles were mounted in form - fitting polydimethylsiloxane ( pdms ) imaging chambers sealed with a coverslip to minimize rotation of the samples over time .
z - series stacks were converted to 2d maximum intensity projections and realigned to correct for slight lateral drift over time using the rigid body setting of the epfl stackreg plugin for imagej ( http://bigwww.epfl.ch/thevenaz/stackreg/ ) .   all subsequent processing and analysis steps in this paper
were performed using custom - made scripts that can be run under the matlab ( mathworks ) platform .
these routines have been made available under a modified version of the gnu general public license v3 ( see details in program files ) as part of a set package controlled with a user - friendly graphical user interface available at http://ruthazerlab.mcgill.ca/downloads/motility_guiv2.zip .
after optimizing the alignment of the maximum intensity projections for each time point as described above , images were subjected to preprocessing by binarization using sobel edge detection to identify edges , followed by pixel dilation ( figure 2 ) .
pixel dilation expands the edges of the binarized images , largely eliminating discontinuity artifacts that sometimes occur in the edge detection step due to variations in the pixel intensities at fine processes in the raw images ( e.g. , arrowhead in figure 2 ) .
a dilation radius of 6 pixels was used , as this was determined empirically to remove this artifact efficiently while still maintaining adequate resolution to detect small movements of the cell surface . to assess the motility of the cell we subtracted the processed images of consecutive time points ( figure 3(a ) ) from one another .
we define the binary intensity value of an image with dimensions x and y as ixy(t ) where t is the time index of the image ranging from 1 to t in integral steps , with t being the number of time points captured .
the redistribution of pixels between two time points , for each pixel defined by ( x , y ) , is calculated as 
 ( 1)xy(t)=ixy(t+1)ixy(t ) .
the absolute value of this subtraction result generates an image highlighting pixels where a change has taken place from one time point to another , showing pixel redistribution ( figure 3(b ) ) . in the original dynamics assessment approach of tremblay
et al . ( 2009 ) , which we here term method 1 , the average total area of the images is taken into consideration . the area of an image with time index t is defined by 
 ( 2)a(t)=x , yixy(t ) .
sum of the redistributed pixels between time points is calculated : 
 ( 3)r(t)=xyxy(t ) .
motility index m1 between two time points using method 1 is defined as 
 ( 4)m1(t)=r(t)a  , 
 where a is the average total area of the cell over all time points . in the new ,
improved algorithm , here referred to as method 2 , the difference images calculated by formula ( 1 ) are subjected to boxcar averaging , often referred to as taking a  moving average  , ( figure 3(c ) ) as defined by 
 ( 5)^xy(t)=1w2m = xh  x+hn = yhy+hmn(t ) , 
 where w denotes the boxcar window width and h = ( w  1)/2 .
the choice of the boxcar window size for averaging should be determined empirically depending on the dimensions of the structures imaged , taking into consideration that important details may be lost as the boxcar size is expanded .
we set the boxcar size to w = 9 ( 9  9 pixel square ) for our analysis .
next , the boxcar - averaged image ( figure 3(c ) ) is multiplied with the image showing redistribution of pixels between time points ( figure 3(b ) ) to obtain a final boxcar - weighted image xy(t ) ( figure 3(d ) ) : 
 ( 6)xy(t)=^xy(t)xy(t ) .
this last step has the useful effect of blunting the contributions of the large number of sparse individual pixels found along the edges of the boxcar - averaged images , thus weighting the analysis in favor of dynamic  hot spots  where large groups of pixels change over time .
these highly dynamic zones are expected to reflect biologically relevant pixel redistributions whereas the sparse intermittent changes along the periphery are more likely to arise from nonbiological artifact such as specimen drift , photobleaching , and detector noise .
finally , the mean pixel value m2 of the filtered boxcar averaged pixel redistribution image xy(t ) is calculated by 
 ( 7)m2(t)=1nx , yx , y(t ) , 
 where n is the count of nonzero pixels .
we thus define m1 and m2 , respectively , as the original and improved motility indices measured between two time points . for the overall motility value of a cell under a certain condition , the mean motility index m1 or m2 over all time points was used .
the size of the boxcar window used for analysis is a customizable parameter in our software .
the optimal setting depends in large part on the dimensions of the most motile processes extending out from the cell and the density with which they occur at the cell surface .
we recommend using an independent dataset to empirically determine the parameters that give the greatest sensitivity for the cell type being studied .
for example , in figure 3(e ) , we systematically varied the boxcar window size and found that although the absolute motility index values decrease with larger boxcar sizes , the greatest difference between experimental groups is obtained with an intermediate boxcar size , in this case 9 pixels .   in another experiment ,
images of an active cell were taken at the higher rate of once every 20 seconds over the 15 to 18 minutes normally used for dynamics analysis ( figure 4(a ) ) .
this sampling rate ( 0.05  hz ) constitutes temporal oversampling for the cellular motility behavior in which we are interested . for technical reasons
only a subsection of the cell was measured in order to achieve the necessary temporal resolution .
images were preprocessed as described above , resulting in dilated binary images as in figure 2(c ) .
three characteristic examples of the time - dependent behavior at single pixels are shown in figure 4(b ) .
pixels located at the center of the cell main process typically will have an unvarying intensity function as shown in figure 4(b)(i ) .
similarly , pixels that lie within the trajectory of an elongating or withdrawing filopodium will be continuously on or off until the filopodium either moves into or out of the pixel position , after which the pixel value will flip ( figure 4(b)(ii ) ) .
pixels that are near the edge of the cell tend to alternate between a value of 1 and 0 irregularly , due to imaging artifact and alignment - drift error ( figure 4(b)(iii ) ) .
the time - domain pixel intensity functions shown were transformed into the frequency domain by means of the discrete fast fourier transform ( dft ) algorithm of matlab .
a large proportion of the spurious motility can be filtered based on the dft results , as image noise is expected to have a higher frequency dft peak than biologically relevant slower fluctuations .
we therefore implemented a dft - based image filter with a user - selectable frequency threshold as part of our analysis package . setting the filter to separate fluctuations at a threshold of 0.0026  hz ( < 6.4  min periods ) appeared to effectively distinguish between image noise at high frequency ( figure 4(c ) ) and biologically relevant motility fluctuating at lower frequencies ( figure 4(d ) ) .
to assess our improved method for cell morphological dynamics measurement , we electroporated albino xenopus laevis tadpoles with plasmid driving the expression of membrane - targeting farnesylated egfp ( egfp - f ) .
two days after electroporation , we collected images of individual egfp - expressing radial glia cells in the optic tectum in live tadpoles by two - photon microscopy .
we tested the sensitivity of our improved motility index ( method 2 ) compared to the original algorithm ( method 1 ) from tremblay et al .
( 2009 ) , using an established pharmacological manipulation known to reduce radial glial motility .
we have previously shown that radial glia decrease their filopodial process motility in vivo in response to intraventricular application of the n - methyl - d - aspartate receptor ( nmdar ) blocker mk-801 .
here we used this glial response to mk-801 to compare the relative sensitivity of methods 1 and 2 . in the study by tremblay et al .
, time - lapse images had been collected at 15 minute intervals . in order to push the limits of our detection capability , we shortened the imaging interval to 5 minutes ( figures 5(a ) and 5(b ) ) .
the cumulative restructuring of the cells is considerably less during this shorter interval and we sought to determine whether either analysis method could still detect a difference between control and mk-801-treated conditions .  
tectal radial glia are highly dynamic on a timescale of minutes , continually adding and retracting many filopodial processes . however , although they remodel extensively , they do not exhibit cumulative growth over these periods .
we found no significant difference between the area profiles of radial glia cells before compared to after mk-801 treatment ( area mean  sd before mk-801 : 1465.25  140.56  m , after mk-801 : 1411.36  150.6  m , n = 10 , p = 0.45 , two - tailed student 's t - test ) . we were unable to demonstrate a significant decrease in the motility index values of cells in response to mk-801 application when imaged at 5  min intervals and analyzed using method 1 ( n = 10 , p = 0.11 , paired t - test ) ( figure 5(c ) ) .
in contrast , applying method 2 to the same dataset revealed a significant decrease in the rates of dynamics of these cells after mk-801 treatment ( n = 10 , p < 0.02 , paired t - test ) ( figure 5(d ) ) .
the greater sensitivity of method 2 was likely due to smaller variance in the motility index values resulting from the reduced contribution of artifact from nondynamic parts of the cell . to assess the relative contributions of spurious motility caused by imaging artifact , we compared motility index values of control egfp - f - expressing radial glial cells in living tadpoles ( n = 4 ) with cells from the animals that had been euthanized and fixed with 4% pfa ( n = 5 ) ( figures 6(a ) and 6(b ) ) .
fixation abolishes all cellular dynamics , leaving only imaging artifact , photobleaching , and brownian motion of the fluorophore molecules .
not surprisingly , a large difference in cell motility scores between the control and fixed groups was obtained using both the old and new analysis methods .
somewhat unexpectedly , motility index scores obtained using method 1 ( figure 6(c ) ) were on average lower , after normalization to the matched control group , than those produced by method 2 ( figure 6(d ) ) , probably reflecting a greater sensitivity of the new method to systematic artifact due to photobleaching or specimen drift
. however , method 1 exhibited larger variance in the motility indices obtained and thus gave a wider 95% confidence interval for the difference between means ( ci = [ 0.3589 , 0.7854 ] ) . analysis by method 2 resulted in a smaller two - sided 95% confidence interval for the difference between means ( ci = [ 0.2607 , 0.5342 ] ) and consequently a lower p value by the two - tailed student 's t - test ( method 1 , p = 0.00039 ; method 2 , p = 0.00024 ) .
we also applied the dft - based temporal frequency filter to a different set of control and pfa - fixed cell image sequences collected at higher temporal resolution to further distinguish actual biological motility from artifact .
filtering cells with a 0.0026  hz temporal frequency ( period < 6.4  min ) threshold decreased the already low motility index values of pfa - fixed cells ( as measured using method 2 ) by 66% on average ( figure 6(e ) ) , confirming the value of the temporal frequency filter for reducing spurious  motility  from measurements .
in contrast , the motility index value of the control live cells was only reduced by an average of 23% , consistent with most of the signal being biological in origin .
thus , the temporal frequency filter in conjunction with our improved motility index provides a set of useful and sensitive tools for the detection and quantification of biologically relevant morphological remodeling of cells from 2-photon time - series images .
we present a novel method for motility analysis of a wide variety of morphologically complex cells .
this versatile approach offers increased sensitivity compared to the earlier version due to its superior discrimination of real movement from noise .
this is achieved by boxcar averaging of pixel redistribution images , which results in the relatively greater weighting of areas in the images where large groups of adjacent pixels exhibit coordinated changes from one time point to another , while reducing the contribution of spurious pixel fluctuations . when the size of the boxcar window is set to roughly match that of the most relevant motile structure for the phenomenon under study ( e.g. , dendritic spines , axonal growth cones , and glial filopodia ) , our algorithm returns a single motility index value that effectively reflects the degree of motility of the specific individual structures of interest without requiring painstaking and time - consuming reconstruction of each of these cellular protuberances .
in addition , we demonstrate that further improvement can be obtained by temporal frequency filtering of the time series .
real biologically relevant movements like filopodial extension typically involve changes of larger groups of neighboring pixels .
changes entailing the redistribution of a smaller number of adjacent pixels from one time point to another often arise from artifacts including photobleaching , detector noise , and imperfect alignment of time series images .
this is most evident in the faint outlining of the whole perimeter of the cell in pixel redistribution images ( figure 3(b ) ) .
this perimeter outlining is unlikely to be related to cellular metabolism or function , as it is also present in the pfa - fixed cells .
the use of boxcar averaging dramatically reduces the contribution of this artifactual component to our motility measurements by weakening the influence of isolated pixel values while enhancing the weighting of clusters of pixels that change together . the new method 2 consistently yields lower coefficients of variance than the original method 1 .
the principal reason is the above - mentioned reduction of noise at the cell perimeter .
in addition , eliminating the need for normalization by cell area removes another source of variability that is not relevant to actual motility .
radial glia cells appear to come in an endless variety of shapes and sizes , and the number of processes does not necessarily linearly scale with the area .
because method 1 relies on counting the total number of redistributed pixels between time points , it is necessary to normalize these values in order to correct for different cell sizes to prevent larger , less motile cells from being scored higher than highly motile cells that are just very small .
however , normalizing to total cell area can result in two cells with identical motility of their processes but different 2d areas being reported as having different motility rates .
the use of boxcar averaging in method 2 , in contrast , gives a value that reflects process movement within local domains that is independent of the total size of the cell . to further eliminate spurious pixels
some of the most rapid and stochastic changes in pixel values occur along the perimeter of imaged cells where out - of - focus light , photon scattering , as well as fine image drift enhance the inherent fluctuations in signal detection at photomultiplier tubes or other detectors . by thresholding out the highest temporal frequency pixels ,
mainly biologically relevant pixels remain . a surprisingly large proportion ( 23% ) of the prefiltered motility measures of
this also helps explain why the motility index scores of pfa - fixed glial cells were not simply zero , as a considerable fraction of the motility index appears to be derived from nonbiological artifact .
thus , the application of temporal frequency domain filtering has tremendous potential for improving the dynamic range and sensitivity of the motility index .
however , temporal frequency filtering can be properly applied only when numerous rapid interval images have been collected .
the optimal acquisition rate will depend upon the velocity of the remodeling processes of the cell and on the pixel size of the imaging system .  
the question of what constitutes the remaining  motility  in fixed cells , after the spurious edge pixels have been removed , is intriguing .
the images may gradually change due to photobleaching , photochemistry releasing reactive species , and perhaps even thermal effects from the imaging laser .
the finding that fixed material exhibits considerable spurious motility raises potential questions about the correct interpretation of the numerous studies reporting continuous subtle movements of processes like dendritic spines or astrocytic filopodia under the microscope .
this argues that appropriate fixative - treated controls should be tested as a first step whenever measuring cellular dynamics in order to define the noise floor of the imaging system used . in certain cases it would be useful to measure motility of only selected parts of a cell .
we tested choosing user - defined smaller parts of the images for motility analysis during the course of our algorithm development .
however , we ultimately settled on the automatic boxcar - filtered approach for the majority of our analyses because it allows for truly objective quantification of motility without introducing investigator bias , for example , due to selecting specific regions of interest .
one interesting future possibility for comparing defined subregions of cells without bias might be to have the software create an internal standard coordinate system for all cells , as was done in a study analyzing bacterial division .
another important future direction would be to implement a similar unbiased motility analysis for the full original three - dimensional data sets , rather than maximum intensity projections . in light of the large amount of noise introduced by image drift and registration over time , this problem will be compounded greatly by adding a three - dimensional registration step , especially complicated given the anisotropy of axial resolution compared with lateral image resolution on most optical microscopes .
new high - resolution light - sheet microscopy techniques such as selective plane illumination microscopy ( spim ) and bessel beam microscopy should facilitate extending these analyses into 3d [ 21 , 22 ] .
we have created a robust and sensitive method to measure structural motility of any cell type and generate a quantitative motility index .
this method is especially useful for cells with complex morphologies that are complicated to analyze by other means .
the programs implementing this method with a user - friendly interface are freely available for download at http://ruthazerlab.mcgill.ca/downloads/motility_guiv2.zip .
 cells such as astrocytes and radial glia with many densely ramified , fine processes pose particular challenges for the quantification of structural motility . here 
 we report the development of a method to calculate a motility index for individual cells with complex , dynamic morphologies . 
 this motility index relies on boxcar averaging of the difference images generated by subtraction of images collected at consecutive time points . 
 an image preprocessing step involving 2d projection , edge detection , and dilation of the raw images is first applied in order to binarize the images . 
 the boxcar averaging of difference images diminishes the impact of artifactual pixel fluctuations while accentuating the group - wise changes in pixel values which are more likely to represent real biological movement . 
 importantly , this provides a value that correlates with mean process elongation and retraction rates without requiring detailed reconstructions of very complex cells . 
 we also demonstrate that additional increases in the sensitivity of the method can be obtained by denoising images using the temporal frequency power spectra , based on the fact that rapid intensity fluctuations over time are mainly due to imaging artifact . 
 the matlab programs implementing these motility analysis methods , complete with user - friendly graphical interfaces , have been made publicly available for download . 
1. Introduction
2. Materials and Methods
3. Results
4. Discussion
5. Conclusions