legend and size of an image

6 次查看(过去 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 CenterFile Exchange 中查找有关 Legend 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by