Hi slicer experts,
I am working to load >100 .mgh files overlay model which I want to make a video for demo.
I can load the model by:
model = slicer.util.loadModel(‘lh.pial’)
But, how to load the surface file (.mgh) overlay the model. I tested these command but failed.
surface = slicer.util.loadScalarOverlay(‘lh_filed.mgh’)
I found the function (slicer.util.openAddScalarOverlayDialog()) works, but you had to select the (.mgh) file manually.
Is there a function can load .mgh automatically to overlay the loaded model?
Operating system: Centos 7
Slicer version: 4.8.1