Overlay multiple images in one axes with individual transparency adjustment?

4 ビュー (過去 30 日間)
xi
xi 2020 年 11 月 4 日
コメント済み: xi 2020 年 11 月 6 日
I have 3 or more images of the same size to be overlaid, each is associated with a sliding bar for transparency (0-1) adjustment in a GUI. So I can display the overlay effect of any selected 2 or more images with adjustable transparency.
One solution is to use multiple axes with identical positions (on top of each other), and put one image in each axes, and use linkaxes(). so I can adjust the alphadata for each axes to achieve this. Can I put three images in one axes? If there's only two images, I can set one image as the transparency data. but how about for more than 2 images?
Also, If I want to add ROIs on top of the images, which is always visible, how to achieve that? using multiple axes, ROI has to be drawn within a specified axes, changing the transparency of that axes will also affect the ROI, which I don't want.

採用された回答

Walter Roberson
Walter Roberson 2020 年 11 月 4 日
you can use image() with XData and YData and AlphaData
  1 件のコメント
xi
xi 2020 年 11 月 6 日
Thanks, it works, simpler than what I thought.
I'm using I=imagesc(axes,'CData',C) to add additional images to the same axes. and then set the properties of I.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by