VTK  9.1.0
vtkProbeLineFilter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkProbeLineFilter.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=========================================================================*/
46#ifndef vtkProbeLineFilter_h
47#define vtkProbeLineFilter_h
48
50#include "vtkFiltersParallelDIY2Module.h" // For export macro
51#include "vtkSmartPointer.h" // For sampling line
52
53#include <vector> // For sampling line
54
55class vtkDataSet;
56class vtkIdList;
58class vtkPoints;
59class vtkPolyData;
60class vtkVector3d;
61
62class VTKFILTERSPARALLELDIY2_EXPORT vtkProbeLineFilter : public vtkDataObjectAlgorithm
63{
64public:
66 void PrintSelf(ostream& os, vtkIndent indent) override;
67
69
71
75 vtkGetObjectMacro(Controller, vtkMultiProcessController);
77
83
85
89 vtkSetMacro(PassCellArrays, bool);
90 vtkBooleanMacro(PassCellArrays, bool);
91 vtkGetMacro(PassCellArrays, bool);
94
98 vtkSetMacro(PassPointArrays, bool);
99 vtkBooleanMacro(PassPointArrays, bool);
100 vtkGetMacro(PassPointArrays, bool);
102
104
108 vtkSetMacro(PassFieldArrays, bool);
109 vtkBooleanMacro(PassFieldArrays, bool);
110 vtkGetMacro(PassFieldArrays, bool);
112
114
119 vtkSetMacro(Tolerance, double);
120 vtkGetMacro(Tolerance, double);
122
124
129 vtkSetMacro(ComputeTolerance, bool);
130 vtkBooleanMacro(ComputeTolerance, bool);
131 vtkGetMacro(ComputeTolerance, bool);
133
135
147 vtkSetMacro(PassPartialArrays, bool);
148 vtkGetMacro(PassPartialArrays, bool);
149 vtkBooleanMacro(PassPartialArrays, bool);
151
156 {
157 SAMPLE_LINE_AT_CELL_BOUNDARIES = 0,
158 SAMPLE_LINE_AT_SEGMENT_CENTERS = 1,
159 SAMPLE_LINE_UNIFORMLY = 2
160 };
161
163
167 vtkGetMacro(SamplingPattern, int);
168 vtkSetClampMacro(SamplingPattern, int, 0, 2);
170
172
177 vtkGetMacro(LineResolution, int);
178 vtkSetMacro(LineResolution, int);
180
182
189 vtkGetMacro(AggregateAsPolyData, bool);
190 vtkSetMacro(AggregateAsPolyData, bool);
191 vtkBooleanMacro(AggregateAsPolyData, bool);
193
194protected:
197
201
207 vtkPoints* points, vtkIdList* pointIds, vtkDataObject* input, double tol) const;
208
210
215 const std::vector<vtkDataSet*>& input, const double tolerance) const;
217 const vtkVector3d& p1, const vtkVector3d& p2) const;
219
220 vtkMultiProcessController* Controller = nullptr;
221
222 int SamplingPattern = SAMPLE_LINE_AT_CELL_BOUNDARIES;
223 int LineResolution = 1000;
224
225 bool AggregateAsPolyData = true;
226 bool PassPartialArrays = false;
227 bool PassCellArrays = false;
228 bool PassPointArrays = false;
229 bool PassFieldArrays = false;
230 bool ComputeTolerance = true;
231 double Tolerance = 1.0;
232
233private:
234 vtkProbeLineFilter(const vtkProbeLineFilter&) = delete;
235 void operator=(const vtkProbeLineFilter&) = delete;
236
237 struct vtkInternals;
238 vtkInternals* Internal;
239};
240
241#endif
Proxy object to connect input/output ports.
Superclass for algorithms that produce only data object as output.
general representation of visualization data
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
list of point or cell ids
Definition: vtkIdList.h:140
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Multiprocessing communication superclass.
represent and manipulate 3D points
Definition: vtkPoints.h:143
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
probe dataset along a line in parallel
SamplingPattern
Sampling pattern enumeration.
virtual void SetSourceConnection(vtkAlgorithmOutput *input)
Set the source for creating the lines to probe from.
virtual void SetController(vtkMultiProcessController *)
Set and get the controller.
vtkSmartPointer< vtkPolyData > SampleLineUniformly(const vtkVector3d &p1, const vtkVector3d &p2) const
Generate sampling point between p1 and p2 according to SamplingPattern.
int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
~vtkProbeLineFilter() override
vtkSmartPointer< vtkPolyData > CreateSamplingPolyLine(vtkPoints *points, vtkIdList *pointIds, vtkDataObject *input, double tol) const
Generate sampling point for a given cell.
vtkSmartPointer< vtkPolyData > SampleLineAtEachCell(const vtkVector3d &p1, const vtkVector3d &p2, const std::vector< vtkDataSet * > &input, const double tolerance) const
Generate sampling point between p1 and p2 according to SamplingPattern.
static vtkProbeLineFilter * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
@ points
Definition: vtkX3D.h:452
@ info
Definition: vtkX3D.h:382
@ port
Definition: vtkX3D.h:453