1 Introduction

Overall, the nervous system comprises, into two parts: the Central Nervous System (CNS) and the Peripheral Nervous System (SNP). The central nervous system consists of the brain and spinal cord. The brain has long connections between them that make up the white matter and gray matter (Fig. 1).

Fig. 1
figure 1

Brains Segmentation

White matter is 60% of the brain, they are myelinated nerve fibers (axons) protected by a myelin sheath that provides electrical isolation processes that allow nerve signals to be transmitted faster [1, 2]. Neural networks created in white matter, help in the process of memory, learning, cognitive processes and the development of intelligence [3,4,5].

In neuroscience, a tractography is a non-invasive, in vivo 3D modeling technique used to visually represent nerve tracts using data collected by diffusion MRI (MRI-DWI). It provides the necessary information to analyze of nerve fibers (tracts) qualitatively and quantitatively, reproducing their volume and direction. Tracts are not directly identifiable; hence, experts must use image processing techniques to detect them, see Fig. 4.

DTI (Diffusion Tensor Imaging) Tractography uses diffusion tensor data and allows 3D visualization of specific white matter tracts.. Diffusion tensor by white matter can detect the orientation of axons and the magnitude or degree of anisotropy [6,7,8,9]. Diffusion is also known as Brownian motion, defined through eq. 1 as follows:

$$ {\boldsymbol{r}}^{\mathbf{2}}=\mathbf{6}\boldsymbol{Dt} $$
(1)

where r2 refers to the mean square displacement of molecules, t is the diffusion time, and D is the diffusion constant, a constant of proportionality for the particular substance being measured, in this case the hydrogen atom.

The Diffusion tensor vector matrix is a 3 × 3 matrix. Can relate to signal strength weighted by diffusion, S, and the intensity of the signal b 0 s / mm2, S0, described with Eq.2:

$$ \frac{\boldsymbol{S}}{{\boldsymbol{S}}_{\mathbf{0}}}={\boldsymbol{e}}^{-\left({\sum}_{\boldsymbol{i}=\boldsymbol{x},\boldsymbol{y},\boldsymbol{z}}{\sum}_{\boldsymbol{j}=\boldsymbol{x},\boldsymbol{y},\boldsymbol{z}}{\boldsymbol{b}}_{\boldsymbol{i},\boldsymbol{j}}{\boldsymbol{D}}_{\boldsymbol{i},\boldsymbol{j}}\right)} $$
(2)

where

$$ {\boldsymbol{b}}_{\boldsymbol{i},\boldsymbol{j}}={\boldsymbol{\gamma}}^{\mathbf{2}}{\boldsymbol{G}}_{\boldsymbol{i}}{\boldsymbol{G}}_{\boldsymbol{j}}\left[{\boldsymbol{\delta}}^{\mathbf{2}}\left(\Delta -\frac{\boldsymbol{\delta}}{\mathbf{3}}\right)\right] $$
(3)

where bij comprises the direction and magnitude of the applied gradient vector diffusion (Gx, Gy, Gz).

Isotropy refers to the freedom with which water molecules move through tissues. More obstacles decrease isotropy (anisotropy), but when water molecules move freely, isotropy levels are high. Isotropy values range from 0 (no isotropy, much hindered movement) to 1 (total isotropy, free movement). Anisotropy can be measured in multiple ways, including fractional anisotropy (FA). An anisotropy of 0 corresponds to a perfect sphere, while 1 would be an ideal linear diffusion. Well-defined tracts have a FA greater than 0.2, there are few regions with higher FA (i.e. 0.9). Each isotropy is linked to a predominant orientation axis (predominant direction of diffusion).

DTI evaluates two parameters, among others:

  • Fractional anisotropy (FA), measures the direction of diffusion and detects white matter lesions

  • Average diffusivity, measures the extent of diffusion and is sensitive to ultrastructural damage in white matter.

Our algorithm provides a post-processing directional information of the image to obtain a matrix relationship in a brain atlas. This characteristic is important, since the brain is not formed by modular structures that function in isolation but rather by distributed neural networks that connect different regions and integrate them into broad functional networks (i.e. neural connectivity), which we call neuronal connectivity, where, the integrity and correct functioning of the white matter (axons, tracts) is essential for the normal development of any cognitive process. Tracts allow communication between gray matter and other body parts. They transmit information from different parts of the body to the cerebral cortex and enable different brain regions involved in cognition to connected (i.e. brain connectivity). Tracts are not directly involved in the cognitive process itself, but they still play role by allowing the different brain regions involved in cognition to remain connected. Consequently, information flows at an appropriate speed. In conclusion, changes in the white matter can cause changes in cognitive ability [10, 11].

Brain connectivity refers to a pattern of anatomical relationships between areas within a nervous system. The units correspond to individual neurons, neuronal populations, or anatomically separate brain regions. In fact, intuitive solutions to problems arise when the brain gets more intense connectivity between its two hemispheres. Cooperation between both hemispheres increases mental performance, that is, the ability to actively support the memory-learning process for longer, with greater productivity and more efficiently. Analyzing brain connectivity, including differentiating connectivity by gender [12], is crucial to understanding neurons and their information process in the network [13,14,15].

The aim of this paper is to represent two-dimensionally and three-dimensional brain connectivity in all brain areas through an algorithm developed in MatLab (https://www.mathworks.com/).

2 Methodology

We followed the methodology depicted in Fig. 2 to create connectivity matrix that provides statistical data on structural relationship In order to carry out the connectivity matrix that provides statistical data on the structural relationship between two brain areas of interest (i.e. pattern of anatomical relationships between different units within a nervous system).

Fig. 2
figure 2

Methodology flowchart. Use of diffusion tensor imaging to evaluate brain connectivity

2.1 Brain atlas

Brain atlases are one of the most effective ways to accurately locate anatomical and functional structures in patients.

Brain atlas used is the AAL (Automated Anatomical Labeling) with 116 structures [16, 17]. In order to separate structures we proceed as shown in Fig. 3, the intensity of each pixel in the original image (116 intensity) 116 will separate structures. Intensity levels determine the structure to which it belongs.

Fig. 3
figure 3

Brain Atlas AAL Registration with MRI

2.2 Tractography

Tractography determines the directional pattern of diffusion tensor imaging using an “anisotropic map” on a 3D coordinate system in which the color represents the direction, given the difficulty of representing 2D grayscale images. See Fig. 4.

  • Red indicates directions in the X axis: right to left or left to right.

  • Green indicates directions in the Y axis: posterior to anterior or from anterior to posterior.

  • Blue indicates directions in the Z axis: foot-to-head direction or vice versa.

Fig. 4
figure 4

Data visualization (anisotropy map)

To separate tracts we proceed with the reading of trk file (trackvis, with the implementation of an algorithm in MatLab), where you can see that our algorithm obtains the same results as the commercial as shown in Fig. 5.

Fig. 5
figure 5

TrackVis vs algorithm development

2.3 Algorithm

A network is defined by a set of nodes and links between pairs of nodes. Large brain networks whereas links represent the anatomical, functional, or effective connections, according to the data set. Our algorithm implemented with MatLab looks for the areas and ROIs involved as connectivity between tracts. This process can be defined as follows:

  1. 1.

    trk file properties retrieved; the trk file is a binary file, with the first 1000 bytes of the header and the rest as the body.

  2. 2.

    Each scalar properties tract are defined from the trk file, in order to differentiate them from the matrix.

  3. 3.

    Tract structures are loaded. T = tract number

  4. 4.

    The total size of the tract is read.

  5. 5.

    ROIs (areas of interest, brain atlas) R = number of ROI is read

  6. 6.

    Tx vs Rx is evaluated

  7. 7.

    Connectivity matrix is obtained

Table 1 shows the obtained connectivity matrix representing Fig. 6. These results were validated with Trackvis with identical results. UCLA_Multimodal_Connectivity_Package https://www.ccn.ucla.edu/wiki/index.php/UCLA_Multimodal_Connectivity_Package

Table 1 Connectivity matrix, symmetric square matrix 116 × 116
Fig. 6
figure 6

Brain Atlas Connectivity Matrix. 116 × 116 areas

3 Results

Our connectivity matrix provides statistical data on structural relationship between two areas of interest (pattern relationships between different units within a nervous system). This research proposes a tool to help medical professionals quantitatively validate the results of a therapy treatment or cognitive-motor treatment. As seen in Fig. 6, our algorithm calculate the points of the structure tract so that they can validate the area of interest (ROI),

The first part of the results shows the connectivity among the 116. The second part shows the segmentation results of specific areas (ROI1, ROI2, ROI3, ROI4, ROI5) as chosen by users, and the connectivity among them.

3.1 First part

Our algorithm shows the connectivity matrix between each and every areas of the AAL brain atlas. The area less connected to other areas is 108 Cerebelum_10_R, whereas the most connected area is 31 Cingulum_Ant_L.

The connectivity matrix shows areas from the brain atlas are more connected to another. As depicted in Fig. 7 and according to our matrix results, area 108 has the least connectivity with the other areas, namely 3 of 116 (98,100,106). Conversely, area 31 showed the highest connectivity with other areas, namely 23 of 116.

Fig. 7
figure 7

Connectivity between areas

Areas with more tracts involved in connectivity are shown in Fig. 8. As can be observed, 99. Cerebelum_6_L, provides the greatest total number of tracts involved. Conversely, Cerebelum_3_L, provides the least total number of tracts involved.

Fig. 8
figure 8

Connectivity by tracks qty. Most vs less representative

3.2 Second part

Our algorithm can group interest areas designed by the user and not necessarily a square matrix, i.e.:

$$ {\displaystyle \begin{array}{l}\mathrm{ROI}1=\mathrm{AAL}1+.\dots +\mathrm{AA}\mathrm{L}10,\\ {}\mathrm{ROI}2=\mathrm{AAL}57+\mathrm{AA}\mathrm{L}72,\\ {}\mathrm{ROI}3=\mathrm{AAL}59+\mathrm{AA}\mathrm{L}81+\mathrm{AA}L82\end{array}} $$
  • There can be no connectivity between ROI1 - ROI2 –ROI3-ROI5 with t_4. See Fig. 9 and Table 2.

  • The greatest connectivity according to this example is ROI_2 with t_5. See Fig. 9 and Table 2.

Fig. 9
figure 9

Connectivity matrix non square. Specific ROI vs especific Track

Table 2 Nonsquare matrix connectivity nonsymmetrical

Table 2 and Fig. 9 introduce our conectivity matrix. As Fig. 9 despicts, t_5 is the hihest connectivity tract, where 90% of connectivity is in ROI_2 and 10% is in ROI_4.

4 Conclusion

Brain signal and image acquisition techniques have evolved, thus becoming essential tools for diagnosis and research in neurosciences. Some of the most important applications in connectome have been developed in the field of Education, neuronal connectivity and the changes experienced by the brain through experience are part of brain plasticity or synaptic plasticity (neuronal connectivity) that makes learning possible.

The structural connectome provides relevant information on experience and training-related changes in the brain. Much of what is currently in know of brain connectivity and operation in distributed neural networks has come from the hand of neuroimaging, specifically DTI technologies. DTI-based tracktography makes great contributions to the study of the structure and functionality of axons.

Tracts allow communication between gray matter and other body parts, it sends information from different parts of the body to the cerebral cortex. Even though tracts are not directly involved in the cognitive process itself, they allow different brain regions involved in cognition remain connected. Consequently, information flows rapidly. Track integrity and its proper operation is essential for the normal development of cognitive functions (e.g. attention, memory, ultimately, for any cognitive process).

DTI applies to any condition that is likely to create an anomaly in the tracts, such as multiple sclerosis, Alzheimer, mild cognitive impairment or simply normal aging. Tractography by diffusion tensor calculus is the only method available today to evaluate cerebral white matter tracts in vivo. This field (tractography) opens a range of possibilities, especially for mental disorders that have traditionally been considered as lacking a structural brain base. Analyzing of the effects of brain damage on cognition helps to understand these anatomical and functional relationships, noting the many ways that can disintegrate cognition. Finally, neuroimaging technologies remain promising alternatives for solving important questions in neuroscience.