legend and size of an image

4 visualizaciones (últimos 30 días)
Shel
Shel el 14 de En. de 2019
Editada: Adam el 16 de En. de 2019
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 comentarios
Shel
Shel el 16 de En. de 2019
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 el 16 de En. de 2019
Editada: Adam el 16 de En. de 2019
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.

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by