VTK
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 =========================================================================*/
35 #ifndef vtkCellDistanceSelector_h
36 #define vtkCellDistanceSelector_h
37 
38 #include "vtkFiltersSelectionModule.h" // For export macro
39 #include "vtkSelectionAlgorithm.h"
40 #include "vtkSmartPointer.h" // For smart pointers
41 
42 class vtkDataSet;
43 class vtkSelection;
44 class vtkAlgorithmOutput;
45 class vtkDataArray;
46 
48 
51 class VTKFILTERSSELECTION_EXPORT vtkCellDistanceSelector : public vtkSelectionAlgorithm
52 {
53  public:
55  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
57 
58  static vtkCellDistanceSelector* New();
59 
64  {
65  INPUT_MESH = 0,
66  INPUT_SELECTION = 1
67  };
68 
73  { this->SetInputConnection( INPUT_MESH, in ); }
74 
79  { this->SetInputData( INPUT_MESH, obj ); }
80 
85  { this->SetInputConnection( INPUT_SELECTION, in ); }
86 
91  { this->SetInputData( INPUT_SELECTION, obj ); }
92 
94 
97  vtkSetMacro(Distance,int);
98  vtkGetMacro(Distance,int);
100 
102 
105  vtkSetMacro(IncludeSeed,int);
106  vtkGetMacro(IncludeSeed,int);
107  vtkBooleanMacro(IncludeSeed,int);
109 
111 
114  vtkSetMacro(AddIntermediate,int);
115  vtkGetMacro(AddIntermediate,int);
116  vtkBooleanMacro(AddIntermediate,int);
118 
119  protected:
121  ~vtkCellDistanceSelector () VTK_OVERRIDE;
122 
123  void AddSelectionNode(vtkSelection* output, vtkSmartPointer<vtkDataArray> outIndices, int partNumber, int d);
124 
125  int FillInputPortInformation(int port, vtkInformation *info) VTK_OVERRIDE;
126  int RequestData(vtkInformation*,vtkInformationVector**,vtkInformationVector*) VTK_OVERRIDE;
127 
132  int Distance;
133 
138  int IncludeSeed;
139 
144  int AddIntermediate;
145 
146  private:
147  vtkCellDistanceSelector(const vtkCellDistanceSelector &) VTK_DELETE_FUNCTION;
148  void operator= (const vtkCellDistanceSelector &) VTK_DELETE_FUNCTION;
149 };
150 
151 #endif /* vtkCellDistanceSelector_h */
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.
A node in a selection tree.
Definition: vtkSelection.h:37
Hold a reference to a vtkObjectBase instance.
Grows a selection, selecting neighbor cells, up to a user defined topological distance.
Proxy object to connect input/output ports.
static vtkSelectionAlgorithm * New()
a simple class to control print indentation
Definition: vtkIndent.h:33
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:48
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.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
general representation of visualization data
Definition: vtkDataObject.h:58
void SetInputMesh(vtkDataObject *obj)
A convenience method to set the input data object.
void SetInputData(vtkDataObject *obj)
Assign a data object as input.