MATLAB: DICOM, pixel value

dicom imagepixel value

how to proceed to find specific pixel value range (suppose 1000 to 1500) in a 512×512 16 uint DICOM image and color this range with yellow or any color ?

Best Answer

img = dicomread(FileName);
mask = 1000 <= img & img <= 1500;
R = img; R(mask) = 0; %yellow is 0, max, max
G = img; G(mask) = intmax(class(img));
B = img; B(mask) = intmax(class(img));
RGB = cat(3, R, G, B);
image(RGB)