VTK  9.2.5
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=========================================================================*/
49#ifndef vtkProbeLineFilter_h
50#define vtkProbeLineFilter_h
51
53#include "vtkFiltersParallelDIY2Module.h" // For export macro
54#include "vtkSmartPointer.h" // For sampling line
55
56#include <vector> // For sampling line
57
58class vtkDataSet;
59class vtkIdList;
61class vtkPoints;
62class vtkPolyData;
63class vtkVector3d;
64
65class VTKFILTERSPARALLELDIY2_EXPORT vtkProbeLineFilter : public vtkDataObjectAlgorithm
66{
67public:
69 void PrintSelf(ostream& os, vtkIndent indent) override;
70
72
74
78 vtkGetObjectMacro(Controller, vtkMultiProcessController);
80
86
88
92 vtkSetMacro(PassCellArrays, bool);
93 vtkBooleanMacro(PassCellArrays, bool);
94 vtkGetMacro(PassCellArrays, bool);
97
101 vtkSetMacro(PassPointArrays, bool);
102 vtkBooleanMacro(PassPointArrays, bool);
103 vtkGetMacro(PassPointArrays, bool);
105
107
111 vtkSetMacro(PassFieldArrays, bool);
112 vtkBooleanMacro(PassFieldArrays, bool);
113 vtkGetMacro(PassFieldArrays, bool);
115
117
122 vtkSetMacro(Tolerance, double);
123 vtkGetMacro(Tolerance, double);
125
127
132 vtkSetMacro(ComputeTolerance, bool);
133 vtkBooleanMacro(ComputeTolerance, bool);
134 vtkGetMacro(ComputeTolerance, bool);
136
138
150 vtkSetMacro(PassPartialArrays, bool);
151 vtkGetMacro(PassPartialArrays, bool);
152 vtkBooleanMacro(PassPartialArrays, bool);
154
159 {
160 SAMPLE_LINE_AT_CELL_BOUNDARIES = 0,
161 SAMPLE_LINE_AT_SEGMENT_CENTERS = 1,
162 SAMPLE_LINE_UNIFORMLY = 2
163 };
164
166
170 vtkGetMacro(SamplingPattern, int);
171 vtkSetClampMacro(SamplingPattern, int, 0, 2);
173
175
180 vtkGetMacro(LineResolution, int);
181 vtkSetMacro(LineResolution, int);
183
185
192 vtkGetMacro(AggregateAsPolyData, bool);
193 vtkSetMacro(AggregateAsPolyData, bool);
194 vtkBooleanMacro(AggregateAsPolyData, bool);
196
197protected:
200
203 int FillInputPortInformation(int port, vtkInformation* info) override;
204
210 vtkPoints* points, vtkIdList* pointIds, vtkDataObject* input, double tol) const;
211
213
218 const std::vector<vtkDataSet*>& input, const double tolerance) const;
220 const vtkVector3d& p1, const vtkVector3d& p2) const;
222
223 vtkMultiProcessController* Controller = nullptr;
224
225 int SamplingPattern = SAMPLE_LINE_AT_CELL_BOUNDARIES;
226 int LineResolution = 1000;
227
228 bool AggregateAsPolyData = true;
229 bool PassPartialArrays = false;
230 bool PassCellArrays = false;
231 bool PassPointArrays = false;
232 bool PassFieldArrays = false;
233 bool ComputeTolerance = true;
234 double Tolerance = 1.0;
235
236private:
237 vtkProbeLineFilter(const vtkProbeLineFilter&) = delete;
238 void operator=(const vtkProbeLineFilter&) = delete;
239
240 struct vtkInternals;
241 vtkInternals* Internal;
242};
243
244#endif
Proxy object to connect input/output ports.
Superclass for algorithms that produce only data object as output.
general representation of visualization data
Definition: vtkDataObject.h:66
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
list of point or cell ids
Definition: vtkIdList.h:34
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Multiprocessing communication superclass.
represent and manipulate 3D points
Definition: vtkPoints.h:40
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:91
probe dataset along a line in parallel
virtual void SetSourceConnection(vtkAlgorithmOutput *input)
Set the source for creating the lines to probe from.
SamplingPatternEnum
Sampling pattern enumeration.
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.
Hold a reference to a vtkObjectBase instance.