IMG

Display slices of a 3D object, frame by frame using GUI controls
62 Descargas
Actualizado 4 feb 2018

Ver licencia

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

Citar como

Andrew Yuan (2025). IMG (https://la.mathworks.com/matlabcentral/fileexchange/64504-img), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2016a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Lighting, Transparency, and Shading en Help Center y MATLAB Answers.
Agradecimientos

Inspirado por: setAxes

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión
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