2.1. Ca2+ Imaging Set up
Primary astocyte cultures were prepared as previously described [18]. The cells were positioned on an inverted epifluorescent optics microscope (Axiovert 135TV, Zeiss, Germany) and image pairs obtained every 250 ms by exciting the preparations at 340 and 380 nm were recorded to obtain the 340/380 ratio images. Excitation wavelengths were changed through a high-speed wavelength switcher, Lambda DG-4 (Sutter Instrument, Novato, CA), and the emission wavelength was set to 510 nm. Image data were recorded with a cooled CCD camera (Photometrics CoolSNAP fx) and processed using the software MetaFluor (Universal Imaging, West Chester, PA). Throughout all experiments, cells were kept at 36ºC with 5% CO2 and visualized with a 40x oil-immersion objective (Zeiss).
2.2. Astrocyte ROI based fluorescent ratio imaging
The resulting 340 and 380 nm recorded images are used as input to a specific imaging software (MetaFluor) that calculates the 340/380 ratio and is able of generating functions of Ca2+ concentration evolution over time, based on the images brightness levels variation. From the acquired sequence of images, before SIGAA, there was a manual selection of a set of ROIs from the cells with interest to study. From these ROIs, is possible to extract the resulting Ca2+ functions which are then studied to allow for conclusions over specific cell characteristics, being the baseline, the number of transients, the transient slopes, and amplitudes the main Ca2+ features usually evaluated. The main issue with the previously described procedure is the induction of minimal vibration in the laboratory setup that will result in an artificial frame-to-frame movement over the experiment recorded frames/videos. Such movement is unavoidable since is caused by human handling of the laboratory setup and is mostly raised during drug incubations. Thus, this minimal vibration of the system results in a position displacement between the manually defined ROI (that is always in the same place) and the astrocyte that is being studied (that will change location), during function generating and running on the software that processes the acquired images. This will lead to a considerable error in the output Ca2+ functions. Consequently, to overcome this issue, the function extraction procedure must be stopped on each displacement, to redefine the new ROI over the new cell position, and then resume. For optimal function this manual adjusting has to be performed on every frame change, over multiple cells, resulting in an iterative process that will represent the major time spent for the study, with no added value to the final results and prone to errors.
Moreover, once all Ca2+ functions are generated, these are often studied with the extraction of relevant parameters, with little computer assistance, which is also a timeconsuming step that is prone to errors.
2.3. Proposed system and methods
The system that we are now proposing (Fig. 1) follows a three-function block structure. The first block of SIGAA is responsible for computing the 340/380 ratio values, using both input experimental frames/videos, and for performing automatic video drift correction from the input recorded videos of an experiment. This block is achieved with a two-step template matching algorithm using normalized cross-correlation. The second block takes the videos with drift correction from block one and applies morphological reconstruction techniques to automatically detect and segment detectable astrocytes that were collected as defined ROIs. The third block is responsible for processing Ca2+ functions previously generated and extracting a set of numeric parameters, such as function baseline identification, duration of the transient, and slopes, which are relevant for cellular experimental conclusions.
2.4 Block 1: Ratio values and input video drift correction
SIGAA’s first block considers the laboratory recorded 340 nm and 380 nm videos of astrocyte response to a specific test substance as input and is responsible for computing 340/380 ratio values and performing video drift correction.
Since Ca2+ intracellular levels are represented by the 340/380 ratio values, the first block starts by dividing 340 nm frames by 380 nm frames, which will be used by the second block to generate Ca2+ functions. For the second part of the first block, the video drift correction will be made since the input videos, due to artificial movement previously described, inherently pose two obstacles:
1) repeated vibrations to the camera focus throughout the recording procedure can move some astrocytes out of the same video frames. Such cells are not valid for the study, as it is not possible to extract a valid function for these cases, and thus, should not be considered for Ca2+ function extraction;
2) other astrocytes are shown in the visual field during the whole duration of the recorded videos, but still, less significant vibrations can displace the cells away from the initial ROI, compromising brightness value extraction inside the ROI for the cell Ca2+ function extraction.
The SIGAA system tackles both issues with a two-step template matching algorithm, based on normalized cross-correlation. Template matching [19] is a high-level machine vision method that distinguishes the parts on an image that match a predefined layout. Cross-correlation represents, by definition, one of such methods as a measure of similarity between two different signals (images in this case), by sliding the first shorter template signal over the tested signal [20], [21]. The resulting coefficients will define a measure of the probability of the template signal to be found on a specific position on the second signal. Consider in Eq. 1 the cross-correlation coefficients \(r\left(k\right)\) for signals \(x\left(i\right)\) and \(y\left(i\right)\)with \(i=\text{0,1},2\dots N-1\), at position \(k\):
$$r\left(k\right)=\frac{\sum _{i}\left[\left(x\left(i\right)-mx\right)\left(y\left(i-k\right)-my\right)\right]}{\sqrt{{\varSigma }_{i}{\left(x\left(i\right)-mx\right)}^{2}}\sqrt{{\varSigma }_{i}{\left(y\left(i-k\right)-my\right)}^{2}}} , \left(1\right)$$
where \(mx\) and \(my\) are the corresponding means for signals \(x\left(i\right)\) and \(y\left(i\right)\). Function normalization is used meaning that \(-1\le r\left(k\right)\le 1\). For \(r\left(k\right)=1\), cross-correlation represents the maximum similarity between the template and the tested signal. For \(r\left(k\right)=0\), shows no similarities between the two signals. Negative values express symmetric similarity (negative image). Thus, the first step of the implemented algorithm determines the relevant window for the region that only contains ROIs which are present during the whole video’s duration. The second step uses this resulting window to perform video drift correction and output a new video with minimized interframe cell movement.
Since 340 nm and 380 nm videos result from one recording of a laboratory experiment over two different wavelengths, both videos will have the same artificial movement offset values, meaning that video drift correction will only be generated for one wavelength of the two (in SIGAA’s approach only for the 380 nm version) and the resulting offset values are then applied to the other wavelength video.
Thus, SIGAA first block uses the first frame of the video as a template versus each frame using normalized cross-correlation as in Eq. 1. This step will output a smaller image that will represent the significant window of the experimental acquired video; hence, this image will contain only the astrocytes that do not move out of the video focus during laboratory recording. Once the significant window is found, it will become the new template image for the second step of Eq. 1, again, versus the entire video. This second run will output interframe movement offset values that are then applied to both 340 nm and 380 nm videos to produce a new set of frames that, when aggregated back in order, result in new drift correction versions of the laboratory videos for the relevant window.
2.5. Block 2: Laboratory video analysis and function extraction
The second block is responsible for analysing the output drift correction videos from block one and generating Ca2+ functions for further analysis on block three. Thus, Block 2 detect and segment every visible astrocyte, with no human interaction. These segmented astrocytes are the ROI for brightness probing and function extraction. To achieve this segmentation, the system applies morphological reconstruction for the first frame of the input drift correction video.
Morphologic reconstruction [21–23] is applied between two images and a structuring element, which defines connectivity during the reconstruction process. It allows building an image from small components removing non-desired features while maintaining the initial shape of the present objects. The marker image is the starting point for the transformation. The mask image limits the transformation inside its contours. The basic reconstruction procedure\(R\left(F\right)\), starting on marker image \(F\left(k\right)\), with \(\text{k}=1\) is described on Eq. 2:
$$R\left(F\right)= \left(F\left(k\right)\oplus B\right)\cap G, \left(2\right)$$
where \(k\) represents the number of dilation necessary of F with \(B\), the structuring element until the reconstruction matches \(G\)’s limits. Dilation is a basic morphological operation that expands F borders based on the structuring element \(B\). SIGAA applies a speed-up version of the previous iterative algorithm, proposed and fully detailed in Vincent, 1993, to detect and segment detectable astrocytes on a given image.
Astrocyte morphology can be lost after ROI definition process, cell detection, and segmentation, therefore morphologic reconstruction cannot be performed using the ratio values between the two input experimental videos. This means that cell detection and segmentation can only be performed for either on 340 nm or 380 nm input video. Like video drift correction in block one, detection and segmentation need to be performed only on one of the input videos, since cell position is the same for both. In our case, Block 2 uses 380 nm drift correction video to perform astrocyte detection and segmentation.
Considering that astrocytes’ nuclei are mainly of rounded shape and because the accuracy of the reconstruction procedure depends on the similarity between the object shapes and the structuring element [22], [24] SIGAA uses an almost-circular structuring element for ROI reconstruction procedure. During system execution, after cell automated identification and segmentation, these ROIs are presented to the system operator for manual correction (if needed) and/or manual addition of new unidentified ROI by the system. This is the only (eventual) human interaction during runtime and helps avoid false positives for automatic cell detection. Once all automatic (and manual) defined ROI are approved by human interaction, SIGAA will run defined regions through the stabilized obtained 340/380 ratio video and extract Ca2+ evolution functions over time based on the mean pixel brightness value attained (Fig. 2). In this particular case, researchers studied the Cannabinoid type 1 receptor (CB1R)-mediated Ca2+ transients in astrocytes by incubating these cells with a specific CB1R agonist, Arachidonyl-2'-chloroethylamide (ACEA) [26]. To this end, the baseline was established in the first five minutes of the experiment and at 1200 seconds (20 minutes) ACEA was added and Ca2+ transients were detected. However, the time limits of the second segment can be edited directly in the MATLAB script. To confirm cell viability, at 2400 seconds (40 minutes), ionomycin salt (2 µM) was added to the medium, in which viable cells had a considerable increase in their intracellular Ca2+ [27]. These functions will constitute the block two’s output.
2.6. Block 3: Feature extraction
The third block takes as input the previously generated Ca2+ functions (second block output), and extracts a set of numeric features that are relevant for the specific experiment’s conclusions on astrocyte Ca2+ signaling characteristics: function baseline; the number of transients; the transient amplitude, and slopes; the transients rise/decay time; and inter-transient duration. All of these are extracted according to the defined features established previously by the user such as the basal end time estimation, minimum and maximum transient duration (Table 1).
However, before attempting to detect transients and extract features, it is important to understand the structure of the Ca2+ functions. Ca2+ concentration is measured by the ion Ca2+ ratio bound to fluorescent markers (340 nm) with the measure of the same markers that did not bound to Ca2+ (380 nm). Generated functions are divisible in three different segments (Fig. 2): a first segment for which Ca2+ concentration is roughly constant when the astrocyte is at resting state; a second segment caused by the drug administration phase which leads to substantial basal Ca2+ level variation and transients occurrence, with a stable increase corresponding to the function baseline; and the third segment with an accentuated increase of Ca2+ concentration, caused by the ionomycin salt. This last segment is not featured in the subsequent data analysis and can be cut off by incorporating it into the second segment. Feature extraction performed by SIGAA’s Block 3 focuses on the second segment of the Ca2+ functions. The time boundaries of these segments are manually defined by the research team since they depend on the substance administration signature.
In the event of an increasing baseline, baseline functions are estimated by Lagrange polynomial interpolation [28], for the input Ca2+ functions over the first and second segments. The polynomial order is defined empirically and is manually adjustable if needed. This baseline function is then subtracted to the Ca2+ function (Fig. 3), allowing to better distinguish function transients after substance administration. This feature can be switch on or off according to the user (Table 1).
After baseline subtraction, SIGAA’s third block can apply noise reduction. If the user feels that the use of filter interferes with signal in a substantial manner, they can choose to switch off this part of the block (Table 1). The noise reduction is performed by using a moving average filter described by Eq. 3:
$$r\left[n\right]=\frac{1}{M+1}\sum _{m=-M/2}^{M/2}s\left[n-m\right], \left(3\right)$$
where \(r\left[n\right]\) are the output signal and \(s\left[n\right]\) the input signal (in this case, Ca2+ function subtracted by the baseline function) and \(M=4\) is the filter order.
Function transients represent the astrocyte’s response to the administrated substance during laboratory testing and are distinguishable as higher amplitude peaks on the Ca2+ function signal, after baseline subtraction and noise reduction steps. Transients are very important for the Ca2+ signaling study of cells, hence, SIGAA’s final output is a set of numerical features based on these function peaks. Transient identification is automated by the system’s third block using Eq. 4:
$$th=\stackrel{-}{r}+marge*{\sigma }_{r}, \left(4\right)$$
as a sequence of adjacent function points with a value above a threshold (\(th\)), defined as the function’s mean (\(\stackrel{-}{r}\)) estimated during the second segment, added by a factor \(marge\) of its standard deviation (\({\sigma }_{r}\)) for the same segment.
Once all cells (Fig. 4), and subsequently all transients are identified, the system will estimate a set of numeric features to allow for experiment conclusions, being these features outputted as SIGAA’s result in an Excel spreadsheet (.xls format). There are 7 spreadsheets with Ca2+ transient information: (1) transient amplitude: amplitude of each transient for the selected cells (Fig. 4); (2) non-zero amplitudes: transients amplitudes of all responding cells; (3) transient slopes: Rise and decay slopes of each transient; (4) duration of the transient rise and decay: Rise and decay duration of each transient; (5) time between transients: time between consecutive transients; (6) transient starting time: starting time of each transient, and; (7) transient duration: duration of each transient. Beyond this, an additional sheet is included with the 5 minutes slope of the Ca2+ function per cell through the whole experiment. As an exemple the transient amplitude spreadsheet is shown in the Fig. 4 (bottom panel), where columns 1 to n corresponds to the n selected astrocytes. The first row corresponds to the transient frequency of occurrence, and the remaining rows correspond to the transients amplitudes, respectively. Moreover, the final column of the amplitude spreadsheet contains system setup parameters, namely: (1) marge, (2) on/off baseline compensation, (3) start time, (4) minimum transient duration, (5) maximum transient duration and (6) baseline estimation polynomial order. In the other spreadsheets, similarly to the first one, each column corresponds to the identified astrocytes, and the parameters of each astrocyte are presented in the following rows.
Table 1
Description of the script set up parameters
Set up Parameters
|
Description
|
Marge
|
Marge value to detect transient (Eq. 4)
|
On/Off baseline compensation
|
1 - Use baseline compensation before transient detection.
0 – do not use baseline compensation before transient detection.
|
Basal end time statistic estimation
|
Mean and standard deviation estimation (Eq. 4) is estimated between 0 and this parameter that represents the basal condition (in seconds).
|
Minimum transient duration
|
Minimum transient duration (in seconds) to detect transients.
|
Maximum transient duration
|
Maximum transient duration (in seconds) to detect transients.
|
On/Off noise reduction
|
use noise reduction (Eq. 3) before transient detection. 0 – do not use noise reduction before transient detection.
|
Baseline estimation polynomial order
|
Order of the baseline polynomial estimation.
|
Overall, Ca2+ function extraction can be fully automated in a few minutes, for multiple cells. As an exemple, in Fig. 4 is represented an output spreadsheet containing the transient amplitudes. In this experiment, 10 astrocytes were studied, and the first raw display the transient frequency of occurrence. Two transients were identified for the first and sixth cell, one transient for the third cell, and four transients for the fifth cell, while the second and fourth cells had no function transients identified, which can suggest no cell reaction to the possible drug tested in these cells.