RENDER_PARAMS

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

RENDER_PARAMS

Return to chapter overview

C++ C++ Java Java .NET .NET

Summary

 

The rendering state of each view is represented by the RENDER_PARAMS class. This includes the render type, transfer function, min/max range, slab thickness, transformation matrices, lighting details, quality setting, and anything else that effects how the volumetric data.as defined by the Volume Data Context.

 

This is a compact structure that can be easily serialized to XML to quickly save and load presets or predefined rendering states, used to represent key images or presentation states, or in the medical field to build radiology hanging protocol. See Managing Presets for more details.

 

Initialization and usage

 

When changing these values, the Mask field allows you to set/get a part of the rendering parameters. It will generally be faster to update the changing part of rendering parameters instead of unconditionally setting all of them. For instance, when only orientation is changed the Mask should be set to hdrcDefines.RPM_TRANSFORM.

 

Similarly, FlagsMask fields specifies which of the flags are valid in this object. For example. A FlagsMask of RF_DONT_NORMALIZE_TF and Flags of 0 means that RF_DONT_NORMALIZE_TF is valid in this object and it is being set to false. If Flags were set to RF_NO_NORMALIZE as well, it would be set to true.

 

the flag mask example is not clear to me -- as an example, why must I set RF_USE_SLAB_PAR if I have already specified RPM_SLAB_THICKNESS?

 

As a rule of thumb, zero(s) are considered the default value, but the following fields must be initialized on first call:

 

RenderType -- the rendering type
Transform -- must have meaningful values (i.e. at least identity matrix)
RenderRanges -- must be filled for parallel/perspective rendering Transfer Function
RenderRangeMin-- must be filled for mpr/mip/ave rendering
RenderRangeMax -- must be filled for mpr/mip/ave rendering

 

PLEASE ADD C++ EXAMPLE, SIMILAR TO ABOVE EXAMPLE

Below is example code that initialize a RENDER_PARAMS structure and updates the render control to reflect these values.

 

         // instantiate a RENDER_PARAMS object and initialize it with a default MIP state for a stack of CT images

         RENDER_PARAMS rp = new RENDER_PARAMS();

         rp.RenderType = hdrcDefines.RT_THIN_MIP;

         rp.RenderRanges[0].iPnt = 2;

         rp.RenderRanges[0].aPnt[0].x = 20000;

         rp.RenderRanges[0].aPnt[0].y = 4095;

         rp.RenderRanges[0].aPnt[0].c = 0xffffff;

         rp.RenderRanges[0].aPnt[1].x = 60000;

         rp.RenderRanges[0].aPnt[1].y = 4095;

         rp.RenderRanges[0].aPnt[1].c = 0xffffff;

 

         MATRIX44D identity = new MATRIX44D();

         identity.setIdentity();

         renderParams.setTransform(identity);

 

         rp.SlabThickness = 0;

 

         int WW = 21140;

         int WL = 9161;

         int Max = WL + WW;

         int Min = WL;

         rp.RenderRangeMax = Max;

         rp.RenderRangeMin = Min;

 

         rp.Zoom = 1.0f;

         rp.Quality = hdrcDefines.RENDER_QUALITY_BETTER

         rp.DesiredFPS = 8;

 

         // only update the rendering state for the above values

         rp.Mask = RPM_RENDER_TYPE | RPM_TRANSFORM | RPM_RENDER_RANGE_MIN_MAX | RPM_SLAB_THICKNESS | RPM_RENDER_RANGES | RPM_ZOOM | RPM_QUALITY | RPM_DESIRED_FPS;

 

         hdrcRenderControl renderControl = new hdrcRenderControl();

         renderControl.setRenderParams(rp);

 

 

GetRenderParamsCached()

 

SetRenderParams();

 

Doxygen Links

 

Complete details of member variables and class names are available in the source level documentation available from these links to Doxygen.

 

C++

RENDER_PARAMS

Java / .NET

RENDER_PARAMS