I read dicom Image in matlab. Pixel intensity range is really large. I want to rescale Pixel intensity to 0 - 1000. How Can I modify the Image ?
I would appreciate for any help please.
Be careful when rescaling DICOM image data like this. It is possible (for some images) that the actual pixel values correspond to actual units.
If you do want to rescale everything, there are a number of ways to do this.
imadjust
If you have the image processing toolbox you can use imadjust
to adjust the range.
imout = imadjust(double(im), [min(im(:)), max(im(:))], [0 1000]);
mat2gray
mat2gray
automatically normalizes an image between 0 and 1. You can then multiply the result by 1000.
imout = mat2gray(im) * 1000;
Manual Normalization
imout = im - min(im(:));
imout = imout * 1000 ./ max(imout(:));