How to change the color of dicom loop using function image?

조회 수: 2 (최근 30일)
Jaroslava Orenicova
Jaroslava Orenicova 2017년 11월 29일
댓글: Jaroslava Orenicova 2017년 11월 29일
Hello, I have a problem with coloring my dicom loop. I have a GUI for loading and displaying DICOM loop from ultrasound. Im using function image for displaying loop because this function is the best option with timing for me }functions as imshow and so on are too slow). The loop should be black and white, but after displaying its blue and yellow. Could anyone help me how can I change the coloring of the loop? Thanks
  댓글 수: 3
Jaroslava Orenicova
Jaroslava Orenicova 2017년 11월 29일
for i = 1 : nFrames cla reset image(loading_dicom(:,:,i)) pause(0.0001);
end
Jaroslava Orenicova
Jaroslava Orenicova 2017년 11월 29일
I used imshow first, the color was good but it was too slow for me.

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2017년 11월 29일
편집: Walter Roberson 2017년 11월 29일
colormap(gray(256))
Note: because timing is important to you, you should be coding something like,
for idx = 1: ....
...
if idx == 1
ih = image(YourData);
colormap(gray(256));
else
set(ih, 'CData', YourData);
end
title( sprintf('Slice #%d', idx) );
drawnow();
end

카테고리

Help CenterFile Exchange에서 DICOM Format에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by