4. DESARROLLO EXPERIMENTAL
4.8 PRUEBA PILOTO DE LA FORMULACIÓN
patient-specific contacts mask; and the clustering of the voxels representing the contacts, together with the computation of the centres of mass of these clusters.
The visual inspection of Figure 3-2 shows that the icEEG contacts can be detected in the CT image (where they appear as approximately spherical groups of the highest intensity voxels), by thresholding its intensity; but not in the T1 weighted structural image (where they appear as the lowest intensity voxels and are hardly distinguishable from the CSF or head-surrounding space voxels). Hence, the CT image was used to create the contacts mask, which was later co- registered in the T1 and/or EPI spaces, when necessary.
Figure 3-2 Example of CT and T1 images. Blue arrow highlight icEEG contacts. Red arrow
highlights a group of high intensity voxels that it is not a icEEG contact.
The contacts mask was created by thresholding the intensity of an up-sampled version (0.5 millimetres axial slice thickness) of the original CT (1 millimetre axial slice thickness), in order to isolate the voxels with the highest intensities (contact-voxels) from those with the lowest intensities (head tissues, CSF, and head-surrounding space). The intensity of the contact-voxels was kept the same, and that of the remaining voxels was set to zero. The threshold value was chosen by trial-and-error, so that all contacts were represented by a group of voxels that was large enough to be detected even after the eventual co-registrations. Note that the intensity of
CT image
T1 image
P A R L R L
P A R L R L
IcEEG contacts
the contact-voxels in the CT image can differ from patient to patient, probably due to differences in the implantation scheme (type and number of contacts, geometry).
The next step was to cluster the contact-voxels and find the coordinates of the centres of mass (CM) of these clusters. Since the exact number of contacts is not known a priori6, and a prior of their spatial distribution is not available, classical clustering algorithms (such as k-means and mixture of Gaussians, for example) are not useful. Therefore, I had to design a clustering algorithm, which does not require any prior information regarding the number of contacts or their positions, and is suitable for either strip/grid or depth electrodes. This clustering algorithm consists of the following steps (see Figure 3-3 for an illustration):
(1) Computing the distances between each and every other contact-voxel (N contact-voxels; thus, N-1 distances for each contact-voxel, i.e. N*(N-1) total). Sorting these distances, for each contact-voxel, to find its nearest neighbours, which we defined to be the contact-voxels that are at most 4 mm 7 (or 3 mm, for some depth contacts) apart from it. Forming clusters composed of each contact-voxel and its nearest neighbours.
(2) Finding the coordinates of the CM of every cluster and aggregating the CM with equal coordinates, therefore reducing the dimension of the problem. Note that the group of contact- voxels illustrated in Figure 3-3 at the top right corner of the grey square, for example, results in 4 clusters, one per contact-voxel, which have, however, the same exact CM; therefore, these 4 CM are truly a unique CM. The resulting CM become the new contact-voxels.
Figure 3-3 Illustration of the clustering algorithm designed by me to find the coordinates of the
icEEG contacts. In this example, the final solution (i.e. coordinates of the contacts) is found after two iterations8.
6 Note that we know how many icEEG contacts were implanted in each patient, but it may be impossible to preserve all of them after the first steps; some may not survive the thresholding / co-registration steps, or be spurious (see red arrow in Figure 3-2).
7 The distance between two consecutive contacts is 5 or 10 mm, depending on the type and position of the electrode. By trial-and-error, we found that 4 mm was a good distance to start with in the cases where the original distance between 2 consecutive contacts was 10 mm, while 3 mm was a good distance to start with in the cases where the distance between 2 consecutive contacts was 5 mm.
8 Despite finding the final solution after two iterations, the algorithm will run until the size of the clusters matches the size of the voxel of the image, i.e., the position of the centre of the contacts will not change in the following iterations but the radius of the clusters will keep decreasing.
contact-voxel 4mm 3.75mm contact centre
… (1) (1stiteration) (2) (1stiteration) (2) (2nditeration) (1) (2nditeration)
(3) Repeating the previous steps, decreasing, each time, the diameter of the cluster in 0.25 mm. Iteratively, this will lead to a unique set of coordinates {x,y,z} per contact, which represents its centre.
Once the coordinates of every contact were known, the contacts were plotted in a 3D representation, and visually labelled using the patient’ implantation scheme (see Table 5-I and
Table 6-II) and clinical notes as reference.
For this work, the contacts mask was, first, co-registered in the T1 space, and, then, in the EPI space, and the clustering step was done in the EPI space. For a collaborative project (related to functional connectivity analyses in icEEG and BOLD data), the contacts mask was only co- registered in the T1 space, and the clustering step was done in the T1 space. The co- registrations were done using the SPM12 toolbox (www.fil.ion.ucl.ac.uk/spm/software/spm12/), and the nearest neighbour criterion to resample (write) the images.
4
This project was focused on simultaneously recorded icEEG and fMRI data, essential to investigate ongoing icEEG phase and amplitude fluctuations, or event-by-event sharp wave morphological and spatial field extent variations, which were the EEG features of interest of the two studies described in Chapters 5 and 6. As discussed in § 2.5, the icEEG signal simultaneously recorded with fMRI is corrupted by artefacts caused by the switching of the gradient and, in some cases, by mechanical vibrations of the MR scanner (internal scanner ventilation and/or cooling compression pump systems; see § 2.5.2). Since the quality of the icEEG signal may affect the accuracy of the estimation of the EEG features of interest, this work started with the characterisation of the artefacts corrupting the icEEG data, as well as some exploratory investigations towards improving the quality of these data.