Borrar filtros
Borrar filtros

K means clustering in DICOM files

2 visualizaciones (últimos 30 días)
George
George el 3 de Sept. de 2015
Editada: Hamoon el 7 de Sept. de 2015
Hi guys. I attempt to do k mean clustering to detect some small areas of very bright or very dark spots inside a DICOM file. The problem is that I can not find the right format for my DICOM images to perform the k-mean function in Matlab. My images are let's say 256*256 and when I do perform k mean clustering I get back a 256*1 matrix which I am not sure how to interpret. Any ideas would be really much appreciated! Best wishes, George

Respuestas (1)

Hamoon
Hamoon el 7 de Sept. de 2015
Editada: Hamoon el 7 de Sept. de 2015
It'll be better idea if you do feature extraction on your image before using kmeans, but If you simply want to perform kmeans on pixel intensities of your gray level image, you can try this:
im=imread('cameraman.tif'); % an exemplar image (256*256)
imData = reshape(im,[],1); % convert it to an array (65536*1)
imData = double(imData); % convert from uint8 to double
IDX = kmeans(imData,2); % perform kmeans with two clusters
imIDX = reshape(IDX,size(im)); % a (256*256) matrix of indexes

Categorías

Más información sobre DICOM Format en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by