This looks like a way to do it, with SimNIBS, by implementing the mask in the model: add_tissues_to_upsampled — SimNIBS 4.0.0 documentation
This looks like a way to do it, with SimNIBS, by implementing the mask in the model: add_tissues_to_upsampled — SimNIBS 4.0.0 documentation