how to know if an image is int16 or uint16 in dicom file

조회 수: 6 (최근 30일)
Houssam
Houssam 2021년 6월 6일
Hi Comunity,
i am reading dcm files from scratch and i ve manage to get the header and the image matrix using the fread function.
dcm_pixel_data = fread(dcm_file_id, [pixel_data_Width pixel_data_Height], 'uint16')';
whene i compare my result with the output of the matlab function 'dicomread()' using 'ssim()' some time i get 1, but some times i don't get 1!!
whene i searched & debuged i found that the images are not always in 'uint16' bits but can be 'int16' (i think the negative pixels are noise but plz to correct me if i am wrong!) what parameter in the header indicates the whether to use 'int16' or 'uint16'!

답변 (0개)

카테고리

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