Filter löschen
Filter löschen

How to compute 3D surface area from 2D CT images

6 Ansichten (letzte 30 Tage)
Gopichandh Danala
Gopichandh Danala am 1 Sep. 2016
Beantwortet: Koray Ertan am 21 Aug. 2022
Hi, I work with 2D slices of CT images (Dicom images). I segmented tumor from all these 20 slices using some segmentation algorithms.
Now, I have 20 slices of segmented CT scans lets say slice1, slice2, ...slice20
Now I have to combine this 20 slices somehow and extract surface area.
I found this link:
I don't understand how is x-cord,y-cord, and z-cord computed here.
And I think some of this code is repeated and wrong.
Can someone please help me compute the 3D surface area by combing all the individual 2D slices.
Any help is greatly appreciated.
Thanks,
Gopi

Antworten (2)

Image Analyst
Image Analyst am 1 Sep. 2016
Bearbeitet: Image Analyst am 1 Sep. 2016
Simply call bwperim() on your segmented tumor images, which you say you already have. Then sum up the image
totalSurfaceArea = 0;
for slice = 1 : numSlices
thisBinaryImage = .......whatever, your segmented image.
thisPerimeter = bwperim(thisBinaryImage)
voxelsInThisSlice = sum(thisPerimeter(:));
totalSurfaceArea = totalSurfaceArea + voxelsInThisSlice;
end
Essentially you're counting up all voxels that are on the outer edge of your tumor and touch other tissue or air or whatever is not tumor.
  2 Kommentare
Gopichandh Danala
Gopichandh Danala am 1 Sep. 2016
Thank you for Your answer Image Analyst..I used your code and have a small problem. I will try and explain : I attached a copy of montage image of 8 thisperimeter images. From my understanding of your explanation, it counts voxels on boundaries and takes it as surface area. But it is only counting the voxels on edges of tumor ..as my images won't converge to form a sphere or something I am missing the total surface around these tumor images and only getting the edge voxels. Can I compute the surface voxels of first and last tumor images and add it to totalSurfaceArea to make it like a whole surface/... Please give your suggestions Modify code and help me understand better Thanks Gopi
Gopichandh Danala
Gopichandh Danala am 1 Sep. 2016
Bearbeitet: Gopichandh Danala am 1 Sep. 2016
More Details on this: Here I have pixel spacing so, I computed pixel Area and used it along with number of voxels to get surface area and for edge slices, I considered all pixels in slice and for all in between pixels I used the boundary pixels Below is the code:
slice_thickness = info.SliceThickness;
PixelSpacing = info.PixelSpacing;
pixelArea = PixelSpacing(1, 1) * PixelSpacing(2, 1);
totalSurfaceArea = 0;
for slice = 1 : numel(region)
thisBinaryImage = region{slice};
if (slice == 1 || slice == numel(region)) % if end slice
bwimage = logical(region{slice});
voxelsInThisSlice = sum(bwimage(:));
else % else if between slice
thisBinaryImage = region{slice};
thisPerimeter = bwperim(thisBinaryImage);
%permeterimg{slice} = thisPerimeter;
voxelsInThisSlice = sum(thisPerimeter(:));
end
voxelsInThisSliceArea = voxelsInThisSlice * pixelArea;
totalSurfaceArea = totalSurfaceArea + voxelsInThisSliceArea;
end
Does this make sense to compute the surface area, I was not able to use slice thickness.
Check this and suggest is it is valid and suggest edits and can i make use of slice thickness to compute the surface area.
Thanks Gopi

Melden Sie sich an, um zu kommentieren.


Koray Ertan
Koray Ertan am 21 Aug. 2022
I think the above approach may be wrong because you do not account for the slope of the surface when you just sum the voxelized area.
boundary function may be a better fit for this task.
https://www.mathworks.com/help/matlab/ref/boundary.html

Community Treasure Hunt

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

Start Hunting!

Translated by