null_mask

Synopsis

Processes Node Data and replaces it with a binary mask. Valid data is replaced by a user specified value, and null data (either indicated by the input itself, or by the user) is replaced with another user specified value. The two output values may be inverted, and one of the values may be set as null in the output, thus allowing the null data (or the valid data) to be seen as a single value.

Input Ports

Name Type Description

&in Node_Data Input data containing null data

Parameters

The following lists all of the parameters found in the parameter block NullMaskParams, which are accessed by the module NullMaskNodeData and the UI Macro NullMaskUI.

Name Type Description UI Control

out_valid double Single value to replace valid input data Output Valid
out_null double Single value to replace null input data Output Null
in_null double User-defined null value for input data User-Defined Null
user_null boolean Use user-defined null value Use User-Defined Null
invert boolean Invert output valid and null data Invert Output
set_null boolean Specify that null data is present in output Set Null in Output

Output Ports

Name Type Description

out Node_Data Output data containing binary mask

Description

The NullMaskNodeData module processes each component of the input Node Data and replaces each value with one of two user defined values, creating a binary mask of the input. Each value is tested to see if it is equal to the specified null value. The null_value in the component may be used, or the user may override this value with an optional user-defined null value.

Values that match the null value are replaced with a user-defined value. Similarly, valid values in the data are replaced with a single user-defined value. If null data is present in the input, then the output will consist of just two values. Optionally, the two output values may be inverted.

Finally, one of the two new output values may be specified as the null value in the output, resulting in a one value mask. Used with the invert option, it is possible to make the null data visible and remove the valid data.

In this way it is possible to render the null data as a single block of colour, which has its own datamap and object properties.

Input Ports

&in

Input Node_Data which is processed by the module, and which would normally contain null data.

Parameters

out_valid

All valid data (not equal to null_value) is replaced with this single user-defined value. If the output is inverted, then the input null data is replaced with this value.

out_null

All null data (equal to null_value) is replaced with this single user-defined value. If the output is inverted, then the input valid data is replaced with this value.

in_null

Optional user-defined null value for input data, which may be used in preference to the null_value contained within each component of the input.

user_null

Toggle to specify if user-defined null_value (in_null) should be used for null data checking in preference to the null_value contained in each component of the input.

invert

Toggle the output values: if off, valid data is replaced with out_valid, and null data is replaced with out_null. If on, valid data is replaced with out_null, and null data is replaced with out_valid.

set_null

Toggle to specify if output node data should have null data specified too. If off, then the null_flag is not set in the output components. If on, then the null flag is set in the output, and the null value is set depending on the setting of the invert parameter: if invert is off, then null_value is set to out_null; if on, then null_value is set to out_valid.

Output Ports

out

Output Node Data with the data processed as described above.

Utility Macros

The low-level NullMaskNodeData module is used in this User Macro null_mask.

Example

An example application NullMaskEg is provided, which inputs the hydrogen dataset, sets a null value of zero, takes an orthoslice, and displays three outputs: 1) shows the orthoslice with the null data missing; 2) shows just the null data, as a single colour mask, and 3) shows both the valid and null data as a binary mask. NOTE: the rendering is affected by the distribution of the null data; a cell (square) is only rendered if all four nodes have valid data.

Files

iac_proj/nullmask/nmskmacs.v contains the null_mask User Macro, the NullMask Functional Macro, the NullMaskUI UI Macro, and the example application NullMaskEg V definitions.

Other Notes

The null_maskMacs library inherits its process. As this library contains no procedural code, the process is not important. The low-level NullMaskNodeData module, executes under the process specified in its library, not the process defined in the high-level library.

Authors

Paul G. Lever
International AVS Centre

Contact

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

See Also

NullMaskParams, NullMaskUI, NullMask and NullMaskNodeData.