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

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

dear zubda, do upload an example dicom format
Zubda Butt
Zubda Butt 2015년 12월 19일
편집: Zubda Butt 2015년 12월 19일
This DCM image is opened in ITK SNAP . I want to process this image in matlab using only its axial view which is in top left corner.
now do you want automatic clip top left corner image using matlab?

댓글을 달려면 로그인하십시오.

 채택된 답변

harjeet singh
harjeet singh 2015년 12월 20일
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

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?
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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Convert Image Type에 대해 자세히 알아보기

질문:

2015년 12월 19일

댓글:

2015년 12월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by