Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

getImageReporter

Class: mlreportgen.report.FormalImage
Package: mlreportgen.report

Get formal image reporter

Syntax

reporter = getImageReporter(image)

Description

reporter = getImageReporter(image) returns a reporter that generates a formal image based on the Image property of mlreportgen.report.FormalImage. The Image format overrides any corresponding formats in the image template. Use this getImageReporter method to override the default image template of the image.

Input Arguments

expand all

Source of image to add to report, specified as a character vector or character array, or as a DOM Image object. If you use a character vector or character array, specify the system path to the image file.

Output Arguments

expand all

Formal image reporter for the image, returned as a reporter object.

Examples

Use Nondefault Image Style

Create a style that differs from the default image style. Before you run this example, create a template named MyImageTemplate and customize its FormalImageImage style. Then, use the getImageReporter method and the TemplateSrc property to use your template.

import mlreportgen.report.*
report = Report();
image = FormalImage();
imageReporter = getImageReporter(image);
image.TemplateSrc = 'MyImageTemplate';
add(report,image);

Introduced in R2017b

Was this topic helpful?