Presets

The F.A.S.T. Cloud SDK includes a set of standard presets found inside ./foviaserver/data/presets. These are small XML files that contain a saved rendering state. These preset files can be loaded into a RenderParams structure, and then applied to a RenderEngineContext3D object. preset files can also be saved from a RenderParams structure to disk. Saving and loading of preset files is done with the ServerContext.saveXMLPreset() and ServerContext.loadXMLPreset() methods.

The simple HelloFovia example has been expanded to allow for viewing of each preset through the helloFoviaPreset example app. Press the "p" key to cycle through all presets. Documented source code is found inside ./foviaserver/public/apps/hellofovia/preset.js. As you review the code, take note of the createBoneRenderParameters() method that shows how to programatically create a transfer function from scratch.

Transfer Function Editor Application

Included in the F.A.S.T. Cloud SDK example directory is a transfer function graphical TransferFunctionEditor that can be used stand alone, or if desired incorporated into your application. This would most likely be an advanced feature since most users would not require such functionality.  Source code is found inside ./foviaserver/public/apps/tfeditor/tfEditor.js.

The transfer function editor allows one to create and edit transfer function settings such as control point position, color, opacity, and lighting. It can also be used to configure widow/level settings. The transfer function settings can be edited and previewed in real time in an associated HDVR render window. Multiple transfer functions can be saved to disk, then loaded and automatically applied to renderenginecontext3d objects. This is done with the renderenginecontext3d.saveTransferFunctionToFile() and renderenginecontext3d.loadTransferFunctionFromFile() methods. Transfer functions can be saved and loaded independent of the RenderEngineContext3D class with the ServerContext.saveXMLTransferFunction() and ServerContext.loadXMLTransferFunction() methods.

For more information on transfer functions and how to configure them, see Transfer Functions and Advanced Transfer Functions.



 F.A.S.T. WebAppBuilder