>  Docs Center  >  IDL Reference  >  Object Graphics - Misc.  >  IDLgrFilterChain

IDLgrFilterChain

IDLgrFilterChain

An IDLgrFilterChain object is a specialization of the IDL_Container object that is designed to execute a sequence of image filtering shader objects according to their container order. The chain of shader objects must be “image filtering” shaders (those designed to modify an IDLgrImage object). To apply a chain of shaders to an image, set the IDLgrImage SHADER property equal to the filter chain object. Only shader objects (IDLgrShader objects and objects subclassing from IDLgrShader) can be added to the IDLgrFilterChain. See IDLgrShader for more information about shader objects.

When the sequence of shaders are executed, the output from the first shader is passed to each subsequent shader in the chain until the last shader is reached, the result of which is drawn to the destination device.

Note: This functionality requires support for OpenGL frame buffer object extension in addition to the standard hardware support require by IDLgrShader. See the IDLgrWindow::GetDeviceInfo methods’s FRAMEBUFFER_OBJECT_EXTENSION keyword for details).

Note: To control the precision of the temporary storage used to pass data between shaders, use the OUTPUT_DATA_TYPE property of IDLgrShader.

If the GPU hardware does not provide sufficient support or if FORCE_FILTER is set, the software fallback is used. In such cases, the IDLgrShader::FILTER method (if provided) will be called for each shader in the filter chain. The array returned from FILTER must have the same dimensions as the incoming image. If the returned array from any IDLgrShader in the chain does not meet these requirements IDL draws the image with its original data.

Note: Setting IDLgrImage RENDER_METHOD=1 (do not render image as texture-mapped polygon) disables all shader functionality including the software-based alternative.

Superclasses


IDL_Container

Creation


See IDLgrFilterChain::Init.

Properties


Objects of this class have the following properties. See IDLgrFilterChain Properties for details on individual properties.

In addition, objects of this class inherit the properties of all superclasses of this class.

Methods


This class has the following methods:

In addition, this class inherits the methods of its superclass (IDL_Container).

Examples


Create an IDLgrFilterChain Object

The following example creates an IDLgrFilterChain object and lets you add and remove individual IDLgrShaderConvol3 objects, which provide the ability to apply sharpening, smoothing, and edge detection convolution filters to an image. Like the IDLgrShaderBytscl object, the pre-defined IDLgrShaderConvol3 object includes a software fallback that is automatically used when there is not sufficient hardware support for shader operations.

See shader_filterchain_doc__define.pro, located in the examples/doc/shaders subdirectory of the IDL distribution, for the complete, working example. Run the example by entering obj=OBJ_NEW('shader_filterchain_doc') at the IDL command prompt or view the file in an IDL Editor window by entering .EDIT shader_filterchain_doc__define.pro.

Version History


6.4

Introduced

See Also


IDLgrShader, IDLgrShaderBytscl, IDLgrShaderConvol3, IDLgrImage



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us