{'fraction_non_alphanumeric': 0.014771997430956968, 'fraction_numerical': 0.002569043031470777, 'mean_word_length': 5.182539682539683, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Automated definition of mid-sagittal planes for MRI brain scans

In most magnetic resonance imaging (MRI) clinical examinations, the orientation and position of diagnostic scans are manually defined by MRI operators. To accelerate the workflow, algorithms have been proposed to automate the definition of the MRI scanning planes. A mid-sagittal plane (MSP), which separates the two cerebral hemispheres, is commonly used to align MRI neurological scans, since it standardizes the visualization of important anatomy. We propose an algorithm to define the MSP automatically based on lines separating the cerebral hemispheres in 2D coronal and transverse images. Challenges to the automatic definition of separation lines are disturbances from the inclusion of the shoulder, and the asymmetry of the brain. The proposed algorithm first detects the position of the head by fitting an ellipse that maximizes the image gradient magnitude in the boundary region of the ellipse. A symmetrical axis is then established which minimizes the difference between the image on either side of the axis. The pixels at the space between the hemispheres are located in the adjacent area of the symmetrical axis, and a linear regression with robust weights defines a line that best separates the two hemispheres. The geometry of MSP is calculated based on the separation lines in the coronal and transverse views. Experiments on 100 images indicate that the result of the proposed algorithm is consistent with the results obtained by domain experts and is significantly faster.