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 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!