Mixed source space

Code to generate source spaces with cortical surfaces and sub-cortical volumes.
A function that exported a (sub-)volume source space to a nifti (basically the last 20 lines) would simplify it. Would using the cerebellum make it applicable/real enough?