Data Selection: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
No edit summary
Line 1: Line 1:
=Introduction=
=Introduction=
In ParaView, selection is a mechanism for identifying a set of cells or points in the data produced by a source. In this article, source stands for any VTK algorithm, including readers, data sources, filters etc. that produces data output. ParaView supports a single active selection. This selection is associated with a source and is shown in every view that displays the source’s output. When a new selection is made, it replaces the previous one.
One of the major design goals of ParaView 3 is to add support for quantitative analysis. In addition to better charting, Python-based filtering and statistical analysis tools, we have been working on the capability of focusing the analysis on a specific subset of a dataset. This can be achieved using the selection mechanism described in this article.


This article uses a use-case driven approach to demonstrate ParaView’s selection capabilities. In this section we introduce the main GUI components that are used in the article. The subsequent sections address different use cases.
Selection is the mechanism for identifying a subset of a dataset by using user specified criteria. This subset can be a set of point or cells or a block of composite dataset. This functionality allows users to focus on a smaller subset that is important. For example, the elements of a finite-element mesh that have pressure above a certain threshold can be identified very easily using the threshold selection. Furthermore, this selection can be converted to a set of global element ids in order to plot the attribute values of those elements over time.
 
ParaView supports a single active selection. This selection is associated with a data source (here data source refers to any reader, source or filter) and is shown in every view that displays the data source’s output. This article uses a use-case driven approach to demonstrate how this selection can be described and used. In the next section, we introduce the main GUI components that are used in the article. The subsequent sections address different use cases.
 
Please note that many features discussed in this article are recent additions and are not available in 3.2. You may want to download a development snapshot or build your own binary from the CVS source base. Otherwise, you will have to wait until 3.4 is out.


==Selection Inspector==
==Selection Inspector==
Line 10: Line 14:


==Spreadsheet View==
==Spreadsheet View==
[[Image:Selection01.png|300px|thumb|float|'''Figure 1''': Spreadsheet View in ParaView showing the display tab for a source producing a multi-block dataset. The selected cells are highlighted in the 3D view as well as the spreadsheet view. The active selection can be inspected using the selection inspector.]]
[[Image:Selection01.png|300px|thumb|float|'''Figure 1''': Spreadsheet View in ParaView showing the display tab for a source producing a multi-block dataset. The selected cells are highlighted in the 3D view as well as the spreadsheet view. The active selection can be inspected using the selection inspector.]]]
 
Spreadsheet View provides data exploration capabilities. One of the common complains many users have is not being able to look at the raw data directly.
Spreadsheet view provides exactly that. It allows the user to look at the raw cell data, point data or field data associated with a dataset.
 
ParaView treats spreadsheet view exactly like the other views such as the 3D view, Bar Chart view etc. To create the spreadsheet view, first split the workspace and then choose Spreadsheet View from the options listed. At this time if any source is currently selected in the Pipeline Browser, the spreadsheet view will automatically shows its point data. We can choose the source whose output we want to view using the eyeball in the Pipeline Browser, which is equivalent to turning on the visibility of the source in this view. Spreadsheet view can only show one dataset at a time therefore at any time at most one source can be visible in this view.
 
When the spreadsheet view is active (i.e. selected by clicking on its toolbar), and the visible source is selected in the pipeline browser, the Display tab in the Object Inspector panel can be used to control what is shown in this view. This panel contains a selector that can be used to toggle between point and cell data. For composite datasets (multi-block datasets and AMR datasets), it shows a Composite Data Structure tree that can be used to select the block that is shown in the view. Another widget named Show only selected elements can be selected to restrict what is shown in the spreadsheet to only selected cells or points. We will revisit this check box later.
 
=Create a Selection=
In this section we will discuss different ways of creating a selection.
 
==Select cells/points on the Surface==
One of the simplest use-case is to select cells or points on the surface of the dataset. It is possible to select surface cells by drawing a rubber-band on the 3D view. With the 3D view showing the dataset active, click on Select Cells (or Points) On in the Selection Controls toolbar or under the Edit menu (you can also use the ‘S’ key a shortcut for ‘Select Cells On’). This will put ParaView into a selection mode. In this mode, click and drag over the surface of the dataset in the active view to select the cells (or points) on the surface. If anything was selected, it will be highlighted in all the views showing the data and source producing the selected dataset will become active in the Pipeline Browser. ParaView supports selecting only one source at a time. Hence even if you draw the rubber band such that it covers data from multiple sources, only one of them will be selected (the one that has the largest number of selected cells or points).
 
As mentioned earlier, when data from a source is selected, all the views displaying the data show the selection. This includes spreadsheet view as well. If the spreadsheet view is showing cell or point attributes of the selected data, then it will highlight the corresponding rows. If we are selecting points then the spreadsheet view shows the selection only if point attributes are being displayed. If we are selecting cells then it will highlight the cells in the cell attribute mode, and highlight the points forming the cells in the point attribute mode. For any decent sized dataset, it can be a bit tricky to locate the selected rows. In that case, the Show only selected elements on the display tab can be used to hide all the rows that haven’t been selected.


When selecting cells (or points) on the surface, ParaView determines the cell (or point) ids for each of the cell (or point) rendered within the selection box. The selection is simply the ids for cells (or points) thus determined.
Spreadsheet View provides data exploration capabilities. One of the common complaints many users have is not being able to look at the raw data directly. Spreadsheet view provides exactly that. It allows the user to look at the raw cell data, point data or field data associated with a dataset.  


==Select cells/points using a Frustum==
ParaView treats spreadsheet view exactly like the other views such as the 3D view, Bar Chart view etc. To create the spreadsheet view, first split the workspace and then choose Spreadsheet View from the options listed. At this time if any source is currently selected in the Pipeline Browser, the spreadsheet view will automatically shows its point data. We can choose the source whose output we want to view using the eyeball in the Pipeline Browser, which is equivalent to turning on the visibility of the source in this view. Spreadsheet view can only show one dataset at a time.  
[[Image:Selection02.png|300px|float|thumb|'''Figure 2''': Selection using a Frustum. Note that all cells that lie within the specified frustum are selected. The selection inspector shows the details of the selection.]]
This is similar to selecting on the surface except that instead of selecting the cells (or points) on the surface of the dataset, it selects all cells (or points) that lie within the frustum formed by extruding the rectangular rubber band drawn on the view into 3D space. To perform a frustum selection, we use Select Cells (or Points) Through in the Selection Controls toolbar or under the Edit menu. As with surface selection, the selected cells/points are shown in all the views in which the data is shown including the spreadsheet view. Unlike surface selection, here the indices of the cells or points are not computed instead ParaView performs intersections to identify the cells (or points) that lie within the frustum. Note that this selection can produce a very large selection. This may be time consuming and can increase the memory usage significantly.


==Select Blocks in a Composite Dataset==
When the spreadsheet view is active (i.e. selected by clicking on its toolbar), and the visible source is selected in the pipeline browser, the Display tab in the Object Inspector panel can be used to control what is shown in this view. This panel contains a selector that can be used to toggle between point and cell data. For composite datasets (multi-block and AMR datasets), it shows a Composite Data Structure tree that can be used to select the block that is shown in the view. Another widget named Show only selected elements can be selected to restrict what is shown in the spreadsheet to only selected cells or points. We will revisit this check box later.
[[Image:Selection03.png|300px|float|thumb|'''Figure 3''': Selecting a block in multi-block dataset. All the cells in the selected block are highlighted. The selection inspector shows the selected block.]]
Composite datasets are multi-block datasets or AMR (adaptive mesh refinement). In case of multi-block datasets, each block may represent different components of the dataset e.g. tires, chassis etc. for a car dataset. Just like selecting cells or points, it is possible to select entire blocks. To enter the block selection mode use Select Block in the Selection Controls toolbar or under the Edit menu (you can also use the ‘B’ key as a shortcut for Select Block). Once in block selection mode, one can simply click on the block to select in the 3D view to select a single block or click and drag to select multiple blocks. When a block is selected, all the cells in the block are highlighted.

Revision as of 20:38, 12 September 2008

Introduction

One of the major design goals of ParaView 3 is to add support for quantitative analysis. In addition to better charting, Python-based filtering and statistical analysis tools, we have been working on the capability of focusing the analysis on a specific subset of a dataset. This can be achieved using the selection mechanism described in this article.

Selection is the mechanism for identifying a subset of a dataset by using user specified criteria. This subset can be a set of point or cells or a block of composite dataset. This functionality allows users to focus on a smaller subset that is important. For example, the elements of a finite-element mesh that have pressure above a certain threshold can be identified very easily using the threshold selection. Furthermore, this selection can be converted to a set of global element ids in order to plot the attribute values of those elements over time.

ParaView supports a single active selection. This selection is associated with a data source (here data source refers to any reader, source or filter) and is shown in every view that displays the data source’s output. This article uses a use-case driven approach to demonstrate how this selection can be described and used. In the next section, we introduce the main GUI components that are used in the article. The subsequent sections address different use cases.

Please note that many features discussed in this article are recent additions and are not available in 3.2. You may want to download a development snapshot or build your own binary from the CVS source base. Otherwise, you will have to wait until 3.4 is out.

Selection Inspector

ParaView provides a selection inspector (referred to simply as the inspector in this article) to inspect and edit the details about the active selection. One can toggle the inspector visibility from the View menu. The inspector can be used to create a new active selection, view/edit the properties of the active selection as well as change the way the selection is displayed in the 3D window e.g. change the color, show labels etc.

We will look at each of these options as we try to explore the different selection types in ParaView.

Spreadsheet View

File:Selection01.png
Figure 1: Spreadsheet View in ParaView showing the display tab for a source producing a multi-block dataset. The selected cells are highlighted in the 3D view as well as the spreadsheet view. The active selection can be inspected using the selection inspector.

]

Spreadsheet View provides data exploration capabilities. One of the common complaints many users have is not being able to look at the raw data directly. Spreadsheet view provides exactly that. It allows the user to look at the raw cell data, point data or field data associated with a dataset.

ParaView treats spreadsheet view exactly like the other views such as the 3D view, Bar Chart view etc. To create the spreadsheet view, first split the workspace and then choose Spreadsheet View from the options listed. At this time if any source is currently selected in the Pipeline Browser, the spreadsheet view will automatically shows its point data. We can choose the source whose output we want to view using the eyeball in the Pipeline Browser, which is equivalent to turning on the visibility of the source in this view. Spreadsheet view can only show one dataset at a time.

When the spreadsheet view is active (i.e. selected by clicking on its toolbar), and the visible source is selected in the pipeline browser, the Display tab in the Object Inspector panel can be used to control what is shown in this view. This panel contains a selector that can be used to toggle between point and cell data. For composite datasets (multi-block and AMR datasets), it shows a Composite Data Structure tree that can be used to select the block that is shown in the view. Another widget named Show only selected elements can be selected to restrict what is shown in the spreadsheet to only selected cells or points. We will revisit this check box later.