vtkbone
vtkboneSelectionUtilities.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Copyright 2010-2016, Numerics88 Solutions Ltd.
4  http://www.numerics88.com/
5 
6  Copyright (c) Eric Nodwell and Steven K. Boyd
7  See Copyright.txt for details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notice for more information.
12 =========================================================================*/
13 
22 #ifndef __vtkboneSelectionUtilities_h
23 #define __vtkboneSelectionUtilities_h
24 
25 #include "vtkObject.h"
26 #include "vtkboneWin32Header.h"
27 
28 // Forward declarations
29 class vtkDataSet;
31 class vtkPolyData;
32 class vtkIdTypeArray;
33 class vtkSelection;
35 
37 {
38 public:
40  vtkTypeMacro(vtkboneSelectionUtilities, vtkObject);
41 
43 
45  static void PointSelectionFromIds(
46  vtkSelection* selection,
47  const vtkDataSet* data,
48  const vtkIdTypeArray* ids);
50 
52 
53  static void CellSelectionFromIds(
54  vtkSelection* selection,
55  const vtkDataSet* data,
56  const vtkIdTypeArray* ids);
58 
60 
66  static void GetContainingCells(
67  vtkSelection* selection,
68  vtkDataSet* data,
69  vtkIdTypeArray* cellIds);
70  static void GetContainingCellsFromUnstructuredGrid(
71  vtkSelection* selection,
72  vtkUnstructuredGrid* data,
73  vtkIdTypeArray* cellIds);
74  static void GetContainingCellsFromPolyData(
75  vtkSelection* selection,
76  vtkPolyData* data,
77  vtkIdTypeArray* cellIds);
78  static void GetContainingCellsFromGeneric(
79  vtkSelection* selection,
80  vtkDataSet* data,
81  vtkIdTypeArray* cellIds);
83 
85 
89  static void ConvertToContainingCellsSelection(
90  vtkSelection* selectionIn,
91  vtkDataSet* data,
92  vtkSelection* selectionOut);
94 
101  static void AddPointPedigreeIdsArray(vtkDataSet* data, int replace=0);
102 
109  static void AddCellPedigreeIdsArray(vtkDataSet* data, int replace=0);
110 
111  static int ExtractPointsAsPolyData(
112  vtkIdTypeArray* ids,
113  vtkDataSet* data,
114  vtkPolyData* out);
115 
116  static int ExtractPointsAsPolyData(
117  vtkSelection* selection,
118  vtkDataSet* data,
119  vtkPolyData* out);
120 
121 protected:
124 
125 private:
126  vtkboneSelectionUtilities(const vtkboneSelectionUtilities&); // Not implemented.
127  void operator=(const vtkboneSelectionUtilities&); // Not implemented.
128 };
129 
130 #endif
data
#define VTKBONE_EXPORT
std::string replace(std::string source, const std::string &search, const std::string &replace, bool all)
Useful functions for creating and modifying sets of Points and/or Cells.
static vtkObject * New()
void operator=(const vtkObjectBase &)