Java® applications can display MATLAB generated figures and images in three ways:
Display the generated image on the the local machine.
When your MATLAB code opens a figure window, the MATLAB Runtime displays the window on the local machine. The displayed figure is a fully functional MATLAB figure and can be manipulated as such. The only limitation is that it cannot be displayed on remote machines and is therefore not suitable for distributed applications.
Export the figure as an image stream.
Image streams are the native Java mechanism for handling image data. Generated MATLAB images are returned the to the Java application as static binary image streams. The Java application layer is free to manipulate the data using its own image processing capabilities. To leverage the MATLAB capabilities, the Java application must have the MATLAB code generate a new image.
Export the figure using the WebFigures feature.
WebFigures displays the generated images in a web browser using Java Servlet Page(JSP)s. The displayed figures and images have basic controls for zooming, rotating, and positioning.
webfigure | Export a figure to a deployed application |
figToImStream | Stream figure as byte array encoded in specified format |