Is it possible to obtain a binary image representation of a DICOM IMAGE?
Show older comments
I have converted a DICOM image to a grayscale image first and then used then used 'im2bw' function to get the binary image but the output is totally different from the input.the code is given as:
clear all;
X = dicomread('000018.dcm');
figure,imshow(X,[]),title('Original Dicom Image');
img = double(X);
img = (img - min(img(:))) / (max(img(:)) - min(img(:)));
img = uint8(255*img);
figure,imshow(img,[]),title('Original Grayscale Image');
The input dicom image is:

But the output after im2bw is:

Can i get an image like this ?

I got this binary image by converting the dicom file to jpeg and then using im2bw but it results in compression and hence loss of data. I need to get it directly from the dicom image. Is it possible?
3 Comments
Nuno
on 2 Mar 2015
Hello, You already find how make that?
Nuno
on 2 Mar 2015
Your images are 3D or 2D?
Pratik Datta
on 3 Mar 2015
Accepted Answer
More Answers (0)
Categories
Find more on Convert Image Type in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!