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=None)[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=None)[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=None Additional substitutions in
head_tpl
. ifNone
is passed, defaults to{}
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
Extract signals on spheres and plot a connectome
Default Mode Network extraction of ADHD dataset
First level analysis of a complete BIDS dataset from openneuro
Simple example of two-runs fMRI model fitting
Voxel-Based Morphometry on OASIS dataset
Simple example of NiftiMasker use
Extracting signals from brain regions using the NiftiLabelsMasker
Understanding NiftiMasker and mask computation
A short demo of the surface images & maskers