-
- Downloads
Change algorithm for computing selections
Previously, the vtkExtractSelection filter iterated over blocks in a composite dataset and evaluated a vtkSelection block by block. Unfortunately, this did not make it easy to write selection operator subclasses that need to operate on an entire composite dataset, and required some code contortions to enable block selection. With this change, the selection algorithm is modified to iterate over each vtkSelectionNode in the vtkSelection and create an insidedness array associated with the attribute specified by the selection. Only after each of these arrays is created do we iterate over blocks and evaluate the selection expression, ultimately extracting the selected elements. This is accomplished by changing the query selector API's member function ComputeSelectedElements() that takes two arguments, an input vtkDataObject and an output vtkDataObject that will contain an insidedness array after the function is executed. Two additional protected pure virtual member functions have been added to the protected API that separately handle composite data objects (ComputeSelectedElementsForDataObject()) and non-composite data objects (ComputeSelectedElementsForBlock()). The ComputeSelectedElements() function invokes these functions to compute the insidedness array for composite and non-composite data sets, respectively. Subclasses are required to implement ComputeSelectedElementsForBlock(). The default implementation for ComputeSelectedElementsForDataObject() is to call ComputeSelectedElementsForBlock(). vtkExtractSelection has been reorganized to implement the new algorithm. The functionality in the internal evaluator classes has been moved to the selectors themselves, and the evaluators have been removed. These changes make it easier to extend the selection types available. For example, block selection is now supported with a new vtkBlockSelector object.
Showing
- Filters/Extraction/CMakeLists.txt 1 addition, 0 deletionsFilters/Extraction/CMakeLists.txt
- Filters/Extraction/vtkBlockSelector.cxx 138 additions, 0 deletionsFilters/Extraction/vtkBlockSelector.cxx
- Filters/Extraction/vtkBlockSelector.h 52 additions, 0 deletionsFilters/Extraction/vtkBlockSelector.h
- Filters/Extraction/vtkExtractSelection.cxx 93 additions, 297 deletionsFilters/Extraction/vtkExtractSelection.cxx
- Filters/Extraction/vtkFrustumSelector.cxx 8 additions, 10 deletionsFilters/Extraction/vtkFrustumSelector.cxx
- Filters/Extraction/vtkFrustumSelector.h 13 additions, 12 deletionsFilters/Extraction/vtkFrustumSelector.h
- Filters/Extraction/vtkLocationSelector.cxx 17 additions, 14 deletionsFilters/Extraction/vtkLocationSelector.cxx
- Filters/Extraction/vtkLocationSelector.h 5 additions, 2 deletionsFilters/Extraction/vtkLocationSelector.h
- Filters/Extraction/vtkSelectionOperator.cxx 191 additions, 1 deletionFilters/Extraction/vtkSelectionOperator.cxx
- Filters/Extraction/vtkSelectionOperator.h 89 additions, 10 deletionsFilters/Extraction/vtkSelectionOperator.h
- Filters/Extraction/vtkValueSelector.cxx 42 additions, 38 deletionsFilters/Extraction/vtkValueSelector.cxx
- Filters/Extraction/vtkValueSelector.h 5 additions, 2 deletionsFilters/Extraction/vtkValueSelector.h
Loading
Please register or sign in to comment