Note
This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the user guide for the big picture.
nilearn.reporting.HTMLReport#
- class nilearn.reporting.HTMLReport(head_tpl, body, head_values={})[source]#
A report written as HTML.
Methods such as
save_as_html
, oropen_in_browser
are inherited from classnilearn.plotting.html_document.HTMLDocument
.- __init__(head_tpl, body, head_values={})[source]#
Construct the
HTMLReport
class.- Parameters:
- head_tplTemplate
This is meant for display as a full page, eg writing on disk. This is the Template object used to generate the HTML head section of the report. The template should be filled with:
title: The title of the HTML page.
body: The full body of the HTML page. Provided through the
body
input.
- body
str
This parameter is used for embedding in the provided
head_tpl
template. It contains the full body of the HTML page.- head_values
dict
, default={} Additional substitutions in
head_tpl
.Note
This can be used to provide additional values with custom templates.
- get_iframe(width=None, height=None)[source]#
Get the document wrapped in an inline frame.
For inserting in another HTML page of for display in a Jupyter notebook.
- open_in_browser(file_name=None, temp_file_lifetime='deprecated')[source]#
Save the plot to a temporary HTML file and open it in a browser.
Examples using nilearn.reporting.HTMLReport
#

Decoding of a dataset after GLM fit for signal extraction

Extracting signals of a probabilistic atlas of functional regions

First level analysis of a complete BIDS dataset from openneuro

Extracting signals from brain regions using the NiftiLabelsMasker