PrintField

Synopsis

Dump extensive information about the contents of the input Field to an HTML file, and write a simple summary to a string output (user interface parameter.)


  module PrintField< src_file="printfld.c"> {
    PrintFieldParams &PrintFieldParams <NEportLevels={2,1}>;
    string filename <NEportLevels={1,1}> => PrintFieldParams.filename;
    int gridout <NEportLevels={1,1}> => PrintFieldParams.gridout;
    int cellout <NEportLevels={1,1}> => PrintFieldParams.cellout;
    int xformout <NEportLevels={1,1}> => PrintFieldParams.xformout;
    int nodesout <NEportLevels={1,1}> => PrintFieldParams.nodesout;
    int htmlout <NEportLevels={1,1}> => PrintFieldParams.htmlout;
    int allout <NEportLevels={1,1}> => PrintFieldParams.allout;
    int trigger <NEportLevels={1,1}> => PrintFieldParams.trigger;
    string message <NEportLevels={1,1}> => PrintFieldParams.message;
    string notes <NEportLevels={1,1}> => PrintFieldParams.notes;
    Mesh+Node_Data &in <NEportLevels={2,0}>;
    omethod+req print_fld(
      filename+read+notify+req,
      gridout+read+notify+req,
      cellout+read+notify+req,
      xformout+read+notify+req,
      nodesout+read+notify+req,
      htmlout+read+notify+req,
      allout+read+notify+req,
      trigger+read+notify+req,
      message+write,
      notes+write,
      in+read+notify+req ) = "print_field";
  };

Description

PrintField accepts any type of Field for input and dumps extensive selectable information about the Grid, Cell, Node, Xform and Point data to a plain text or HTML formatted file. Additionally a summary of the information is written to a string parameter, which is displayed by the UI macro.

Inputs

&in

Reference to a field containing Mesh+Node_Data.

&PrintFieldParams

Reference to the parameter block, which contains real instances of the information toggles and message output strings.

filename

Contains the filename and path of the HTML file to write the contents of the field to.

gridout

Toggle to select if the Grid information in the field should be included in the HTML file dump.

cellout

Toggle to select if the Cell information in the field should be included in the HTML file dump.

xformout

Toggle to select if the Xform information in the field should be included in the HTML file dump.

nodesout

Toggle to select if the Nodes information in the field should be included in the HTML file dump.

allout

Toggle to select if all the Point information in the field should be included in the HTML file dump.

htmlout

Toggle to select if output contains HTML formatting. If turned off, the file only contains a purely textual dump of the same information.

trigger

Used to trigger the actual printing (dumping) of the information to the selected file.

Outputs

&PrintFieldParams

Reference to the parameter block, which contains real instances of the information toggles and message output strings.

message

Used to hold status of the printing.

notes

When HTML file is dumped, this multi-line string is filled with a simple summary of the field contents.

Utility Macros

The low-level PrintField module is used in the User Macro print_field. Note that there is no Functional Macro. Additionally, the User Macro also uses the PrintFieldParams parameter block group object, as does the PrintFieldUI UI Macro.

Example

An example application PrintFieldEg is provided, which uses the AVS/Express sample data file hydrogen.fld, to display or dump the contents of that field.

Files

iac_proj/printfld/pfldmods.v contains the PrintFieldParams group and the PrintField module V definitions.

Other Notes

The low-level PrintFieldMods library containing the module PrintField does not specify a process. By default the express process will be used.

Note that if "Print All Point" is selected then the output file may become very large!

The filename specified as the output HTML file may only be written to once; any attempt to do so will result in an error message in the error dialog window.

Authors

Phil Chen
Connie Farb

Modifications

Paul G. Lever

Contact

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

See Also

PrintFieldParams, PrintFieldUI and print_field

print_field in AVS/Express version 3.4.