convert 16 bit to 32 bit

33 ビュー (過去 30 日間)
mohd akmal masud
mohd akmal masud 2018 年 2 月 20 日
コメント済み: Stephen23 2018 年 2 月 20 日
hi all,
i have image dicom 16 bit. my problem is, 16 bit image can stored pixel value till 32767 only. now i want change it to 32 bit or 64 bit so that the pixel value can stored more than that, and corresponding how much activity radionuclides i used to diagnosed patient.
Anyone knows how to convert that using matlab? or anyway to solve it?

採用された回答

Daniel Bridges
Daniel Bridges 2018 年 2 月 20 日
編集済み: Daniel Bridges 2018 年 2 月 20 日
I use the following code for my DICOM dose files to be read by MIM Maestro:
MaxUnsignedInteger = 65535; % cf. https://en.wikipedia.org/wiki/65,535#In_computing
blurreddose = MaxUnsignedInteger / max(max(max(blurreddose))) * blurreddose;
blurreddose = uint16(reshape(blurreddose,...
[size(blurreddose,1) size(blurreddose,2) 1 size(blurreddose,3)]));
Have you read the documentation for uint16, uint32, uint64 ? These articles may answer or lead you to the answer you need.
  2 件のコメント
mohd akmal masud
mohd akmal masud 2018 年 2 月 20 日
what is bluereddose? is it bluereddose is variable?
Stephen23
Stephen23 2018 年 2 月 20 日
"what is bluereddose? is it bluereddose is variable?"
Yes, it is a variable. You can learn basic MATLAB concepts, like how to define a variable, by doing the introductory tutorials (which are highly recommended for all beginners):

サインインしてコメントする。

その他の回答 (1 件)

Image Analyst
Image Analyst 2018 年 2 月 20 日
If you want you can convert to double, single, or int32 and save images in a .mat file.
dblData = double(data16);
int32Data = int32(data16);
Or convert to uint16 and save in standard PNG format.
data16 = uint16(data16); % Now can go up to 65535 instead of 32767
I'd guess you can save back into dicom with uint16, but I don't use dicom format - I use PNG.
  1 件のコメント
mohd akmal masud
mohd akmal masud 2018 年 2 月 20 日
If my image name is PET_I1001_PT135.dcm, then i write like this to convert it:
P=dicomread('PET_I1001_PT135.dcm');
dblData= double(P)
int32Data = int32(P)
is it true?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeImage Processing and Computer Vision についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by