Is there any difference between operation on .dcm and .tiff?

4 ビュー (過去 30 日間)
jack nn
jack nn 2015 年 6 月 19 日
回答済み: Walter Roberson 2015 年 6 月 19 日
hi everybody I want to operate some commands on a .dcm Image. but I've encounter an strange thing. when I convert my .dcm Image to .tiff I receive the result that I expected. but when I use Image=dicomread(Image); Image = uint8(255 * mat2gray(Image));
I couldn't receive the result that I expected.I couldn't understand what happens. where is the problem? please help me.

回答 (1 件)

Walter Roberson
Walter Roberson 2015 年 6 月 19 日
mat2gray() scales the data so that the smallest value in the data maps to 0 and the largest value in the data maps to 1. Are you certain that is what you intend? Perhaps rgb2gray() would be more appropriate?
Note: instead of uint8(255 * ARRAY) you should use im2uint8(ARRAY)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by