As we observed in the context of surface visualization, the loading of data into a WebGL application is different from traditional loading of data in offline applications. To get started on volume visualization, you should develop code for loading volume data. Pick one of the following options to obtain a loader.
Rewrite the loader you choose as a JavaScript loader to be used for a WebGL application. Once you can load the data, you should try to do simple scalar visualization of slices from the data.
The next step is to ready your code for doing isosurface extraction using marching cubes. To find the rays along which to march, it is convenient to store the position of the back of the volume bounding box for every fragment in a texture. Then, in the next pass, the position of the front of the volume bounding box (together with the texture) provides the required information for every fragment. Storing positions in a texture is most easily accomplished by rendering to the texture. This technique is explained in the eigth subsection of Chapter 10 in GL. Use the code sample from GL to implement a WebGL program which finds the back positions needed for isosurface extraction using marching cubes. As we shall see in the coming weeks, this is also an excellent outset for other volume visualization techniques.
DV | Sections 5.3, 8.1-8.2, and 10-10.1. Contouring, cutting, selection, and motivation of volume visualization. |
GL | Chapter 10, the eigth subsection. Use what you've drawn as a texture image. |