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

IDLgrShaderBytscl

IDLgrShaderBytscl

Superclasses | Creation | Properties | Methods | Examples | Version History | See Also

A shader byte-scale object is a subclass of IDLgrShader that can be associated with an IDLgrImage object via the SHADER property. This object lets you quickly perform a BYTSCL operation on the image data as it is drawn to the screen, taking advantage of the advanced processing power of the hardware-based OpenGL Shading Language (GLSL) if an appropriate graphics card is available. Otherwise, this object performs the byte-scale operation using a software-based alternative.

Use the IN_RANGE and OUT_RANGE property values to control the byte-scaling parameters, which can be independently applied to each channel of image data. This object performs the byte-scaling operation in floating-point format and does not call the IDL BYTSCL function.

If the image data is other than byte or 8-bits per channel, set the IDLgrImage INTERNAL_DATA_TYPE property to avoid having your data truncated to byte.

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

This object class is implemented in the IDL language. Its source code can be found in the file idlgrshaderbytscl__define.pro in the lib subdirectory of the IDL distribution.

Superclasses


IDLgrShader

Creation


See IDLgrShaderBytscl::Init.

Properties


Objects of this class have the following properties. See IDLgrShaderBytscl 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 (IDLgrShader).

Examples


The following example creates an object that inherits from the IDLgrShaderBytscl object, loads grayscale image data and lets you interactively adjust the input and output data ranges using two sliders. Note that when using the IDLgrShaderBytscl object with non-byte data, you should set the IDLgrImage INTERNAL_DATA_TYPE property to avoid having your data truncated to a byte (0‑255) range.

See shader_bytscl_doc__define.pro for the complete, working example, which is located in the examples/doc/shaders subdirectory of the IDL distribution. Run the example by creating an instance of the object at the IDL command prompt using obytsclshader=OBJ_NEW("shader_bytscl_doc") or view the file in an IDL Editor window by entering shader_bytscl_doc__define.pro.

Version History


6.4

Introduced

See Also


IDLgrShaderConvol3, IDLgrShader, IDLgrFilterChain



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