Dmap2Image

Synopsis

Generates an image which can be used with Scalar2Texture2 from a given Datamap.

Input Ports

Name Type Description

X_Resolution Datamap dmap_in

Parameters

Name Type Description UI Control

X_Resolution int Resolution in X direction Slider
Y_Resolution int Resolution in Y direction Slider
Mode int Toggles between Square and Legend Mode Toggle

Output Ports

Name Type Description

out_fld fld Image_field (argb data)
out_obj fld Directly renderable Object

Description

Dmap2Image generates an image from a given Datamap. The image size is regulated by the X_Resolution and Y_Resolution parameters. The content of the Image is defined by the Mode parameter. This parameter can be 0 or 1. If it is 0 the image simply contains a "rainbow" which is shows the current Datamap. If the Mode parameter is 1 the output image is generated in legend Mode. This means it is split into two parts. The upper part contains the "rainbow" and the lower part contains an checkerboard and the alpha blending.

Dmap2ImageSquare is a special case of Dmap2Image with X_Resolution and Y_Resolution set to 256 and Mode to 0.

Dmap2ImageLegend is a special case of Dmap2Image with X_Resolution= 350 and Y_Resolution = 60 and Mode = 0.

Parameters

X_Resolution

The width of output image (resolution in X direction).

Y_Resolution

The height of output image (resolution in Y direction).

Mode

Mode has two possible values 0 or 1. Value 0 generates a "rainbow" across the whole image. Value 1 generates the Legend mode image containing "rainbow" checkerboard and alpha blending.

Outputs

out_fld

out_fld contains the an ARGB Image which can be used for further processing (e.g. in Scalar2Texture2 as Datamap).

out_obj

out_obj contains the an ARGB Image as directly renderable object which can be viewed with the UViewer.

Utility Modules

The User Macros Dmap2Image, Dmap2ImageSquare and Dmap2ImageLegend make use of the Functional Macro Dmap2ImageFunc. The Dmap2Image macro also makes use of the UI Macro Dmap2ImageUI.

Example

Three example applications Dmap2ImageEg, Dmap2ImageSquareEg and Dmap2ImageLegendEg is provided, that demonstrate tigh level macros. Another use is demonstrated in the Datamap2TextureEg example application in the Scalar2Texture module.

Files

iac_proj/dmap2img/d2imods.v contains the V definitions of the Dmap2ImageParams parameter block and the Dmap2ImageCore module.

iac_proj/dmap2img/d2imacs.v contains the V definitions of the Dmap2ImageFunc Functional Macro, the GenerateTestDataUI User Interface Macro, and the User Macros Dmap2Image, Dmap2ImageSquare and Dmap2ImageLegend.

iac_proj/dmap2img/d2iapps.v contains the V definition of the example applications Dmap2ImageEg, Dmap2ImageSquareEg and Dmap2ImageLegendEg.

Author

Ian Curington
Advanced Visual Systems, Inc.

Modifications

Tobias Schiebeck
International AVS Centre

Contact

International AVS Centre
Manchester Computing
University of Manchester
Oxford Road
Manchester
United Kingdom
M13 9PL