Always wanted to have your very own 3D printed brain?

With modern technique this is possible and do-able for everyone!

The only costs that you will have are the one of the 3D printing.

What you need:

- The raw data of an MRI scan of your brain (T1 scan, but maybe T2 also works). Files should be in NIFTI (.nii or .nii.gz) or DICOM format (.dcm or no file extension). You can easily get a MRI scan by participating in an (f)MRI study of your local university (check the medical/neuroscience/psychology department). Often they even pay you quite well for participation. It's important that you request the raw data. Sometimes the hospital only gives you PNG files, which can not be processed.

- FreeSurfer: In my case I used the version for Virtualbox for Windows. If you use Mac/Linux you will be able to install FreeSurfer directly to your computer and I assume that you have enough computer knowledge to do so.

- MeshLab: To process and refine the mesh.

- (optional) 3D printer

I have found a couple of tutorials on the internet, but non of them really seemed to work for me. I found this instruction, but it was not very detailed and still took me quite long to figure out how to do the individual steps. My instruction here is basically the one that I linked but in a step-by-step manor, so that everyone can follow.

Step 1: Install VirtualBox and FreeSurfer (and Convert DICOM to NIFTI)

(These are instructions for Windows. If you have Linux of Mac you can install FreeSurfer directly using the instructions on the FreeSurfer website)

  1. Install VirtualBox for "Windows hosts x86/amd64" from this link (~110MB)
  2. Download and extract the FreeSurfer Virtualbox (Xubuntu) image from here (~9GB)
  3. Follow these instructions to install FreeSurfer for VirtualBox. I recommend using more Memory than they use (like 2-4GB).


If you have your MRI files in DICOM you can convert them using the dcm2nii tool by MRIcron: win.zip

(If they are already in NIFTI format, then you can skip this step.)

  1. Exctract the files and open dcm2niigui.exe
  2. Click "file->DICOM to NIFTI"
  3. Select folder with your DICOM files inside and click "open"
  4. The programm should run for a few seconds
  5. Inside your DICOM folder there should now be one or more .nii.gz files. If in doubt just use the largest one. I renamed it to "brainscan.nii.gz" to make it easier to find and handle.

You can also use DICOM files directly in FreeSurfer, but for simplicity I assume that you use NIFTI files.

(more information to dcm2nii can be found here)


Step 2: Extract Brain Tissue Using FreeSurfer

Brain tissue reconstruction from MRI image is a science on its own. What seems quite easy is actually a computationally demanding task. There are various programs of various complexity do the job. The advantage of FreeSurfer is, that it runs without setting any parameters. This makes it easy to use for people with no neuroscience background.


This step is necessary to allow easy drag&drop between the host and the guest system

  1. Open the VirtualBox and start the FreeSurfer image
  2. Click on Device -> Insert Guest Addition CD image
  3. Double click "autorun.sh", insert sudo password "freesurfer"
  4. Restart the virtual machine (upper right corner "fsuser" -> restart)

Brain exctraction

  1. Drag your NIFTI file (brainscan.nii.gz in my case) to the Desktop of the Virtual Machine
  2. Open the Terminal
  3. Type recon-all -s mybrain -all -i /home/fsuser/Desktop/brainscan.nii.gz and press enter, where brainscan.nii.gz is the name of your NIFTI file. (see picture)
  4. Wait for the process to finish. After finishing it will say something like "[..] mybrain finished without error [..]"

Depending on your computer speed this can take up to 2 days. On my 4x3Ghz it took 12 hours. You can pause and resume the Virtualbox at any time using “Machine->Pause”. This way you can resume the process after turning off your host computer.-

  • If you want to speed up this process, you might want to consider giving the virtual machine more RAM and the usage of more CPUs (you can do so in the machine settings). You need to restart the virtual machine after that.
  • If the Freesurfer process gets cancelled or crashes you need to use a different subject name (mybrain2) or delete the subject folder to try again.
  • What is happening in the background: FreeSurfer will try various things to determine the best brain extraction parameters. It will iterate through thousands of different parameters and see if the results are good or not. This is necessary because every brain is different and requires different parameters.

(If you want any further information on FreeSurfer, please read here)

Step 3: Convert Your Brain to .stl

The computed brain is in .pial format, but what we need is .stl

Luckily FreeSurfer includes a tool to convert the files.

Open a terminal window and type

  • mris_convert /usr/local/freesurfer/subjects/mybrain/surf/rh.pial rh.stl
  • mris_convert /usr/local/freesurfer/subjects/mybrain/surf/lh.pial lh.stl
  • and last: xdg-open /usr/local/freesurfer/subjects/mybrain/surf/ (or alternatively navigate there yourself with the file manager)

Now try to find the two files rh.stl and lh.stl and drag them to you Windows system

One of them is the right hemisphere (rh.stl) left hemisphere (lh.stl).

FreeSurfer can also extract the cerebellum and other parts of the brain, but in this tutorial we'll focus on the hemispheres only. This has one advantages: Your brain will nicely stand on it's own. As the cerebellum is round and at the bottom of your brain, it might not do so with it.

Step 4: Install MeshLab and Refine the Mesh

Now you just need to combine the two hemisphere meshes that we obtained from FreeSurfer.

To do so you can use any modeling software, I chose MeshLab as it's free. But be aware: MeshLab does not have an "undo"-Button. So every change you make on the mesh can't be undone, you can only reload your mesh.

  1. Download and install MeshLab from sourceforge (~35MB)
  2. Start MeshLab and import lh.stl and rh.stl (left and right hemisphere) via "File" -> "import mesh". Whatever message comes up, just click ok.
  3. Click on "Filters" -> "Mesh Layer" -> "Flatten Visible Layers" and apply

Now your brain mesh is technically ready to go! Your mesh might only have too vertices (=it is too complex) for most current 3D printers. So we can simplify it.

  1. "Filters" -> "Remeshing, Simplification, Reconstruction" -> "Quadratic Edge Collapse Decimation"
  2. Enter your number of vertices, I took 150.000, which seemed to be simple enough. Click apply.
  3. To make it look nicer, now use "Filters" -> "Smoothing, Fairing and Deformation'" -> "Laplacian Smooth" and just click apply once.

Step 5: 3D Print Your Brain

Voilà you're done! :)

So either you owning a 3D printer and know what to do with the mesh


You can send your mesh now to a 3D printing service. I printed mine with 3dhubs.com, this is a service where private people provide their printer for you.

If you want, you can also create a chocolate mould and make chocolate brains like these guys.

If you have any questions or feedback, please leave a comment.

<p>do you need to use you mri scans, or can you use a picture of one from google? </p>
you can certainly use any MRI scan that you want. But it needs to be a whole scan, not just an image from Google images.
<p>would this work on annoying people? To the best of my knowledge they don't have brains</p>
<p>8 hours of computing later I'm ready to heat up the 3D printer!!!</p>
<p>After 25 hours of computing, came up with these lovely hemispheres :)</p><p>3D printed the right one (took about 8 hours on UM&sup2;, 0.1mm layer height, in eSun white PLA) </p><p>Great tutorial, thank you very much !</p>
<p>Hello,</p><p>This is a nice a detailed tutorial. I am trying to extract the brain from a friend's MRI. I first converted DICOM files to Nifti format.</p><p>Everything went well. After that I launched the extract on FreeSurfer and let it run all night long and the following day (=today).</p><p>Since this morning it looks stuck on errors like the following lines :</p><p>after 200 iterations, nbhd size=2, neg = 2<br>starting rms=0.008, neg=2, removing folds in lattice....<br>iter 1, dt=0.000188: new neg 2, old_neg 2, delta 0, rms=0.006 (24.677%)<br>iter 2, dt=0.000573: new neg 1, old_neg 2, delta 1, rms=0.005 (12.005%)<br>iter 3, dt=0.000573: new neg 0, old_neg 1, delta 1, rms=0.005 (11.936%)<br>0376: dt=3.869210, rms=0.621 (0.379%), neg=0, invalid=96777</p><p>I am using FreeSurfer on the virtual machine provided in this tutorial, running on VirtualBox for Mac. Should I wait a little more ?</p><p>My macbook has 16GB RAM, 128GB SSD and an Intel Core i7 proc.</p><p>Thanks for your time</p>
<p>I forgot to mention that I set the virtual machine with 10GB RAM.</p>
<p>Mhh to be honest, I have no idea. If there are no results after 24h, I'd say something is wrong. I'm not an expert on FreeSurfer or MRI-images, so I'm afraid I can't help you.</p><p>I ran it on 3x3.2 Ghz and 8GB of RAM + SSD and it took less than 8h to finish in a VirtualBox.</p>
<p>You are right, after almost two days the process finally exited with errors :(</p><p>I retried on another computer and dedicated 4 of 6 cores + 10GB RAM for the VM. And I had a pleasant result after less than 20 hours :)</p><p>Also, I was wondering what exact configuration you were using, thanks for the info and reply.</p>
<p>By the way, I 3D printed my brain - scale is 100%. </p><p><a href="https://www.instagram.com/p/-84ZJ8ODkw/?taken-by=3dwp" rel="nofollow">https://www.instagram.com/p/-84ZJ8ODkw/?taken-by=3...</a></p><p>Thanks again for the great tutorial!</p>
<p>I can't find those other brain files yet, do you know how you can get other parts like the brain stem etc.? I would love to print more parts..</p><p>By the way, I volunteered for new 7T MRI and this tutorial works for that too. I got a dcm and NIFTI file after the scan. Thanks again for this nice tutorial.</p>
It is definitely possible with FreeSurfer, but to be honest, I haven't tried it yet.<br><br>If found two pages: http://neuroimage.usc.edu/forums/showthread.php?840-Cerebellum-mesh&amp;s=421b4f97a385613fecdce9a9aed39e0d<br><br>and<br><br>http://brainder.org/2012/05/08/importing-freesurfer-subcortical-structures-into-blender/<br><br>Maybe you can follow their advice?<br>Otherwise you can have a look at the FreeSurfer wiki.
<p>Very nice instructions, thanks a lot! I am now in the process of waiting until the Virtual machine hopefullt produces a file of my grey matter. I do wonder how do you get the other parts of the brain? I saw amygdala, brain stem and many more come by in the calculations. It would be nice to maybe make a puzzle/anatomy collection of the brain parts. How could I do that?</p>
<p>I now have succesfully extracted my brain - amazing!!!! And I have an idea now how it works and how you can convert the rest of the files. Really nice that the two hemispheres keep their place in XYZ, I opened them together in my software VisCAM. Thanks again for this great tutorial!</p>
Its almost like you are taking a backup of your physical self. On another thought, if you made the 3D print like a gift box that could be opened, you could gift people a piece of your mind, or if you had a coin slot at the top you could get a penny for your thoughts. Hope you don't mind the puns, couldn't help it :-)
<p>I'm sure it depends on the type of research, but any idea what's reasonable to expect in terms of commitent when participating in a research study? i.e. a couple hours a week for a few weeks? Isn't the cost if you were to do it on your own around $2k? </p>
<p>Yep, it varies quite in terms of commitment.</p><p>There are simple studies where you just have to go there once for 3h, others require 2 or more days where you do tests for 2-3 hours each day. </p><p>You will be thoroughly informed about the content of the study beforehand.</p><p>If you get a scan of your brain on a private basis it can cost several hundred euros/dollars yes. In the local hospital they told me for a brain scan it will be ~400&euro;, in the US it might be far more indeed. The insurance will pay for it, if there is reason to do a scan of course.</p>
<p>I have always wanted to do this with my MRIs</p>

About This Instructable




More by 3d_printed_brain:3D print your own brain 
Add instructable to: