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!