Dear sir, i hope to get matlab code from pseudocode !! Please Help Me

1 view (last 30 days)
first function is
DT(volume) { mask[13] = (5,4,5,4,3,4,5,4,5,4,3,4,3); magic_number = volume.x + volume.y + volume.z; for (z = 1 to volume.z) { for (y = 1 to volume.y) { for (x = 1 to volume.x) { if (volume[x][y][z] = 1) volume[x][y][z] = magic_number; } } } for (z = 1 to volume.z) { for (y = 1 to volume.y) { for (x = 1 to volume.x) { for (i = 12 downto 0) { sum = mask[i] + volume[i]; // volume[i] represents an offset from the // centered voxel based on the mask location if (sum < volume[x][y][z])) volume[x][y][z] = sum; } } } } for (z = volume.z-2 downto 1) { for (y = volume.y-2 downto 1) { for (x = volume.x-2 downto 1) { for (i = 12 downto 0) { sum = mask[i] + volume[i]; // volume[i] represents an offset from the // centered voxel based on the mask location if (sum < volume[x][y][z]) volume[x][y][z] = sum; } } } } }
and second is
LM(list, DT) { for (all DT[p]) { if (DT[p] != 0) { if (LMC(DT, p) { radius = DT[p]; list.add(p,radius); } } } LMC(DT, p) { // mask v[3][3][3] = {{{5,4,5},{4,3,4},{5,4,5}}, {{4,3,4},{3,0,3},{4,3,4}}, {{5,4,5},{4,3,4},{5,4,5}}}; for (all v) { // exclude center voxel if (v != 0) { if (DT[p+v] = DT[p] + W[v]) return false; // failed LMC, not a LM } } return true; // passed LMC, is a LM }
third is
LUT(DT, LM points) { for (all LM points) { if (radius = 3) { for (all a positions) { if (DT[p+a] = 4) // remove LM point from list // test next LM point } for (all b positions) { if (DT[p+b] = 5) // remove LM point from list // test next LM point } for (all c positions) { if (DT[p+c] = 6) // remove LM point from list // test next LM point } } } }
Please I really need these in matlab code>>

Answers (1)

Image Analyst
Image Analyst on 18 Jul 2014
Edited: Image Analyst on 18 Jul 2014

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!