ParaView Level Scalars
The Level Scalars filter uses the VTK filter vtkMultiGroupDataGroupIdScalar. The filter accepts input from a multiple group data set. The filter creates a point-centered scalar data array. The scalar values of this array correspond to the level or group number of that point in the data set. The output is a multiple group data set.
- First the user selects the data they wish to operate on from the Selection Window. It will be highlighted when this occurs.
- The user can then select Filter->Alphabetical->Level Scalars from the main menu.
- The Apply button must be pressed before the Outline will be generated.
One way that this filter can be useful is if the user is writing out a parallel data set using the XML VTK format, instead of the older, serial legacy VTK format. Suppose that the user wants to color each portion of the data written out by a different processor. This filter provides that capability.
For example, if the user is running a four process program, and the first process writes out a cone, the second process writes out a cube, the third process writes out a sphere, and the fourth process writes out a cylinder. The XML VTK format file referencing each of those objects would look like:
<?xml version="1.0"?> <VTKFile type="vtkMultiGroupDataSet" version="0.1" byte_order="LittleEndian"> <vtkMultiGroupDataSet> <DataSet group="0" dataset="0" file="Data/Cone_Process_0.vtp"/> <DataSet group="1" dataset="0" file="Data/Cube_Process_1.vtp"/> <DataSet group="2" dataset="0" file="Data/Sphr_Process_2.vtp"/> <DataSet group="3" dataset="0" file="Data/Cylr_Process_3.vtp"/> </vtkMultiGroupDataSet> </VTKFile>
Within the subdirectory called Data are the four serial vtkPolyData files. Using the Level Scalars Filter, the data would be colored as seen in Figure 2.