legend and size of an image

4 ビュー (過去 30 日間)
Shel
Shel 2019 年 1 月 14 日
編集済み: Adam 2019 年 1 月 16 日
Hello everybody,
Would you guide me?
I am working with matlab to process my images and I have three questions.
  1. I am building a stack from my images but is it possible to add a legend so that I can understand the values that are shown by the image?
  2. Also, how can I rotate the image 90 degrees clockwise) as the imagesc(rot90(coronalimg,3)) and figure, img=imrotate(Img,(90)) gives errors.
  3. is it possible to have the correct proportion of width and depth smaller or bigger than the "truesize"?
here is my code:
source_dir=uigetdir([]);
fontSize=10
d=dir([source_dir,'\8-*.dcm']);
totalfile=length(d);
for i=1:totalfile
fname=['8-',num2str(i), '.dcm'];
indicom=dicomread(fullfile(source_dir, fname));
stack(:,:,i)=indicom;
end
figure,
coronalimg=squeeze(stack(:,256,:));
%imagesc(rot90(coronalimg,3))
Img=imagesc((coronalimg))
truesize
%figure, img=imrotate(Img,(90))
  2 件のコメント
Shel
Shel 2019 年 1 月 16 日
Does anyone have any idea how to solve this issues?
Or how to add the legend to the picture?
I would be really thankful
Adam
Adam 2019 年 1 月 16 日
編集済み: Adam 2019 年 1 月 16 日
What would you expect a legend to show for an image? Legends are usually used for line plots or similar, with one entry for each line.
doc permute
can be used to rotate an image if it is true RGB. Or just transpose it if it is greyscale 2d.
doc daspect
can set the aspect ratio.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeLegend についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by