Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Using VisIt in ICE

The Visit Visualization Tool offers scientists and researchers powerful visualization and data analysis capabilities. These capabilities may be accessed interactively via VisIt's graphical user interface or by VisIt's command line interface (CLI) with its Python API. In order to use the tool from within software developed in Java, VisIt also provides users with a Java API packaged as a JAR file, which is available at the VisIt downloads page. Examples of using this API can be found here.

ICE uses the VisIt Java API to perform a variety of data analysis and visualization tasks.

In order to utilize the gov.ornl.nice.visit.viewer bundle from within ICE, the gov.ornl.nice.visitanalysistool (or VisItAnalsysisTools) plugin has been developed. By implementing the interfaces found in the gov.ornl.nice.analysistool package, the VisItAnalsysisTools plugin provides the capabilities shown in the list below. When included within NiCE, the resulting image can then be manipulated and displayed within an ICE ResourceComponent.

  • Launch VisIt as a service running on a background port.
  • Open a data file in the SILO format.
  • Extract a list of scalar quantities available for plotting as a Pseudocolor plot.
  • Create Pseudocolor plots for a subset of available quantities.
  • Set each plot's attributes to custom or default values.
  • Store the Pseudocolor plot on disk as a PNG image.

Using the VisItAnalysisTools Plugin

The VisItAnalysisTools plugin consists of three classes:

  • VisItAnalysisTool
  • VisItAnalysisDocument
  • VisItAnalysisAsset

and one enumeration:

  • VisItAnalysisPictureProperty

As seen in the diagram below, these classes implement the interfaces defined in the gov.ornl.nice.analysistool plugin.

[-img src=Visitanalysistool class diagram.png: missing =-]

Let's examine the roles of each class.

The VisItAnalysisTool class acts as a wrapper class for a running VisIt process. Upon instantiation, this class configures and launches VisIt via classes in the gov.ornl.nice.javavisit bundle. Notice that the VisItAnalysisTool class has two constructors. The parameterized constructor requires two arguments: the path to the VisIt installation's bin directory and the port number used for launching VisIt as a service running in the background. If the nullary constructor is used, the System Properties listed in the table below must be set. See ICE System Properties to view descriptions of other system properties possibly required by NiCE.

System Property Description Example Value
visit.binpath The absolute path to the local installation of VisIt used by the VisItAnalysisTools bundle. /usr/local/visit/bin
visit.port The port number used for launching VisIt as a service running in the background. 5600

The VisItAnalysisDocument class represents a particular set of data which allows access to quantities available for plotting by VisIt. An object of this type holds a collection of VisItAnalysisAssets.

A VisItAnalysisAsset corresponds to a particular quantity that will be plotted and saved as a PNG image. Users can robustly modify the plot's appearance by setting property values for a VisItAnalysisAsset object via the setProperty() operation. The names of VisItAnalysisAsset's properties correspond to the enumeration literals contained in the VisItAnalysisPictureProperty enum. The string used as property name in the setProperty() operation can be accessed by calling the enumeration literal's toString() operation or by inspecting the java.lang.Properties object returned by VisItAnalysisAsset's getProperties() operation.

The table seen below lists the property name, description and available values as well as the corresponding VisItAnalysisPictureProperty enumeration literal.

Property Name (i.e., Literal.toString()) VisItAnalysisPictureProperty Literal Property Description Available Values
Colortable COLORTABLE The image's colortable by name The available color table names are retrieved by calling the getAvailableColorTables() operation in VisItAnalysisAsset.
Database Label Type DATABASE_LABEL_TYPE The type of database label Available types are File, Directory and Full.
Image Width (pixels) IMAGE_WIDTH The image's width in pixels Integer
Image Height (pixels) IMAGE_HEIGHT The image's height in pixels Integer
Invert Colortable INVERT_COLORTABLE Whether or not to invert the selected color table true or false
Mesh Name MESH_NAME The name of the mesh to be displayed. A value of true must be set for the Show Mesh property for the selected mesh to be displayed. All available mesh names can be accessed by calling the getAvailableMeshes() VisItAnalysisAsset operation.
Pan X PAN_X The image's pan x value Double
Pan Y PAN_Y The image's pan y value Double
Scale Minimum SCALE_MIN The scale's minimum value. VisIt's default value will be used if an empty string is passed as the value of this property. Double
Scale Maximum SCALE_MAX The scale's maximum value. VisIt's default value will be used if an empty string is passed as the value of this property. Double
Scale Skew Factor SCALE_SKEW_FACTOR The scale's skew factor. A value of Skew must be set for Scale Type for this property to take effect. Double
Scale Type SCALE_TYPE The scale's type. If Skew is selected, then a value for Scale Skew Factor should be set. Available types are Lin, Log and Skew.
Show Axes SHOW_AXES Whether to display the x, y, and z axes true or false
Show Bounding Box SHOW_BOUNDING_BOX Whether to display a bounding box true or false
Show Database Label SHOW_DATABASE_LABEL Whether to display the database label true or false
Show Date and User SHOW_DATE_AND_USER Whether to display the image's creation date and user. Note that in the current version of VisIt these properties can not be decoupled. true or false
Show Legend SHOW_LEGEND Whether to display the legend true or false
Show Mesh SHOW_MESH Whether to display the mesh. A value for Mesh Name must also be set for this to be applied to the plot. true or false
Show Triad SHOW_TRIAD Whether to display the triad true or false
Angle of View (degrees) VIEW_ANGLE The angle of view in degrees Double
View Normal X VIEW_NORMAL_X The X component of the unit vector normal to the view A double between 0 and 1
View Normal Y VIEW_NORMAL_Y The Y component of the unit vector normal to the view A double between 0 and 1
View Normal Z VIEW_NORMAL_Z The Z component of the unit vector normal to the view A double between 0 and 1
View Up X VIEW_UP_X The X component of the unit vector pointing up A double between 0 and 1
View Up Y VIEW_UP_Y The Y component of the unit vector pointing up A double between 0 and 1
View Up Z VIEW_UP_Z The Z component of the unit vector pointing up A double between 0 and 1
X Axis Label X_AXIS_LABEL The X axis label String
Y Axis Label Y_AXIS_LABEL The Y axis label String
Z Axis Label Z_AXIS_LABEL The Z axis label String
X Axis Units X_AXIS_UNITS The X axis units String
Y Axis Units Y_AXIS_UNITS The Y axis units String
Z Axis Units Z_AXIS_UNITS The Z axis units String
Zoom Level ZOOM_LEVEL The zoom level in percent Double

Back to the top