| The method of direct volume rendering can generate image of 3d dataset with high quality details, and image segmentation is not necessary in this method. With the reasons above, direct volume rendering is currently replacing surface rendering and becoming the dominant method of 3d reconstruction of medical images. But there are many factors affecting the quality of result images, and they are hard to control because of the complicated relation among them. In addition, the time complexity of this algorithm is so high that the users'request for real-time response can't be satisfied.Considering the situations mentioned above, this dissertation studies the ray casting algorithm, a main method for direct volume rendering, and primarily researches the implementation of ray casting algorithm based on OpenGL library. Some strategies to improve the method are also discussed. The main results are as follows:1. Direct volume rendering can generate images with high quality details, but it need either to access each sample point in the 3d dataset, and combine the contribution to the screen's pixels of these sample points, or to cast a series of lights from the screen's pixels, and then combine the color for each light, both of which include a mass of calculation. This dissertation studies a ray casting algorithm based on OpenGL library. The method calculates the accurate projective regions of 3d regular datasets grounded on OpenGL library and its 3d view matrices. Consequently it reduces the amount of rays being cast in ray casting algorithm. In addition, the large computation among these matrices has also been optimized in its implementation code, and this also improves the algorithm to a certain extent.2. The reasonable and realistic images of rendering results are given by using the light of Phone illumination model and importing extra light source. An accelerated algorithm by encoding normal for 3d dataset and pre-calculating three types of shade tables was proposed. Although the algorithm takes longer time and more memory by preprocessing, it obtains lower time complexity for ray casting algorithm and provides more flexible interactive manners with users. 3. For the problem of tissue classification which is hardest in volume rendering, even in scientific visualization, some principles of designing linear transfer function are concluded and a multidimensional transfer function based on a data structure we term the histogram volume is also studied, then a group of brain MRI images are analyzed using the fuzzy c-means clustering (FCM) algorithm. The result shows that segmentation methods based on fuzzy theory is efficient to the medical image segmentation.4. A software system using methods mentioned above is finished. The design and implementation of this system with the flow charts are mentioned in the dissertation. In addition, the implementation code of important parts in the algorithm is also given in this dissertation. |