When I switched from R to Julia about three years ago, one of the main things that made that an obvious choice for me, in my field (analysis of fMRI data), was the incredible Makie set of 3d plotting utilities. So first I’d like to acknowledge and thank the authors of that package. The brain visualizations I’ve done with it over the last few years have caught a lot of eyes, and people have asked me about sharing how it’s done.
So to finally wrap everything up in a package that anyone can use, I present this new registered package, ObservableCortex.jl, that hopefully makes it easy for people to do the same and much more.
Basically it centers around a Montage
struct that encapsulates this customary 4-panel arrangement of brain views (or any other arrangement that you choose) along with all necessary information for mapping vectors of statistics or activation (for example) to the provided cortical surface geometry. And then Makie simply does all the work from there.
The big thing that’s missing right now is support for handling discrete-valued data like network defintions and regions of interest, but there will be rapid updates over the next several days with this and other new features, so if you’re interested, give it a try and check back soon for updates.
This package is related to my other recently announced fMRI-related packages, espcially CIFTI.jl and CorticalSurfaces.jl. One short-coming however is that in order to use these things with your own brain surface definitions, you would need another utility to read in that information (such as from a .surf.gii GIFTI file) and parse it into the expected format, an example of which is contained in data/MSC01.jld
within the repo. I aim to soon provide a guide for how this could be done yourself, and also to evaluate the feasibility updating the unregistered package GIFTI.jl (from another author) to achieve this more easily.