[Mne_analysis] adding a Brain to html report

denis.engemann at gmail.com denis.engemann at gmail.com
Wed Jun 6 08:51:24 EDT 2018
Search archives:

        External Email - Use Caution        

Hi Max,

you have to hack it unfortunately. The way to go is to save the mayavi plot to disk, read the image back and plot it using matplotlib imshow and then pass the figure handle.
The good news is that this should work. I remember having done it in the past.

Hope this helps,
Denis

> On Jun 6, 2018, at 2:47 PM, Maximilien Chaumon <maximilien.chaumon at gmail.com> wrote:
> 
>         External Email - Use Caution        
> 
> 
> Hi,
> 
> Is there an easy way to add a rendered brain image to an html report?
> I don't know how to get a handle to the figure of a plotted Brain object and pass it to 
> 
> report.add_figs_to_section(fig, captions=data_subject + ' sensitivity map', section='Leadfield')
> 
> If I pass a Brain object as fig here, I get 
> 
> AttributeError: 'Brain' object has no attribute 'scene'
> 
> 
> Thanks,
> Max
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
> 
> 
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the e-mail
> contains patient information, please contact the Partners Compliance HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in error
> but does not contain patient information, please contact the sender and properly
> dispose of the e-mail.





More information about the Mne_analysis mailing list