IMG

版本 1.1.0.0 (13.6 KB) 作者: Andrew Yuan
Display slices of a 3D object, frame by frame using GUI controls
60.0 次下载
更新时间 2018/2/4

查看许可证

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

引用格式

Andrew Yuan (2024). IMG (https://www.mathworks.com/matlabcentral/fileexchange/64504-img), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2016a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Lighting, Transparency, and Shading 的更多信息
致谢

参考作品: setAxes

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
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