VTK
vtkSelectPolyData.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSelectPolyData.h
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 =========================================================================*/
80 #ifndef vtkSelectPolyData_h
81 #define vtkSelectPolyData_h
82 
83 #include "vtkFiltersModelingModule.h" // For export macro
84 #include "vtkPolyDataAlgorithm.h"
85 
86 #define VTK_INSIDE_SMALLEST_REGION 0
87 #define VTK_INSIDE_LARGEST_REGION 1
88 #define VTK_INSIDE_CLOSEST_POINT_REGION 2
89 
90 class vtkCharArray;
91 class vtkPoints;
92 class vtkIdList;
93 
95 {
96 public:
101 
103  void PrintSelf(ostream& os, vtkIndent indent);
104 
106 
111  vtkSetMacro(GenerateSelectionScalars,int);
112  vtkGetMacro(GenerateSelectionScalars,int);
113  vtkBooleanMacro(GenerateSelectionScalars,int);
115 
117 
119  vtkSetMacro(InsideOut,int);
120  vtkGetMacro(InsideOut,int);
121  vtkBooleanMacro(InsideOut,int);
123 
125 
127  virtual void SetLoop(vtkPoints*);
130 
132 
133  vtkSetVector3Macro(ClosestPoint,double);
134  vtkGetVector3Macro(ClosestPoint,double);
136 
138 
139  vtkSetClampMacro(SelectionMode,int,
141  vtkGetMacro(SelectionMode,int);
143  {this->SetSelectionMode(VTK_INSIDE_SMALLEST_REGION);};
145  {this->SetSelectionMode(VTK_INSIDE_LARGEST_REGION);};
147  {this->SetSelectionMode(VTK_INSIDE_CLOSEST_POINT_REGION);};
148  const char *GetSelectionModeAsString();
150 
152 
154  vtkSetMacro(GenerateUnselectedOutput,int);
155  vtkGetMacro(GenerateUnselectedOutput,int);
156  vtkBooleanMacro(GenerateUnselectedOutput,int);
158 
162 
165 
166  // Overload GetMTime() because we depend on Loop
167  unsigned long int GetMTime();
168 
169 protected:
172 
174 
179  double ClosestPoint[3];
181 
182 private:
183  vtkPolyData *Mesh;
184  void GetPointNeighbors (vtkIdType ptId, vtkIdList *nei);
185 private:
186  vtkSelectPolyData(const vtkSelectPolyData&); // Not implemented.
187  void operator=(const vtkSelectPolyData&); // Not implemented.
188 };
189 
191 
193 {
195  {
196  return "InsideSmallestRegion";
197  }
198  else if ( this->SelectionMode == VTK_INSIDE_LARGEST_REGION )
199  {
200  return "InsideLargestRegion";
201  }
202  else
203  {
204  return "InsideClosestPointRegion";
205  }
206 }
208 
209 #endif
210 
211 
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkSelectPolyData::SetLoop
virtual void SetLoop(vtkPoints *)
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkSelectPolyData::GenerateUnselectedOutput
int GenerateUnselectedOutput
Definition: vtkSelectPolyData.h:180
vtkSelectPolyData::~vtkSelectPolyData
~vtkSelectPolyData()
VTK_INSIDE_LARGEST_REGION
#define VTK_INSIDE_LARGEST_REGION
Definition: vtkSelectPolyData.h:87
vtkSetVector3Macro
#define vtkSetVector3Macro(name, type)
Definition: vtkSetGet.h:287
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkSelectPolyData::GetUnselectedOutput
vtkPolyData * GetUnselectedOutput()
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkSelectPolyData::SetSelectionModeToClosestPointRegion
void SetSelectionModeToClosestPointRegion()
Definition: vtkSelectPolyData.h:146
vtkFiltersModelingModule.h
vtkSelectPolyData::GetMTime
unsigned long int GetMTime()
vtkSelectPolyData::Loop
vtkPoints * Loop
Definition: vtkSelectPolyData.h:177
vtkSelectPolyData::GenerateSelectionScalars
int GenerateSelectionScalars
Definition: vtkSelectPolyData.h:175
vtkSelectPolyData::GetSelectionEdges
vtkPolyData * GetSelectionEdges()
vtkPolyDataAlgorithm.h
vtkCharArray
dynamic, self-adjusting array of char
Definition: vtkCharArray.h:46
VTK_INSIDE_CLOSEST_POINT_REGION
#define VTK_INSIDE_CLOSEST_POINT_REGION
Definition: vtkSelectPolyData.h:88
vtkSetClampMacro
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:143
vtkSelectPolyData::SelectionMode
int SelectionMode
Definition: vtkSelectPolyData.h:178
vtkGetVector3Macro
#define vtkGetVector3Macro(name, type)
Definition: vtkSetGet.h:304
vtkSelectPolyData::vtkSelectPolyData
vtkSelectPolyData()
VTK_INSIDE_SMALLEST_REGION
#define VTK_INSIDE_SMALLEST_REGION
Definition: vtkSelectPolyData.h:86
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:36
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkSelectPolyData::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkSelectPolyData::SetSelectionModeToLargestRegion
void SetSelectionModeToLargestRegion()
Definition: vtkSelectPolyData.h:144
vtkSelectPolyData::SetSelectionModeToSmallestRegion
void SetSelectionModeToSmallestRegion()
Definition: vtkSelectPolyData.h:142
vtkSelectPolyData::InsideOut
int InsideOut
Definition: vtkSelectPolyData.h:176
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkSelectPolyData
select portion of polygonal mesh; generate selection scalars
Definition: vtkSelectPolyData.h:95
vtkSelectPolyData::GetSelectionModeAsString
const char * GetSelectionModeAsString()
Definition: vtkSelectPolyData.h:192
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
VTKFILTERSMODELING_EXPORT
#define VTKFILTERSMODELING_EXPORT
Definition: vtkFiltersModelingModule.h:15
vtkSelectPolyData::New
static vtkSelectPolyData * New()
vtkSelectPolyData::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:44