simple.selection Module¶
- paraview.simple.selection.ClearSelection(proxy=None)[source]¶
Clears the selection on the active source.
- Parameters
proxy (Source proxy) – Source proxy whose selection should be cleared.
- paraview.simple.selection.CreateSelection(proxyname, registrationname, **args)[source]¶
Make a new selection source proxy. Can be either vtkSelection or vtkAppendSelection. Use this so that selection don’t show up in the pipeline.
- paraview.simple.selection.QuerySelect(QueryString='', FieldType='POINT', Source=None, InsideOut=False)[source]¶
Selection by query expression.
- Parameters
QueryString (str) – string with NumPy-like boolean expression defining which attributes are selected
FieldType (str) – attribute to select, e.g., ‘POINT’ or ‘CELL’
Source (paraview.servermanager.source.Proxy) – if not set, then the selection will be on the active source
InsideOut (bool) – Invert the selection so that attributes that do not satisfy the expression are selected instead of elements that do.
- Returns
None
- paraview.simple.selection.SelectCells(query=None, proxy=None)[source]¶
Select cells satisfying the query.
- Parameters
query (str) – The selection query. If None, then all cells are selected.
proxy (Source proxy) – The source proxy to select from. Optional, defaults to the active source.
- Returns
Selection source
- Return type
servermanager.sources.SelectionQuerySource
- paraview.simple.selection.SelectCellsThrough(Rectangle=[], View=None, Modifier=None)[source]¶
Select all cells within a rectangular region regardless of their visibility.
Rectangle - list containing bottom left (x1, y1) and top right (x2, y2) corner of a rectangle defining the selection region in the format [x1, y1, x2, y2]. Defined in pixels.
View - the view in which to perform the selection. If None, uses the current active view.
- paraview.simple.selection.SelectCompositeDataIDs(IDs=[], FieldType='POINT', ContainingCells=False, Source=None, Modifier=None)[source]¶
Select attributes by composite attribute IDs.
IDs - list of IDs of attribute types to select. Defined as 3-tuples of (flat block index, process number, attribute ID) interleaved in a single list.
FieldType - type of attribute to select, e.g., ‘POINT’, ‘CELL’
- ContainingCells - if True and FieldType is ‘POINT’, select the cells containing the
points corresponding to the given IDs.
Source - If not None, specifies the sources whose elements should be selected by ID.
- Modifier - ‘ADD’, ‘SUBTRACT’, ‘TOGGLE’, or None to define whether and how the selection
should modify the existing selection.
- paraview.simple.selection.SelectGlobalIDs(IDs=[], FieldType='POINT', ContainingCells=False, Source=None, Modifier=None)[source]¶
Select attributes by global IDs.
IDs - list of IDs of attribute types to select. Defined as a list of global IDs.
FieldType - type of attribute to select, e.g., ‘POINT’, ‘CELL’
- ContainingCells - if True and FieldType is ‘POINT’, select the cells containing the
points corresponding to the given IDs.
Source - If not None, specifies the sources whose elements should be selected by ID.
- Modifier - ‘ADD’, ‘SUBTRACT’, ‘TOGGLE’, or None to define whether and how the selection
should modify the existing selection.
- paraview.simple.selection.SelectHierarchicalDataIDs(IDs=[], FieldType='POINT', ContainingCells=False, Source=None, Modifier=None)[source]¶
Select attributes by hierarchical data IDs.
IDs - list of IDs of attribute types to select. Defined as 3-tuples of (level, index, attribute ID) interleaved in a single list.
FieldType - type of attribute to select, e.g., ‘POINT’, ‘CELL’
- ContainingCells - if True and FieldType is ‘POINT’, select the cells containing the
points corresponding to the given IDs.
Source - If not None, specifies the sources whose elements should be selected by ID.
- Modifier - ‘ADD’, ‘SUBTRACT’, ‘TOGGLE’, or None to define whether and how the selection
should modify the existing selection.
- paraview.simple.selection.SelectIDs(IDs=[], FieldType='POINT', ContainingCells=False, Source=None, Modifier=None)[source]¶
Select attributes by attribute IDs.
IDs - list of IDs of attribute types to select. Defined as (process number, attribute ID) pairs interleaved in a single list. For multiblock datasets, this will select attributes on all blocks of the provided (processor number, attribute ID) pairs
FieldType - type of attribute to select, e.g., ‘POINT’, ‘CELL’
- ContainingCells - if True and FieldType is ‘POINT’, select the cells containing the
points corresponding to the given IDs.
Source - If not None, specifies the sources whose elements should be selected by ID.
- Modifier - ‘ADD’, ‘SUBTRACT’, ‘TOGGLE’, or None to define whether and how the selection
should modify the existing selection.
- paraview.simple.selection.SelectLocation(Locations=[], Source=None, Modifier=None)[source]¶
Select points by location.
Locations - list of x, y, z points to select.
Source - if not set, then the selection will be on the active source
- paraview.simple.selection.SelectPedigreeIDs(IDs=[], FieldType='POINT', ContainingCells=False, Source=None, Modifier=None)[source]¶
Select attributes by Pedigree IDs.
IDs - list of IDs of attribute types to select. Defined as (domain, ID) pairs interleaved in a single list.
FieldType - type of attribute to select, e.g., ‘POINT’, ‘CELL’
- ContainingCells - if True and FieldType is ‘POINT’, select the cells containing the
points corresponding to the given IDs.
Source - If not None, specifies the sources whose elements should be selected by ID.
- Modifier - ‘ADD’, ‘SUBTRACT’, ‘TOGGLE’, or None to define whether and how the selection
should modify the existing selection.
- paraview.simple.selection.SelectPoints(query=None, proxy=None)[source]¶
Select points satisfying the query.
- Parameters
query (str) – The selection query. If None, then all points are selected.
proxy (Source proxy) – The source proxy to select from. Optional, defaults to the active source.
- Returns
Selection source
- Return type
servermanager.sources.SelectionQuerySource
- paraview.simple.selection.SelectPointsThrough(Rectangle=[], View=None, Modifier=None)[source]¶
Select all points within a rectangular region regardless of their visibility.
Rectangle - list containing bottom left (x1, y1) and top right (x2, y2) corner of a rectangle defining the selection region in the format [x1, y1, x2, y2]. Defined in pixels.
View - the view in which to perform the selection. If None, uses the current active view.
- paraview.simple.selection.SelectSurfaceBlocks(Rectangle=[], View=None, Modifier=None)[source]¶
Select visible blocks within a rectangular region.
Rectangle - list containing bottom left (x1, y1) and top right (x2, y2) corner of a rectangle defining the selection region in the format [x1, y1, x2, y2]. Defined in pixels.
View - the view in which to perform the selection. If None, uses the current active view.
Modifier - ‘ADD’, ‘SUBTRACT’, ‘TOGGLE’, or None to define whether and how the selection should modify the existing selection.
- paraview.simple.selection.SelectSurfaceCells(Rectangle=[], Polygon=[], View=None, Modifier=None)[source]¶
Select visible cells within a rectangular or polygon region.
Rectangle - list containing bottom left (x1, y1) and top right (x2, y2) corner of a rectangle defining the selection region in the format [x1, y1, x2, y2]. Defined in pixels. If not empty, the Polygon parameter must be empty or None.
- Polygon - list of 2D points defining a polygon in which visible points should be selected,
e.g., [x1, y1, x2, y2, …, xn, yn]. Defined in pixels. If not empty, the Rectangle parameter must be empty or None.
View - the view in which to perform the selection. If None, uses the current active view.
Modifier - ‘ADD’, ‘SUBTRACT’, ‘TOGGLE’, or None to define whether and how the selection should modify the existing selection.
- paraview.simple.selection.SelectSurfacePoints(Rectangle=[], Polygon=[], View=None, Modifier=None)[source]¶
Select visible points within a rectangular or polygon region.
Rectangle - list containing bottom left (x1, y1) and top right (x2, y2) corner of a rectangle defining the selection region in the format [x1, y1, x2, y2]. Defined in pixels. If not empty, the Polygon parameter must be empty or None.
- Polygon - list of 2D points defining a polygon in which visible points should be selected,
e.g., [x1, y1, x2, y2, …, xn, yn]. Defined in pixels. If not empty, the Rectangle parameter must be empty or None.
View - the view in which to perform the selection. If None, uses the current active view.
Modifier - ‘ADD’, ‘SUBTRACT’, ‘TOGGLE’, or None to define whether and how the selection should modify the existing selection.
- paraview.simple.selection.SelectThresholds(Thresholds=[], ArrayName='', FieldType='POINT', Source=None, Modifier=None)[source]¶
Select attributes in a source by thresholding on values in an associated array.
Thresholds - list of lower and upper threshold bounds. Attributes with associated values in the selected array between any set of bounds will be selected.
ArrayName - name of the array to threshold.
FieldType - atttribute to select, e.g., ‘POINT’ or ‘CELL’
Source - if not set, then the selection will be on the active source
- class paraview.simple.selection.SelectionProxy(**args)[source]¶
Bases:
paraview.servermanager.Proxy
Special proxy wrapper type for Selections.