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 =========================================================================*/
38 #ifndef vtkCellDistanceSelector_h
39 #define vtkCellDistanceSelector_h
40 
41 #include "vtkFiltersSelectionModule.h" // For export macro
42 #include "vtkSelectionAlgorithm.h"
43 #include "vtkSmartPointer.h" // For smart pointers
44 
45 class vtkDataSet;
46 class vtkSelection;
47 class vtkAlgorithmOutput;
48 class vtkDataArray;
49 
51 
54 class VTKFILTERSSELECTION_EXPORT vtkCellDistanceSelector : public vtkSelectionAlgorithm
55 {
56  public:
58  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
60 
61  static vtkCellDistanceSelector* New();
62 
67  {
68  INPUT_MESH = 0,
69  INPUT_SELECTION = 1
70  };
71 
76  { this->SetInputConnection( INPUT_MESH, in ); }
77 
82  { this->SetInputData( INPUT_MESH, obj ); }
83 
88  { this->SetInputConnection( INPUT_SELECTION, in ); }
89 
94  { this->SetInputData( INPUT_SELECTION, obj ); }
95 
97 
100  vtkSetMacro(Distance,int);
101  vtkGetMacro(Distance,int);
103 
105 
108  vtkSetMacro(IncludeSeed,int);
109  vtkGetMacro(IncludeSeed,int);
110  vtkBooleanMacro(IncludeSeed,int);
112 
114 
117  vtkSetMacro(AddIntermediate,int);
118  vtkGetMacro(AddIntermediate,int);
119  vtkBooleanMacro(AddIntermediate,int);
121 
122  protected:
124  virtual ~vtkCellDistanceSelector ();
125 
126  void AddSelectionNode(vtkSelection* output, vtkSmartPointer<vtkDataArray> outIndices, int partNumber, int d);
127 
130 
135  int Distance;
136 
142 
148 
149  private:
150  vtkCellDistanceSelector(const vtkCellDistanceSelector &) VTK_DELETE_FUNCTION;
151  void operator= (const vtkCellDistanceSelector &) VTK_DELETE_FUNCTION;
152 };
153 
154 #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.
int AddIntermediate
Decide whether at distance between 1 and Distance-1 are included in selection Default: 1...
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
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:43
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:39
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:54
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.
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.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
general representation of visualization data
Definition: vtkDataObject.h:64
void SetInputMesh(vtkDataObject *obj)
A convenience method to set the input data object.
int IncludeSeed
Decide whether seed cells are included in selection Default: 1.
void SetInputData(vtkDataObject *obj)
Assign a data object as input.