Isosurface with Marching Cubes

 

 

My final project creates an isosurface at a user specified threshold.  The data set I used was a CT scan of a human head.  It is 113 slices of the head at 256 x 256 resolution.  The first thing I did was to make slight modifications to program three, just to make sure that I was loading in the data correctly.  This produced the following results for two slices.

 

    

 

Next I proceeded with the marching cubes algorithm.  The version of the algorithm I used goes as follows.

 

         Load in two slices

         Create cells form the slices

         For each cell

            Get index

            Get list of edge intersections with index

            Interpolate where the threshold crosses the edge

            Get list of triangles with index

 

Shading did not work 100% correctly so the following results were produced.  The figure on the left has an isovalue of 0.8 and the figure on the right has an isovalue of 0.6.

 

    

 

 

Program usage:  Specify a threshold and a resolution using the controls provided.  Once the data is displayed, it can be rotated using the controls on the left of the form.