Advanced Transfer Function Concepts

Summary

 

Designing a transfer function to effectively and efficiently visualize a dataset is an essential part of developing a volume rendering application. The design of the transfer function affects not only how effective the data visualization is, but also affects the rendering performance of the application. This section provides some tips on transfer function design, and several examples that show how to properly create a transfer function. The transfer function examples are represented here with screenshots from the Fovia Workstation application, which provides a useful transfer function development and testing platform. Example preset XML files are also provided with the F.A.S.T. Cloud SDK distribution. 

 

Transfer Function Shape

 

The suggested way to begin is with a triangular or trapezoid shaped transfer function (Figures 1-2). Next, progress towards a bell shaped curve by adding additional ascending and descending control points (Figures 3-6). This will add more depth to the rendered image. These ascending and descending control points largely affect the tonal range of the rendered image, while the bounding control points contribute more to the overall color. Finally, make fine adjustments to the control point positions to achieve the desired color and opacity values. For best interactive performance, try to keep the distance between control points along the x-axis as even as possible. (Figures 7-8).

 

ATF_TF1
Figure 1: A trapezoid transfer function.
ATF_EX1
Figure 2: Image result from Fig. 1.

 

ATF_TF2
Figure 3: A curved transfer function.
ATF_EX2
Figure 4: Image result from Fig. 3.

 

ATF_TF3
Figure 5: Adding additional control points for depth.
ATF_EX3
Figure 6: Image result from Fig. 5.

 

ATF_TF4
Figure 7: Final adjusted transfer function.
ATF_EX4
Figure 8: Image result from Fig. 7.

 

Avoiding Undersampling

 

Rapidly changing color (sharp color gradients in the Transfer Function) in conjunction with high opacity may increase the probability of undersampling artifacts and create the “zebra” pattern shown in Figures 11-12. Therefore, keeping color as uniform as possible, as well as maintaining relatively low opacities (Figures 9-10) will reduce the probability of undersampling artifacts.

 

ATF_USTF1
Figure 9: Uniform color spacing.
ATF_USEX1
Figure 10: Image result from Fig 9.

 

ATF_USTF2
Figure 11: Sharp opacity gradient at point A.
ATF_USEX2
Figure 12: Undersampling results in zebra pattern.

 

Value Range for Skin

 

The range of values for film-like tissue such as skin is considerably smaller than ranges of values for other types of tissue and will take up only a small portion of the scalar field within the transfer function. Because of this small range of values, it is this tissue that has the highest probability of being undersampled. Therefore these tissues should be represented by transfer function ranges that are as wide as possible within the 'skin section' of the scalar field. The skin section is shown in the render range on the left-hand side of the transfer functions in Figures 13 and 15. The resulting images are shown in Figures 14 and 16. Note the reduced undersampling in Figure 14 as compared to Figure 16.

 

ATF_SVTF1
Figure 13: Wide TF range of skin values.
ATF_SVEX1
Figure 14: Reduced undersampling.

 

ATF_SVTF2
Figure 15: Narrow TF range of skin values.
ATF_SVEX2
Figure 16: Increased undersampling.

 

Optimizing a Dental Preset

 

Small changes to transfer function lighting and opacity can have a significant impact on the appearance of the dataset and rendering efficiency. Figures 17-18 show an initial dental transfer function. A noticeable amount of pixelation is present in the rendered image. Note that this initial transfer function does not have lighting enabled on any of the control points. Figures 19-22 show the reduction in pixelation by adding lighting to control points one and two. While this lighting improves the appearance of the image it will have a negative impact on rendering efficiency. A further improvement in pixelation and contrast between the teeth and jaw can be obtained instead by modifying the opacity of control points two and three from the original transfer function in Figure 17. This results in the best quality image and has the additional benefit of not using control point lighting. Turning off lighting for transfer function control points will significantly accelerate rendering. This is because the normal gradients at the dataset's virtual surface can be ignored. The rendering algorithm therefore does not need to traverse the entire octree down to individual voxels. Therefore, it is recommended to turn off lighting for transfer function control points where not necessary.

 

ATF_DentTF1
Figure 17: Initial transfer function.
ATF_DentImg1
Figure 18: Noticeable pixelation in image.

 

ATF_DentTF2
Figure 19: Lighting added to control point 2.
ATF_DentImg2
Figure 20: Reduced image pixelation.

 

ATF_DentTF3
Figure 21: Lighting added to control point 1.
ATF_DentImg3
Figure 22: Further reduction in image pixelation.

 

ATF_DentTF4
Figure 23: Opacity of original control points adjusted.
ATF_DentImg4
Figure 24: Smooth image and improved contrast.