How to plot ROI onto a DICOM Image?

6 Ansichten (letzte 30 Tage)
Michael Liu
Michael Liu am 8 Jun. 2016
Beantwortet: Vyoma Shukla am 30 Mär. 2020
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 Kommentar
Walter Roberson
Walter Roberson am 11 Jun. 2016
Which interactive DICOM 3D viewer are you using?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Vyoma Shukla
Vyoma Shukla am 30 Mär. 2020
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);

Kategorien

Mehr zu DICOM Format finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by