Neuro-Imaging Data An Introduction
Brain occupies space and we can collect data on how it fills space, which is called called volume data. All the volume data needed to create the complete, 3D image of the brain, recorded at one single timepoint is called a volume. The data is measured in voxels, which are like the pixels used to display images on your screen, only in 3D. Each voxel has a specific dimension, with it being the same dimension from all sides (isotropic) and contains one value which stands for the average signal measured at the given location. A standard anatomical volume, with an isotropic voxel resolution of 1mm contains almost 17 million voxels, which are arranged in a 3D matrix of 256 x 256 x 256 voxels. As the scanner can’t measure the whole volume at once it has to measure portions of the brain sequentially in time. This is done by measuring one plane of the brain (generally the horizontal one) after the other. The resolution of the measured volume data, therefore, depends on the in-plane resolution (the size of the squares in the above image), the number of slices and their thickness (how many layers), and any possible gaps between the layers. The quality of the measured data depends on the resolution and the following parameters:
-
Repetition time (TR): time required to scan one volume
-
Acquisition time (TA): time required to scan one slice. TA = TR - (TR/number of slices)
-
Field of View (FOV): defines the extent of a slice, e.g. 256mm x 256mm
Specifics of MRI Data
MRI scanners output their neuroimaging data in the DICOM format, a common and standardized raw medical image format which most analysis packages cannot work with. The most frequent format for newly generated data is called NIfTI. MRI data formats will have an image and a header part. For NIfTI format, they are in the same file (.nii-file), whereas in the older Analyze format, they are in separate files (.img and .hdr-file). The image is the actual data and is represented by a 3D matrix that contains a value (e.g. gray value) for each voxel. The header contains information about the data like voxel dimension, voxel extend in each dimension, number of measured time points, a transformation matrix that places the 3D matrix from the image part in a 3D coordinate system, etc.
Modalities of MRI Data
There are many different kinds of acquisition techniques. But the most common ones are structural magnetic resonance imaging (sMRI), functional magnetic resonance imaging (fMRI) and diffusion tensor imaging (DTI).
sMRI (structural MRI)
Structural magnetic resonance imaging (sMRI) is a technique for measuring the anatomy of the brain. By measuring the amount of water at a given location, sMRI is capable of acquiring a detailed anatomical picture of our brain. This enables us to clearly distinguish between various tissue types, such as gray and white matter, where the white matter structures are visible in bright colors and the gray matter structures are observed in dark colors. High-resolution images of the brain’s structure are utilized as reference images for a variety of processes, including segmentation, surface reconstruction, corregistration, and normalization. As the anatomy is not supposed to change while the person is in the scanner, a higher resolution can be used for recording anatomical images, with a voxel extent of 0.2 to 1.5mm, depending on the strength of the magnetic field in the scanner, e.g. 1.5T, 3T or 7T.
fMRI (functional MRI)
Functional magnetic resonance imaging (fMRI) is a technique for measuring brain activity by detecting the changes in blood oxygenation and blood flow that occur in response to neural activity. The brain requires a lot of energy to maintain its functioning, and as a region becomes more active, more oxygen, which is delivered by the blood, will be used locally. As a result, greater function causes more blood to flow to the area that uses the most energy. Due of the local energy expenditure following brain activity, there is an initial decline in blood oxygen levels. An increase in the flow of fresh, oxygen-rich blood in the direction of the area that needs the most energy occurs next. The blood oxygen level peaks after 4–6 seconds. The signal again falls and often undershoots until no more neural activation occurs before increasing once more to the baseline level. The blood oxygen level is exactly what we measure with fMRI. The MRI Scanner is able to measure the changes in the magnetic field caused by the difference in the magnetic susceptibility of oxygenated (diamagnetic) and deoxygenated (paramagnetic) blood. The signal is therefore called the Blood Oxygen Level Dependent (BOLD) response. Because the BOLD signal has to be measured quickly, the resolution of functional images is normally lower (2-4mm) than the resolution of structural images (0.5-1.5mm). But this depends strongly on the strength of the magnetic field in the scanner, e.g. 1.5T, 3T or 7T. In a functional image, the gray matter is seen as bright and the white matter as dark colors, which is the exact opposite to structural images.
fMRI designs
- Event-related design
- Event-related refers to the administration of brief stimuli to the individuals while they are being scanned. The stimuli are often given in random order and for very brief periods of time. The majority of the time, stimuli are visual, but they can also be audio or other reasonable stimuli. Hence, the BOLD response will consist of brief bursts of activity that will appear as peaks.
- Block design
- A block design occurs when several similar stimuli are presented in a block, or phase, of 10–30 seconds. With such a design, the BOLD signal peak is elevated for a longer time rather than just briefly, which results in a plateau on the graph. This facilitates the identification of an underlying activation rise.
- Resting-state design
- In the absence of stimulation, data is collected using resting-state approaches. In the scanner, subjects are instructed to stay still and rest without dozing off. Such a scan aims to capture brain activity when there is no external task being performed. This can be done to examine the functional connectivity of the brain on occasion.
dMRI (diffusion MRI)
Diffusion imaging is done to obtain information about the brain’s white matter connections. There are multiple modalities to record diffusion images, such as diffusion tensor imaging (DTI), diffusion spectrum imaging (DSI), diffusion weighted imaging (DWI) and diffusion functional MRI (DfMRI). One can deduce information about the underlying structure of a voxel by observing the diffusion trajectory of the molecules (often water) within the voxel. For instance, in a voxel with largely horizontal fibre tracts, water molecules will primarily travel horizontally because they are prevented from moving vertically by the neural barrier. Diffusion can be measured in a variety of ways, including by mean diffusivity (MD), fractional anisotropy (FA), and tractography. Several insights into the neuronal fibre pathways of the brain can be gained from each measurement. As a relatively new area of MRI, diffusion MRI currently struggles to accurately detect fibre tracts and their underlying orientation. Visit the Diffusion MRI article on Wikipedia to learn more about this technique.
Image processing
Images are the foundation of neuroimaging, and the majority of neuroimaging researchers use brain images as their primary source of information. Here, we’ll provide a general overview of image processing so that you can gain an understanding of the kind of things you might consider while performing image processing in greater detail, such as picture segmentation and image registration. Even if you finally want to use specialised off-the-shelf software tools for these operations rather than creating them yourself, having a thorough understanding of these operations should still be beneficial to you. They are particularly prevalent in the analysis of neuroimaging data.
Images are arrays
Numpy arrays can be used to represent neuroimaging objects. However, one feature that sets images apart from other types of data is the critical role that spatial relationships play in the understanding of images. This is so because adjacent areas of an image frequently represent objects that are situated close to one another in reality. These neighbourhood relationships should be used by image processing techniques. In contrast, there are times when these neighbourhood relationships impose limitations on the operations that can be performed on the images because we want to preserve these neighbourhood links despite subjecting the image to numerous transformations.
Images can have two dimensions or more
We typically think of images as having two dimensions, because when we look at images, we are usually viewing them on a two-dimensional surface: on the screen of a computer or a page. Some images, however, have more than just two dimensions. For instance, we are typically interested in the complete three-dimensional representation of the brain when evaluating brain imaging. This implies that brain representations are typically three-dimensional, if not more. Once more, this is acceptable by our definition of an image. It is acceptable for spatial interactions to span more than two dimensions as long as they are significant and meaningful to the research.
Image segmentation
Here we are going to look at image segmentation. Image segmentation divides the pixels or voxels of an image into different groups. For example, you might divide a neuroimaging dataset into parts that contain the brain itself and parts that are non-brain (e.g., background, skull, etc.). Broadly speaking, segmenting an image enables us to identify the locations of various items and enables us to individually investigate portions of the image that include certain things of interest. We don’t want to examine the voxels that include the subject’s skull or the ventricles, for instance. We must divide the image into the brain and non-brain in order to be able to select only the voxels that are in the brain proper. There are several methods for solving this issue.
Intensity-based segmentation
Using the distribution of pixel intensities as a segmentation foundation is the first and most basic method of segmentation. The areas of the image that the brain occupies, for example, are brighter and have greater intensity values. The background-containing areas of the image are black and have low intensity levels. Using a histogram is one method of viewing the intensity levels in the image. To achieve this, just flatten the picture array’s representation, which collapses the two-dimensional array into a one-dimensional array.
Otsu’s method
A classic approach to this problem is now known as “Otsu’s method”, after the Japanese engineer Nobuyuki Otsu, who invented it in the 1970s. The approach is based on a simple idea: identify a threshold that reduces the variation in pixel intensities within each class of pixels. This rule is based on the notion that pixels inside each of these segments should be as dissimilar from one another and as similar to one another as feasible. The “intraclass variance,” or overall variation in pixel intensities inside each class, is what this strategy seeks to decrease. There are two parts to this: The first is the variance of background pixel intensities, which is weighted by the percentage of the image that is in the background. The other is the variation in foreground pixel intensities, which is weighted by how many pixels are in the foreground. Otsu’s technique uses the following steps to determine this threshold value: Find the candidate threshold that has the lowest intraclass variance by calculating the intraclass variance for each potential value of the threshold. The variance of intensities among the foreground pixels makes up the foreground contribution to the intraclass variance. The variation of the intensities in the background pixels, multiplied by the quantity of background pixels, is the background contribution to the intraclass variance (with very similar code for each of these). The intraclass variance is the sum of these two. After running through several candidates, the value stored in the threshold variable will be the value of the candidate that corresponds to the smallest possible intraclass variance.
Edge-based segmentation
Threshold-based segmentation makes the assumption that various portions of the image that should belong to various segments should have different pixel value distributions. However, this method does not benefit from the image’s spatial arrangement. Another method of segmentation makes use of the fact that edges typically divide portions of a picture that should be divided into multiple segments by edges. What is an edge? usually, edges are contiguous boundaries between parts of the image that look different from each other. These differences can differ in texture, pattern, intensity, and other aspects as well. Finding edges and segmenting the image are somewhat like a chicken and egg situation because you wouldn’t need to segment the image’s many components if you knew where they were. However, in practice, performing the segmentation using algorithms that concentrate primarily on locating edges in the image can be helpful. Finding edges in images has been an important part of computer vision for about as long as there has been a field called computer vision. This can be used by sophisticated edge detection algorithms, along with a few more stages, to more reliably locate edges that extend in space. One such technique bears the name of its creator, computer scientist and computer vision researcher John Canny: the Canny edge detector. The algorithm performs a number of operations, such as removing noise and small areas from the image by smoothing it, identifying the local gradients of the image (for instance, using the Sobel filter), thresholding the image, and then choosing edges that connect to other strong edges and suppressing edges that connect to weaker edges.
Registration
Another major topic is registration of two images that contain parts that should overlap with each other. The key is to identify a way to quantify how aligned the two images are to each other and how to imporove the alignment. To measure if two images are aligned it is necessary to create an alignment measure. These measures are often called cost functions. Depending on the sorts of images being aligned, there are numerous distinct cost function types. Similar to how regression lines are fitted to minimise departures from the observed data, one frequent cost function is known as minimising the sum of squared differences. The photos should be of the same type and have about equal signal intensities for this measurement to be effective.
Affine registration
The first kind of registration corrects for changes between the images that affect all of the content in the image. When it comes to brain imaging, an overall change in the brain’s position is typically caused by the person moving. By performing a variety of transformations on the image, including scaling (zooming in or out), shearing, rotating, translating the entire image up or down, left or right, or clockwise or anticlockwise, an affine registration can correct for overall disparities across images. While the majority of these are simple to comprehend, shearing is a little more complicated: picture shearing describes how various sections of the image move to various degrees. In one illustration of a horizontal shear, the top row of pixels doesn’t move at all, whereas the second row and subsequent rows move by varying amounts. If there is greater shear, succeeding rows of pixels pass by more often as we progress down the image.
Diffeomorphic registration
Global registration approach does well in registering the overall structure of one image to another, but it doesn’t necessarily capture differences in small details. Different components of the image are registered independently by another family of registration algorithms. Theoretically, every pixel in the initial image can move independently to any place in the second image. Nevertheless, adopting this open-ended method, where you can transfer every pixel in one image to any spot in the second image, you have replaced the images rather than registered them to one another. An approach that strikes a balance between this flexibility and limitations is diffeomorphic registration. Every pixel or voxel in the moving image might theoretically be moved to overlap with any pixel or voxel in the static image, but adjacent pixels/voxels are limited to moving by an equal distance. This means that there are smooth spatial variations in the mapping between the moving and the static image.