Skeletonizing a 3d voxel data

14 vues (au cours des 30 derniers jours)
Karthick Jayaraman
Karthick Jayaraman le 20 Août 2019
Commenté : Rik le 28 Août 2019
I have voxel data in a csv file. It has 3 columns representing x,y,z coordinates and 9000 rows. After csv read and scatter3, I am able to visualize the 3d object in xy and z coordinates. the task at hand is to convert it into a binary image and skeletonize the 3D plot (3D object) and get the bracnhes and the end points of the skeleton. I am an amateur and so any suggestions would be helpful!
  2 commentaires
darova
darova le 20 Août 2019
Can you attach the data?
Karthick Jayaraman
Karthick Jayaraman le 20 Août 2019
Hi, I dont have my file that I need to work but here is an example. in Book1.csv I used the following command for a 3D graph
air = dlmread('Book1.csv',' ');
scatter3(air(:,1),air(:,2),air(:,3))

Connectez-vous pour commenter.

Réponse acceptée

Rik
Rik le 20 Août 2019
I generated some random points to show how your code should work. The attached function is an edited version of a FEX entry. This function doesn't require any toolbox. If you have the image processing toolbox, you can use bwskel instead.
L=false(20,15,30);
x=randi(size(L,1),1000,1);
y=randi(size(L,2),numel(x),1);
z=randi(size(L,3),numel(x),1);
ind=sub2ind(size(L),x,y,z);
L(ind)=true;
skel=Skeleton3D(L);
  6 commentaires
Karthick Jayaraman
Karthick Jayaraman le 28 Août 2019
The purpose of skeletonizing is to determine where the branch starts and find the area and volume of that entire segment corresponding to that branch in 3D. In that process, I notice there are many 3rd and 4th degree branches (like a branch that originates from a branch from the main stem).
Any suggestion on how to avoid the 3rd degree branch and calculate the volume of that not just the branch but the entire segment of that particular 3D structure would be helpful.
Rik
Rik le 28 Août 2019
The attached function is a slightly improved version of what I previously posted. Still not ready for the FEX, but you may find it usefull. This function returns the labeled tree. It should be possible to determine the children branches from this.
I have the feeling you're trying to use this for the same thing as I am: segmenting the bronchial tree.
I can't really help you with calculating the area and volume of segments, because that means you need to undo the skeletonization. For my goal it is enough to have the centerline, and I don't even need the generation number (apart from the trachea and the main bronchi), so for me this does the trick.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by