How to plot ROI onto a DICOM Image?
조회 수: 6 (최근 30일)
이전 댓글 표시
Hi,
I have am using an Interactive DICOM 3D Viewer that allows me to view the axial, coronal and sagittal planes of a DICOM image. I am using roipoly to select a region of interest and I want to be able to save those co-ordinates on the specific slice of the CT. However as I scroll through the different slices in say the axial view the region of interest disappears. Any ideas on how to apply this?
Thanks
댓글 수: 1
답변 (1개)
Vyoma Shukla
2020년 3월 30일
Hi,
This might help you. I am loading each sagittal slice of my 3D DICOM dataset in a for loop. This code is for drawing an ellipse on the 67th slice and calculating mean and standard deviation of the ellipse. I checked against ImageJ and my calculated values are accurate. You can adapt this code to your data:
I1 = dicomread('I67');
info = dicominfo('I67');
cx = double(getfield(info,'Rows')); % find centre of image
cy = double(getfield(info,'Columns'));
diam = 0.05*cx; % ROI size
h_im = imshow(imadjust(I1));
e = imellipse(gca,[cx/2-(diam/2) cy/2-(diam/2) diam diam]); % this is interactive, may want to pause here
BW = createMask(e);
BW = int16(BW);
I1(BW==0)=[]; % remove background
BW(BW==0)=[];
I1 = imresize(I1, [size(BW,1) size(BW,2)]);
I2 = I1.*BW;
average = mean(I2);
stdev = std2(I2);
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 DICOM Format에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!