VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkCellDistanceSelector.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 Module: $RCSfile: vtkCellDistanceSelector,v $
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 =========================================================================*/
37 #ifndef VTK_CELL_DISTANCE_SELECTOR_H
38 #define VTK_CELL_DISTANCE_SELECTOR_H
39 
40 #include "vtkFiltersSelectionModule.h" // For export macro
41 #include <vtkSelectionAlgorithm.h>
42 #include <vtkSmartPointer.h> // For smart pointers
43 
44 class vtkDataSet;
45 class vtkSelection;
46 class vtkAlgorithmOutput;
47 class vtkDataArray;
48 
50 
52 class VTKFILTERSSELECTION_EXPORT vtkCellDistanceSelector : public vtkSelectionAlgorithm
53 {
54  public:
56  virtual void PrintSelf(ostream& os, vtkIndent indent);
58 
59  static vtkCellDistanceSelector* New();
60 
62 
64  {
65  INPUT_MESH = 0,
66  INPUT_SELECTION = 1
67  };
69 
71 
74  { this->SetInputConnection( INPUT_MESH, in ); }
76 
78 
80  { this->SetInputData( INPUT_MESH, obj ); }
82 
84 
87  { this->SetInputConnection( INPUT_SELECTION, in ); }
89 
91 
93  { this->SetInputData( INPUT_SELECTION, obj ); }
95 
97 
99  vtkSetMacro(Distance,int);
100  vtkGetMacro(Distance,int);
102 
104 
106  vtkSetMacro(IncludeSeed,int);
107  vtkGetMacro(IncludeSeed,int);
108  vtkBooleanMacro(IncludeSeed,int);
110 
112 
114  vtkSetMacro(AddIntermediate,int);
115  vtkGetMacro(AddIntermediate,int);
116  vtkBooleanMacro(AddIntermediate,int);
118 
119  protected:
121  virtual ~vtkCellDistanceSelector ();
122 
123  void AddSelectionNode(vtkSelection* output, vtkSmartPointer<vtkDataArray> outIndices, int partNumber, int d);
124 
125  virtual int FillInputPortInformation(int port, vtkInformation *info);
126  virtual int RequestData(vtkInformation*,vtkInformationVector**,vtkInformationVector*);
127 
130  int Distance;
131 
134 
138 
139  private:
140  vtkCellDistanceSelector(const vtkCellDistanceSelector &); // Not implemented
141  void operator= (const vtkCellDistanceSelector &); // Not implemented
142 };
143 
144 #endif /* VTK_CELL_DISTANCE_SELECTOR_H */
void SetInputSelection(vtkSelection *obj)
virtual int FillInputPortInformation(int port, vtkInformation *info)
A node in a selection tree. Used to store selection results.
Definition: vtkSelection.h:44
select neighbor cells up to a distance
Proxy object to connect input/output ports.
static vtkSelectionAlgorithm * New()
void SetInputSelectionConnection(vtkAlgorithmOutput *in)
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
void SetInputMeshConnection(vtkAlgorithmOutput *in)
Superclass for algorithms that produce only Selection as output.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
general representation of visualization data
Definition: vtkDataObject.h:64
void SetInputMesh(vtkDataObject *obj)
void PrintSelf(ostream &os, vtkIndent indent)
void SetInputData(vtkDataObject *obj)