赞
踩
>%output arrival_time parametric heatmap%%
图;imagesc(at);颜色栏;标题(“到达时间”);
彩色地图(“Jet”);Caxis([2.5 5]);
%savefig(['acute e13_draft_draft_ignore''。图']);
要混合heatmap的代码%
最小值=2.5;%最小值(最小值(R1_性能(:,:,29));
最大值=5;%最大值(最大值(R1性能(:,:,2 T9));
map=颜色映射(“jet”);
ncol=大小(map,1);
S=圆形(1+(ncol-1)*(最小值)/(最大值最小值));%取到达时间值和舍入差
rgb_at=ind2rgb(s,map);
rgb_at=imResize(rgb_at,5);
rgb_perf=ind2rgb(s,map);
rgb_perf=imresize(rgb_perf,5);
rgb_at_scale=imResize(rgb_at,[100 350],“最近”);
%rgb_at_scale_2=imResize(rgb_at,[170 220],“最近”);
toto=零(大小(rgb_at_scale));
%toto_2=零(大小(rgb_at_scale_2));
%toto(190:293,100:455,:) = rgb_at;
α=0.65;
rgb_Blend=翻转(alpha*rgb_at_scale+(1-alpha)*toto);
hfh=imFreeHand();
%从ROI对象创建一个二进制图像(“蒙版”)。
binaryImage=hfh.createMask();
xy=hfh.getposition;
structbounders=bwbounders(二进制图像);
xy=结构边界1%通过2个x,y坐标数组得到n。
x=xy(:,2);%列。
Y=xy(:,1);%行。
坚持住,%不要吹走图像。
绘图(x,y,'线条宽度',2);
drawNow;%强制它立即绘制。
%在蒙版为真的地方,通过将其设置为255,将线条刻录到图像中。
BurneDimage=图;
BurneDimage(二进制图像)=NaN;
imshow(燃烧室);
轴;[在此处输入图像描述][1]][1]
< /代码>
这是我的代码:
%% output arrival_time parametric heatmap %%
figure;imagesc(at);colorbar;title('arrival time');
colormap('jet');caxis([2.5 5]);
%savefig(['Acute_1e13_draft_DRAFT_ignore' '.fig']);
%% code to blend heatmap %%
minv = 2.5;%min(min(R1_perf(:,:,29)));
maxv = 5;%max(max(R1_perf(:,:,2 t9)));
map=colormap('jet');
ncol = size(map,1);
s = round(1+(ncol-1)*(at-minv)/(maxv-minv)); % Taking arrival time values and rounding differences
rgb_at = ind2rgb(s,map);
rgb_at = imresize(rgb_at,5);
rgb_perf = ind2rgb(s,map);
rgb_perf = imresize(rgb_perf,5);
rgb_at_scale = imresize(rgb_at,[100 350],'nearest');
%rgb_at_scale_2 = imresize(rgb_at,[170 220],'nearest');
toto = zeros(size(rgb_at_scale));
%toto_2 = zeros(size(rgb_at_scale_2));
%toto(190:293,100:455,:) = rgb_at;
alpha = 0.65;
rgb_blend = fliplr(alpha * rgb_at_scale + (1 - alpha) * toto);
hFH = imfreehand();
% Create a binary image ("mask") from the ROI object.
binaryImage = hFH.createMask();
xy = hFH.getPosition;
structBoundaries = bwboundaries(binaryImage);
xy=structBoundaries{1}; % Get n by 2 array of x,y coordinates.
x = xy(:, 2); % Columns.
y = xy(:, 1); % Rows.
hold on; % Don't blow away the image.
plot(x, y, 'LineWidth', 2);
drawnow; % Force it to draw immediately.
% Burn line into image by setting it to 255 wherever the mask is true.
burnedImage = figure;
burnedImage(binaryImage) = nan;
imshow(burnedImage);
axis on;[![enter image description here][1]][1]
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。