How to change the color of dicom loop using function image?
2 次查看(过去 30 天)
显示 更早的评论
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
回答(1 个)
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 Center 和 File Exchange 中查找有关 Import, Export, and Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!