VTK  9.0.1
vtkCellDistanceSelector.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 Module: vtkCellDistanceSelector
5 
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
34 #ifndef vtkCellDistanceSelector_h
35 #define vtkCellDistanceSelector_h
36 
37 #include "vtkFiltersSelectionModule.h" // For export macro
38 #include "vtkSelectionAlgorithm.h"
39 #include "vtkSmartPointer.h" // For smart pointers
40 
41 class vtkDataSet;
42 class vtkSelection;
43 class vtkAlgorithmOutput;
44 class vtkDataArray;
45 
47 
50 class VTKFILTERSSELECTION_EXPORT vtkCellDistanceSelector : public vtkSelectionAlgorithm
51 {
52 public:
54  void PrintSelf(ostream& os, vtkIndent indent) override;
56 
57  static vtkCellDistanceSelector* New();
58 
63  {
64  INPUT_MESH = 0,
65  INPUT_SELECTION = 1
66  };
67 
71  void SetInputMeshConnection(vtkAlgorithmOutput* in) { this->SetInputConnection(INPUT_MESH, in); }
72 
76  void SetInputMesh(vtkDataObject* obj) { this->SetInputData(INPUT_MESH, obj); }
77 
82  {
83  this->SetInputConnection(INPUT_SELECTION, in);
84  }
85 
89  void SetInputSelection(vtkSelection* obj) { this->SetInputData(INPUT_SELECTION, obj); }
90 
92 
95  vtkSetMacro(Distance, int);
96  vtkGetMacro(Distance, int);
98 
100 
103  vtkSetMacro(IncludeSeed, vtkTypeBool);
104  vtkGetMacro(IncludeSeed, vtkTypeBool);
105  vtkBooleanMacro(IncludeSeed, vtkTypeBool);
107 
109 
113  vtkSetMacro(AddIntermediate, vtkTypeBool);
114  vtkGetMacro(AddIntermediate, vtkTypeBool);
115  vtkBooleanMacro(AddIntermediate, vtkTypeBool);
117 
118 protected:
120  ~vtkCellDistanceSelector() override;
121 
122  void AddSelectionNode(
123  vtkSelection* output, vtkSmartPointer<vtkDataArray> outIndices, int partNumber, int d);
124 
125  int FillInputPortInformation(int port, vtkInformation* info) override;
127 
132  int Distance;
133 
139 
145 
146 private:
148  void operator=(const vtkCellDistanceSelector&) = delete;
149 };
150 
151 #endif /* vtkCellDistanceSelector_h */
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void SetInputSelection(vtkSelection *obj)
A convenience method to set the input selection.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
data object that represents a "selection" in VTK.
Definition: vtkSelection.h:57
Grows a selection, selecting neighbor cells, up to a user defined topological distance.
Proxy object to connect input/output ports.
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeBool IncludeSeed
Decide whether seed cells are included in selection Default: 1.
static vtkSelectionAlgorithm * New()
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkTypeBool AddIntermediate
Decide whether at distance between 1 and Distance-1 are included in selection Default: 1...
void SetInputSelectionConnection(vtkAlgorithmOutput *in)
A convenience method to set the selection input connection to the producer output.
InputPorts
enumeration values to specify input port types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:49
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
Set the connection for the given input port index.
void SetInputMeshConnection(vtkAlgorithmOutput *in)
A convenience method to set the data object input connection to the producer output.
Superclass for algorithms that produce only Selection as output.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
int Distance
Tological radius from seed cells to be used to select cells Default: 1.
Store zero or more vtkInformation instances.
general representation of visualization data
Definition: vtkDataObject.h:59
void SetInputMesh(vtkDataObject *obj)
A convenience method to set the input data object.
void SetInputData(vtkDataObject *obj)
Assign a data object as input.