Applying Marching Cubes algorithm

4 次查看(过去 30 天)
In my project,I need to apply Marching Cubes Algorithm to my data.My data consists of 174 slices of CT scan of lung images.How can I apply it to marching cubes algorithm obtained from marchingcubes.
I tried the code below
dcmfiles = ReadAllFiles(folderPath, 'dcm');
dcmLength = length(dcmfiles);
n=dcmLength ;
a={}; slices={};
for i = 1:n
width = 1370;
center = 700;
low = center - round(width/2);
high = center + round(width/2);
a{i}= dicomread(dcmfiles{i});
slices{i} = (a{i});
end
C = cat(3,slices{1:end});
[nX,nY,nZ] = size(C);
[X,Y,Z] = meshgrid(1:nX,1:nY,1:nZ);
[F,V,col] = MarchingCubes(X,Y,Z,C,4)
Please provide the correct code

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by