Questions on Isosurface() command

Hello Everyone,
I have some questions regarding isosurface command. Image daset has 2D slices of CT images and can be represented by pixelsinXDir * pixelsinYDir * numberofSlices
1) Is there any specific research paper on which this command has been derived. I know that ultimately it uses interp3(). However, I want to learn theory behind it as well.
2) When we calculate fv=isosurface(imagename,isovalue); it generated structure with Faces and Vertices. Vertices matrix can easily be under stood with its X, Y and Z co-ordinates. What does matrix of face give?
3) Will the final volume be the Voxel data? if so then how the volume is to be calculated? (Using sum(imageset(:)) this?)
4) In order to calculate Centroid of the 3D volume how to proceed? I have written a code as well. Is it correct?
CC=bwconncomp(imgs, 26); % imgs is the image dataset 3D
Center=regionprops(CC,'Centroid');
Thanking you in anticipation. I appreciate your time and efforts for this.

2 Comments

I think you have given the wrong URL for the dataset. You just gave a link to my FAQ answer from several years ago about sites that supported file uploads back then. These days you would probably use dropbox or google drive for larger files, or would upload the data here if it is not so big.
Hi Walter, Thanks for letting me know. I have changed that link, it was my mistake. Sorry for that...

Sign in to comment.

 Accepted Answer

Walter Roberson
Walter Roberson on 14 Apr 2018
2) The matrix of faces tells which vertices are connected to which.
3) What "final volume" ? isosurface() is for drawing, not for computing volume.
4) No, that code with bwconncomp calculates the centroid of each of the connected components independently, not the centroid of the 3D volume. For the centroid of the 3D volume you would regionprops Centroid of a binary version of the dataset, with the binary being whether the voxel was occupied or not.

7 Comments

Mahi
Mahi on 14 Apr 2018
Edited: Mahi on 14 Apr 2018
Thanks very much for answering.
Regarding 2nd point: if isosurface is for drawing only then how to compute the volume.
Regarding 3rd point: if I use binary dataset then can I use regionprops directly?
Thanking you in anticipation.
If you were to regionprops() something of datatype logical then Regionprops would automatically run labeling on it and calculate the per-region statistics. So the trick is to double() the logical values, making everything into a label matrix with labels 0 and 1, thereby identifying all of the points as being part of the same object that you can calculate the Centroid of
regionprops(double(TheBinaryMatrix), 'Centroid')
Thanks very much Walter, If I can try following command then would it be proper?
imgs=logical(imgs); %Bydefault imgs is in double
center=regionprops3(bwconncomp(imgs,26),'Centroid'); %regionprops3 takes binary data only
volume=regionprops3(bwconncomp(imgs,26),'Volume');
I checked your way as well, in both regionprops()- with double datatype and regionprops3()- with logical datatype; I get the same centroid values. Main advantage with regionprops3() is that-it calculates volume as well.
I wonder that that volume let us say, 2422985 - in which unit?- is it in number of voxels?
Yes, the unit would be in voxels.
delta x and delta y are typically the same for DICOM images, but delta z is not necessarily the same. I have not used much CT so I do not know the convention for those, but for MRI images it was not uncommon that delta z was twice as large as delta x or delta y.
You would get real-world volume by multiplying voxels by delta x * delta y * delta z.
Thanks very much, Walter...!

Sign in to comment.

More Answers (0)

Products

Asked:

on 14 Apr 2018

Commented:

on 15 Apr 2018

Community Treasure Hunt

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

Start Hunting!