大脑数据可视化方法
介绍 (Introduction)
Recently, I took an introductory psychology course in my first year of university where among other basic principles of psychology, we were taught about the brain, the ways we can visualize the brain using different kinds of scans, and how doctors use these scans to detect and monitor diseases. It got me wondering- is there a simple way I can visualize and analyze the brain?
最近,我在大学一年级时参加了入门心理学课程,其中包括心理学的其他基本原理,其中包括关于大脑的知识,使用各种扫描方法可视化大脑的方法以及医生如何使用这些扫描方法进行检测并监测疾病。 我很想知道-有没有一种简单的方法可以可视化和分析大脑?
A good amount of research led me to the course ‘Introduction to Neurohacking in R’ on Coursera. This course helped me gather the background information and the building blocks needed to visualize the brain using just two things: open-source MRI scans and R. Given Python is generally considered the go-to language for deep learning and image analysis, I wanted to challenge myself to use R and solve the questions I had.
大量的研究使我进入了Coursera上的“ R中的神经黑客入门”课程。 本课程帮助我仅使用两件事来收集背景信息和可视化大脑所需的构件:开源MRI扫描和R。鉴于Python通常被认为是深度学习和图像分析的首选语言,我想挑战自己使用R并解决我遇到的问题。
数据集 (Dataset)
I tested my knowledge on a dataset I found on Kaggle called ‘Brain Tumor Progression’. It consists of the MRI scans of 20 patients suffering from Glioblastoma. There are two MRI exams included for each patient taken 90 days apart to monitor the progression of the tumor.
我在Kaggle上发现的名为“脑肿瘤进展”的数据集上测试了我的知识。 它由20例胶质母细胞瘤患者的MRI扫描组成。 每位患者间隔90天进行两次MRI检查,以监测肿瘤的进展。
我回答的问题 (Questions I Answered)
问题1:如何将扫描结果转换为适合分析的格式? (Question 1: How do I convert the scans into a format suitable for analysis?)
Most hospitals store MRI scan data in a two-dimensional DICOM format where each axial slice of the brain is one DICOM file. This is done to protect health information. To make these images suitable for analysis by R, the first step is to convert DICOM into NifTI format, which combines all the DICOM files into a folder to come up with a 3D image of the brain (the NifTI format!). So say we wanted to take a look at the 11th axial slice of Patient 1’s brain, we get this.
大多数医院都以二维DICOM格式存储MRI扫描数据,其中大脑的每个轴向切片都是一个DICOM文件。 这样做是为了保护健康信息。 为了使这些图像适合R进行分析,第一步是将DICOM转换为NifTI格式,该格式将所有DICOM文件合并到一个文件夹中,以提供大脑的3D图像(NifTI格式!)。 假设我们想看一看患者1的大脑的第11个轴向切片,就可以了。