IMG
Displays single/multiple images with given titles. See examples for more details
******************** Quick Description ********************
ob: can be a 2D/3D numerica array or 1D cell with each cell as a 2D numeric matrix
label: empty [] OR string OR a 1D cell same length as the z direction of *ob*
******************** GUI instructions ********************
'd' OR 'right arrow': next image
'a' OR 'left arrow': previous image
'w' OR 'up arrow': first image
's' OR 'down arrow': last image
'c': close figure
******************** Examples: main ********************
img(ob1);
*****ob1: 2D/3D array
img(ob1, label1);
*****ob1: 2D/3D array
*****label1:
**********empty [] (if array is 3D, then title of each 2D frame will be 'frame: 1', 'frame: 2',...) OR
**********1D cell (each cell corresponding to each 2D frames) OR
**********a string (for all 2D frames)
img(ob1, label1, ob2, label2, ...);
*****ob1, ob2, ... have the same size in 3rd dimension (size(ob,3))
******************** Examples: modes ********************
img(___, 'size', [1,3]);
*****generates subplot(1,3,kk)
img(___, 'axes', 'off');
*****remove white space between axes
img(___, 'auto-pos', 'on');
*****sets the figure position so that the mode ('axes','off') actually removes all white space.
*****only works if 'axes' mode is at 'off'
img(___, 'abs', 'on');
*****only plot absolute values of given pixel value
*****set to 'off' if wishes to plot actual real values (negative and positive)
img(___, 'colormap', 'jet');
*****uses the colormap 'jet'
*****can be changed to any MATLAB colormap
******************** Remarks ********************
If label is a string, then DO NOT USE mode names, e.g., 'size','axes', etc.
******************** Custom Functions ********************
setAxes
cell2var
figsize
last updated 02/04/2018
Author: Andrew Yuan
Jianwei (John) Miao Coherent Imaging Group
University of California, Los Angeles
Copyright (c) 2017, All Rights Reserved
Zitieren als
Andrew Yuan (2025). IMG (https://de.mathworks.com/matlabcentral/fileexchange/64504-img), MATLAB Central File Exchange. Abgerufen.
Kompatibilität der MATLAB-Version
Plattform-Kompatibilität
Windows macOS LinuxKategorien
- MATLAB > Graphics > Labels and Styling > Interactions, Camera Views, and Lighting > Lighting, Transparency, and Shading >
Tags
Quellenangaben
Inspiriert von: setAxes
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
| Version | Veröffentlicht | Versionshinweise | |
|---|---|---|---|
| 1.1.0.0 | Auto-positioning works even if you have multiple monitors. |
||
| 1.0.0.0 | Put all custom functions inside one .m script
|