Effacer les filtres
Effacer les filtres

How to read only Axial view of lung CT DICOM image in matlab?

3 vues (au cours des 30 derniers jours)
Zubda Butt
Zubda Butt le 19 Déc 2015
Commenté : harjeet singh le 21 Déc 2015
I have a database of lung Ct scans in Dicom format. In ITK snap 3 views of image are opened. I just want to open axial view of CT in matlab. How can I do that?
  4 commentaires
harjeet singh
harjeet singh le 20 Déc 2015
now do you want automatic clip top left corner image using matlab?
Zubda Butt
Zubda Butt le 20 Déc 2015
yes.

Connectez-vous pour commenter.

Réponse acceptée

harjeet singh
harjeet singh le 20 Déc 2015
dear zubda do use this code
clear all
close all
clc
a=imread('ct.png');
figure(1)
imshow(a)
b=~(a(:,:,1)==240 & a(:,:,2)==240 & a(:,:,3)==240);
figure(2)
imshow(b);
[m,n]=size(b);
[lab,num]=bwlabel(b);
for i=1:num
[r,c]=find(lab==i);
loco(i,:)=[i mean(r) mean(c)];
end
loco(:,4)=sqrt( (loco(:,2)-m*0.2885).^2 + (loco(:,3)-n*0.7794).^2);
loco=sortrows(loco,4);
[r,c]=find(lab==loco(1,1));
c=a(min(r):max(r),min(c):max(c),:);
figure(3)
imshow(c)
drawnow
  2 commentaires
Zubda Butt
Zubda Butt le 21 Déc 2015
Thank you Sir for your help. Code is working. :) Can you please guide me to some good matlab tutorial source where I can learn and understand code and get help for errors in my code?
harjeet singh
harjeet singh le 21 Déc 2015
try to solve as many tasks as you can for basics of matlab, do evolve your own little tasks whatever you think and do try to solve that with matlab. rest matlab help is the perfect for knowing commands and fuctions.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur DICOM Format dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by