资源简介
matlab开发-三维图像堆栈查看器。当前版本只接受灰度图像。只需将图像堆栈格式化为三维数组即可。
代码片段和文件信息
%%% By: Tung Yuen Lau (a.k.a. boyexex)
%%% Email: boyexex@gmail.com
%%% University of Illinois at Urbana-Champaign (UIUC)
%%% Current version only accepty image stack of gray-scale images
%%% im_stack is a 3D array of the image stack
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%****~~~~ ~~~~****%%%%%%
%%%***~~~ ~~~***%%%
%%% --- --- ++++++ ** ** %%%
%%% / / \ ++ ** ** @@ # ### @@ %%%
%%% | -- | | ++ ** ** ## # %%%
%%% | | | | ++ ** ** @@ # # @@ %%%
%%% \ / \ / ++ ** ** @@ # # @@ %%%
%%% --- --- ++++++ ** ** @@ # # @@ %%%
%%%***~~~ ~~~***%%%
%%%%%%****~~~~ ~~~~****%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [] = Image_stack_viewer( im_stack )
FG.im = im_stack;
% Adjust window size for image stack
% Adjust values of a and b (bounded by “%------“) iteratively
% Until it fits your screen
[w h d] = size(FG.im);
FG.POI = [round(w/2);round(h/2);round(d/2)];
aspect_ratio = (h/w);
if aspect_ratio >= 1
%------
a = 700;
%------
b = round((a)/aspect_ratio);
pad = 30+round((b/w)*d);
else
%------
b = 700;
%------
a = round((b)*aspect_ratio);
pad = 30+round((a/h)*d);
end
% Display xy plane
FG.xyz_im = figure(‘units‘‘pixels‘...
‘position‘[20 200 a+pad b+pad]...
‘name‘‘Loaded image stack‘...
‘numbertitle‘‘off‘...
‘resize‘‘on‘);
set(FG.xyz_im‘resize‘‘on‘);
FG.xyz_im.xy = axes;
im(1) = subimage(FG.im(::round(d/2)));
set(FG.xyz_im.xy‘units‘‘pixels‘‘position‘[pad-10 10 a b]);
axis off;
% Add image point to define ROI position
P1 = impoint(gcaFG.POI(2)FG.POI(1));
fcn1 = makeConstrainToRectFcn(‘impoint‘...
get(FG.xyz_im.xy‘XLim‘)get(FG.xyz_im.xy‘YLim‘));
setPositionConstraintFcn(P1fcn1);
% Display xz plane
FG.xyz_im.xz = axes;
im(2) = subimage(squeeze(FG.im(:round(h/2):)));
set(FG.xyz_im.xz‘units‘‘pixels‘‘position‘[10 10 round((b/w)*d) b]);
axis off;
% Add image point to define ROI position
P2 = impoint(gcaFG.POI(3)FG.POI(1));
fcn2 = makeConstrainToRectFcn(‘impoint‘...
get(FG.xyz_im.xz‘XLim‘)get(FG.xyz_im.xz‘YLim‘));
setPositionConstraintFcn(P2fcn2);
% Display yz plane
FG.xyz_im.yz = axes;
im(3) = subimage(squeeze(FG.im(round(w/2)::))‘);
set(FG.xyz_im.yz‘units‘‘pixels‘‘position‘[pad-10 b+20 a round((a/h)*d)]);
axis off;
% Add image point to define ROI
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 6479 2012-10-25 06:04 Image_stack_viewer.m
文件 1307 2014-02-12 14:11 license.txt
相关资源
- matlab开发-动态电压恢复器故障dvr
- matlab开发-数据处理的分组方法GMDH
- matlab开发-DVR
- matlab开发-ParetoSet
- matlab开发-ShamirsSecretSharing
- matlab开发-othellom
- matlab开发-EMGONOFF
- matlab开发-级联H桥多电平转换三相
- matlab开发-带图形用户界面的步进电机
- matlab开发-MFTireGUI
- matlab开发-自适应霍夫曼编码技术字符
- matlab开发-ConnectFour
- matlab开发-floodfillscanline
- matlab开发-Paretosurfacenavigator
- matlab开发-分步序达尔文粒子群优化
- matlab开发-改进的解决方案经济调度方
- matlab开发-为Resnet50网络设计工具箱模
- matlab开发-sigmoid
- matlab开发-同步发电机的详细模型,包
- matlab开发-多层反向传播神经网络
- matlab开发-Parrotminirones的模拟支持包
- matlab开发-nnsysid
- matlab开发-使用gnewton-raphson方法查找任
- matlab开发-UR5控制Matlab
-
matlab开发-mssamultiob
jectivesalpswarmalg - matlab开发-Vasicek
- matlab开发-直流到全桥逆变器
- matlab开发-使用xFoiland ParseCGeometric参数
- matlab开发-如何模拟6到10个输入状态空
- matlab开发-mtype340
评论
共有 条评论