IMG

Display slices of a 3D object, frame by frame using GUI controls
61 téléchargements
Mise à jour 4 fév. 2018

Afficher la licence

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

Citation pour cette source

Andrew Yuan (2024). IMG (https://www.mathworks.com/matlabcentral/fileexchange/64504-img), MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2016a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Lighting, Transparency, and Shading dans Help Center et MATLAB Answers
Remerciements

Inspiré par : setAxes

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Publié le Notes de version
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
Change title
Changed title
Changed description
Changed title