Applying Marching Cubes algorithm

4 ビュー (過去 30 日間)
rahul unnikrishnan
rahul unnikrishnan 2019 年 3 月 19 日
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 Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by