ThresholdNodeData

Synopsis

Remove data above and below min/max threshold levels, by setting to NULL.


  module ThresholdNodeData <src_file="thresh.c"> {
    Node_Data &in <NEportLevels={2,0}>;
    ThresholdParams &ThresholdParams <NEportLevels={2,0}>;
    double minimum => ThresholdParams.min;
    double maximum => ThresholdParams.max;
    Node_Data out <NEportLevels={0,2}> {
      nnode_data+nres => <-.in.nnode_data;
      nnodes+nres => <-.in.nnodes;
    };
    omethod+notify_inst+req update (
      in+read+notify+req,
      minimum+read+notify+req,
      maximum+read+notify+req,
      out+write )
      = "ThresholdNodeData";
  };

Description

ThresholdNodeData removes all values in the Node_Data of a field above a maximum value, and below a minimum value, by setting those values to NULL. The module operates on any type of Node_Data of a field, and the output must be recombined with the Mesh to get a Field data structure.

Inputs

&in

Reference to a field with Node_Data of any type.

&ThresholdParams

Reference to the parameter block, which contains real instance of the minimum and maximum threshold values.

minimum

Reference to the minimum value of type double, via the parameter block, which is referenced by the &ThresholdParams input.

maximum

Reference to the maximum value of type double, via the parameter block, which is referenced by the &ThresholdParams input.

Outputs

out

The output field containing only Node_Data. Some elements of the original Node_Data are copied through.

Utility Macros

The low-level ThresholdNodeModule is used in the Functional Macro Threshold and the User Macro threshold. Additionally, these macros also use the ThresholdParams parameter block group object, as does the ThresholdUI UI Macro.

Example

An example application ThresholdEg is provided, which uses the AVS/Express sample data file hydrogen.fld, to display a thresholded orthoslice.

Files

iac_proj/thresh/thr_mods.v contains the ThresholdParams group and the ThresholdNodeData module V definitions.

Other Notes

By default the low-level library ThresholdMods, which needs to be compiled, has the process set to user. Use the following command in the VCP to compile this project:

$compile IAC_PROJ.Threshold.ThresholdMods

Authors

Nick Trout
Ian Curington
Paul G. Lever
International AVS Centre
Manchester Visualization Centre
Manchester Computing
University of Manchester
Oxford Road
Manchester
UK
M13 9PL

See Also

ThresholdParams, Threshold, ThresholdUI and threshold.

DVthreshold, DVthreshold_cell, DVthresh_null.