fmri Visualization using Paraview
By Gabriel Rizk
Understanding and visualizing fMRI data can seem daunting at first, but this guide is going to make the process much easier. To start, I'll give a brief introduction into what fMRI is. I will then explain my project, and give a brief tutorial of how to load your data into Paraview and display the clusters inside a brain! I will finally delve into the issues of working with fMRI data.
What is fMRI?
• fMRI stands for Functional Magnetic Resonance Imaging.
• This techniques detects brain activity by measuring changes that are associated with blood flow.
• When a part of the brain is being used, more blood is flowing to that area, meaning more neurons are activated.
• Other techniques require people to take shots, ingest some chemical, or have surgery, but this was the first useful non-invasive technique developed to detect neurological activity.
• Since there is alot of noise associated with the data, extensive cleaning and analysis is required to get the neural signal data from fMRI.
• Voxels are 3x3x3 mm piece of the brain, and fMRI takes the activity of it by averaging the activity of all of the neurons there. Most activity is measured by region, and several voxels are averaged to find regions of interest.
Voxel Dimensions Voxel Groups
I wanted to see if memories clustered in certain portions of the brain. This expirement was done by Professor Badre in his lab, which I worked in for one semester. I was unable to access his data again, so I used data from a similar expirement that was conducted on NueroSynth.com (website that provides open source fMRI data used in expirements.)
The results of the data analysis were inconlusive, as the voxels of activity did not cluster in a specific region of the brain, but I wanted to see if visualizing the data proved to be any different. I did this by first getting a mask of the brain, visualizing it in Paraview, and then taking the clusters of data, converting them to 3d data points, and then plotting them within the mask of the brain. I have described the instructions for doing this below.
Tutorial for Visualizing fMRI Data Clusters in Paraview
Step 1: Download Paraview and the data sets (below is the link to the brain mask and the already clustered data)
(must be on a Brown University email account to access)
Step 2: Launch Paraview and import the two files:
Go to File->Open and select the files
Should now have a screen that looks like this!
Step 3: Now, you want to click on the closed on next to the name: brainmask.vtk, which will then visualize the brain in 3d. You want to then scroll down to Representation in the Properties menu in the bottom left, and click Points so that you can see the inside as well.
Step 4: Click on NueroSynth_clusters.csv, and then click the box next to Add Tab Field Delimeter, as the data is seperated by a tab, followed by the commas for the x y and z axes. You then want to go to the top, click Filters-Alphabetical->Table To Points. This will make the table into points on the screen.
Step 5: In the Properties section, it should give you an option of where to find the x,y, and z data fields. Here, click the corresponding data fields for the corresponding dimensions (x for x, y for y, etc). You then click apply, and can now see the points inside the brainmap. The issue here is that the points are so small you cant actually see them. Now, in the Properties section, make the points be size 20, and visualize them as spheres. You can now see much larger points, and these are the clusters of memory throughout the brain. You should now have something that looks like this.
You have now visualized fMRI data in Paraview (even though I took away the hard parts, like cleaning the data and converting it into 3d data points, but that requires a much longer and much more complex tutorial). With this visualization, you can now see why I was unable to get conclusive results. The clusters are all across the brain, and they do not seem to congregate around a specific area. This is likely because there was so much noise in the data, and my filtering methods were not able to remove as much noise as I wanted.
Issues with fMRI Data
• The main issue is that its not very fine grained, since we aren’t measuring actual neurons, but blood flow activity.
• Data is also represented as voxels, which is a small cube of the brain, but contains over a million neurons.
• Each fMRI scan takes about a second or so, but a neuron can flare over one hundred times in that span. This is why fMRI data doesn’t provide a precise timing of events
• You essentially see a mass of activity in the brain, since so many processes are occurring at once, so filtering through to find the activity that you're looking for is extensive.
• Level of noise in fMRI data requires large amount of cleaning, and the data is extremely large because of the fact that is a large 3d image, and a lot of them (since its a time series). Scale of the data makes the time taken to clean exponentially larger.
Conclusions from Doing This Project
• fMRI data is extremely difficult to work with
• VR has massive potential to change the way humanslook at medicine.
• Surgery modeling, cancer research, brain injury mapping, etc.
• All in all, even though my findings were not conclusive, visualizing the clusters in Paraview allowed me to better understand the complexity of the data and why they did not cluster well (too much noise).