Combined MR brain segmentation

The paper presents a new approach to segmentation of brain from the MR studies. The method is fully automated, very eﬃcient, and quick. The main point of this algorithm is subtraction of T1 series form T2 series (therefore we called it combined), followed by a few image processing steps. The method has been tested using the data sets from three sources. The results were compared numerically to those produced by experts. They indicate great eﬀectiveness of the presented algorithm.


Introduction
Segmentation is the process of partitioning a digital image into multiple regions (sets of pixels). The goal of segmentation is to simplify and/or change the representation of an image into something that is more meaningful and easier to analyze. Image segmentation is typically used to locate objects and boundaries (lines, curves, etc.) in images.
The result of image segmentation is a set of regions that collectively cover the entire image, or a set of contours extracted from the image. Each of the pixels in a region is similar with respect to some characteristic or computed property, such as color, intensity, or texture. The adjacent regions are significantly different with respect to the same characteristic(s) [1].
This operation, as one may notice, plays a very important role in medical image processing. For example directly by physicians for diagnostic purposes or surgery planning and indirectly by software developers who often use segmentation as a mid-step in more complex operations.
The method, presented in this article, was designed and developed in accordance to our needs, as a part of our research into perfusion analysis in brain. Therefore it is based on methodology of study acquisition used in hospitals we are cooperating with.

Segmentation method
The presented method, at this point, works in the axial plane and requires T1 and T2 axial series, of the same part of brain, to be present in the MR study. The algorithm is divided into several stages, as shown in Fig. 1. It uses two data sets, first, a T1 series and second, T2 series. Each of them covers a certain part of brain, as stated in a DICOM header. From this header information on slice location in space is obtained. Generally, in hospitals we cooperate with, studies are carried out a manner which ensures that slices, in a different series are in the same location.
The information from both series is used to produce a general segmentation mask for a given study. This mask can be then used with each series in a study.  This is a preliminary stage which is applied to both T1 and T2 series. Its purpose is to remove all background noise from images. By noise, in this case we understand all the "static" that can by observed outside the body tissues. The best way to get rid of it, is to apply a simple thresholding operation to each slice in the display set. To choose which frequencies should be removed we analyzed the histograms of those slices. Generally, they have a shape as shown in Fig. 2. The high peak on the left side of the plot represents numerous low frequency pixels of the background (also meninges between the brain and the bone-skin tissues). They are followed by the minimum denoted as t b in Fig. 2. Next is the rest of the image data. Therefore tb is the best place to set the end of the thresholding range. Range, of course, starts with 0 intensity.
The method for finding this local minimum is rather straightforward. Considering the average shape of the histogram plot, this minimum is always located in the first 1/5 part of the diagram. For this part it is a local minimum.

Noise removal.
This is a simple filtering operation, which removes remaining single pixels from the image.

Series fitting.
As mentioned before, in most cases T1 and T2 series are acquired at the same patient position. However, in a few cases it is different. In such cases it is necessary to transform one data set to match the other. To detect a situation where the position of the patient is different in two needed series, symmetry planes [2] are found for both of them and compared. Next one of the series is rotated (and translated if needed) to fit the second.

Anatomy based data subtraction.
This operation is a center point of the whole algorithm, when two series are subtracted. To be precise, T1 series are subtracted from T2 series. However, we must remember that brain is a complex structure and simple subtraction of one voxel from another will do us no good. (Our main goal is to obtain a contour of the brain as accurate as it is possible.) The first look at a T2 MR brain slice gives us very important information. Gray matter (which lies on the surface of the brain) is very well produced as high intensity voxels. Those voxels will form a brain contour -our goal -in the next steps of the algorithm. Of course, anatomic structure of the brain differs in different parts of the brain. Therefore we must make subtraction aware of brain anatomy details. To accomplish this we have divided brain into several regions, according to how tissues are distributed on a given slice. Fig. 4 shows those regions. For each region a ratio was chosen, on the empirical basis (through the subtraction analysis for several studies).
Pobrane z czasopisma Annales AI-Informatica http://ai.annales.umcs.pl Data: 05/04/2022 22:41:35 U M C S Fig. 4. Region distribution throughout the brain volume. For each region its ratio is given along with its size. Size is provided as a fraction of the whole brain data height and width.
During subtraction, voxels in each region are treated differently, according to the formula: T 1 is a voxel in the region R of T1 image, and ratio R is a ratio for the region R.
As a result, we will get well segmented brain structures, surrounded by other tissues, in most cases not in direct contact with the ROI -brain. Only a few groups of voxels may "disturb" quality of the segmentation. These anomalies will be removed in the penultimate step of this segmentation method.

Connected Components Analysis.
Connected components labelling is an algorithmic application of graph theory, where subsets of connected components are uniquely labelled based on a given heuristic. A graph, containing vertices and connecting edges, is constructed from relevant input data. The vertices contain the information required by the heuristic comparison, whereas the edges indicate the connected 'neighbuors'. An algorithm traverses the graph, labelling the vertices based on the connectivity and relative values of their neighbours. In our case connectivity is determined by the 8-connectivity and algorithm is applied for each slice separately [3].
Pobrane z czasopisma Annales AI-Informatica http://ai.annales.umcs.pl Data: 05/04/2022 22:41:35 U M C S When labelling is done only certain components are left on each slice, ie. the largest (having most voxels) and those not smaller than 15% from them. This removes all unnecessary objects leaving only brain itself (also spinal cord and cerebellum).
2.6. Post-processing. As mentioned before, there is still the issue of a few anomalies at the brain edge. To fix this, we have looked at the distribution of voxel intensities along the lines -intersections of slices. Consider Fig. 5.
Plot A shows the distribution of voxel values (along the lines) on a well segmented boundary, whereas plot B a badly segmented part of the brain border. The ideal border intersection has steep linear outer slope, whereas the border with artifacts is disturbed with additional local peaks and roughness. The obvious thing to do is to remove them by smoothing intensity values, as shown in Fig. 6.
In our algorithm it is done for vertical and horizontal intersections, plus for each analyzed line, two neighboring lines are also taken into account. Thanks

Mask creation.
The last step of the segmentation involves filling shapes, contours of structures acquired in the previous segmentation steps. We have used flood fill algorithm with 4-connectivity. As a starting point we have used inner border of the shape boundary.

Results, tests and discussion
At this point we have tested our method in several (about twenty) studies from two different hospitals we cooperate with and online resources. The method produces very good "visual" results. Boundaries of the brain tissue are well marked, smooth and not rigged. Te spinal cord (often shown on the first few slices in the series), along with cerebellum is also well segmented. Fig. 8 show several examples of the method outputs.
Of course, visual estimation is not authoritative, especially when done by a non physician. Therefore we have asked our experts to manually segment a few data sets for us. These data sets were then segmented with our method and the results were compared with those acquired manually. We have measured a number of over-and under-segmented pixels, compared to the whole number of pixel. The over-segmented pixel is the one that has been included into the segmentation mask by our algorithm, but has not been included by experts. The under-segmented pixel, on the other hand, is such a point that was included by the physicians but not by our method.
Generally, for twenty data sets, the method has achieved the average undersegmented pixel percentage, 3.6% with the standard deviation of 4.7%, and the average over-segmented pixel percentage was equal to 4.1% with the standard deviation of 4.65%. Note that in most cases data fitting was not required. When it was, the results were not so good, as shown by the standard deviation, and reached about 8 to 10 percent for both kinds of pixels.
As can be seen the method can be very accurate. Furthermore, it is not time consuming. The average time of its execution is about one, one and a half minutes on rather standard PC configuration. Of course, it might be faster but in our case precision is more important.
There is, however a small problem. The results seem to be too good for such a simple method. The reasons for these are rather obvious. First of all, as mentioned, most of test data did not require series fitting. Secondly, the ratios for brain regions were estimated according to the data sets/data acquisition techniques used in one of hospitals we cooperate with. Therefore they form a specific kind of "mean brain". This "mean brain" proved to be correct for the data in another hospital, and some online studies (released to public domain). We are aware of the fact that for other data it may not be so precise. There are many parameters, which must be set by a technician that in some configuration can produce brain image not fitting the presented model. We want to solve this issue in the future (see next part). We have noticed that changes in the ratios up to 10% have no effect on the final result, therefore again we can say that in most cases the presented method should work and produce very good results.

Conclusions and future work
As can be seen, the presented method produces very good results. Its drawback is requirement for T1 and T2 series to be present in a study, and that they cover same part of the brain. Fortunately, in most cases this is satisfied.
There is also a doubt if so precise results can always be achieved -is this method universal? Maybe not, but the general approach definitely is. In most cases such a tool is used in one hospital (not in many at the same time), therefore it can be adjusted to a general acquisition technique used in a given unit, by choosing a different set of ratios.
Nevertheless, the algorithm is simple, very promising and could be applied in each situation when accurate segmentation of a brain is required.
Pobrane z czasopisma Annales AI-Informatica http://ai.annales.umcs.pl Data: 05/04/2022 22:41:35 U M C S In our future work we will focus on improving effectiveness and efficiency of the method. We also want to implement a system that would automatically compute region ratios for conscious series subtraction. Before using this tool one should learn it by providing a set of studies, he or she works with. By analyzing these data the system would determine ratio values in each region. This solution can solve the issue of universality.