VTK  9.2.6
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 
52 #include "vtkDataObjectAlgorithm.h"
53 #include "vtkFiltersParallelDIY2Module.h" // For export macro
54 #include "vtkSmartPointer.h" // For sampling line
55 
56 #include <vector> // For sampling line
57 
58 class vtkDataSet;
59 class vtkIdList;
61 class vtkPoints;
62 class vtkPolyData;
63 class vtkVector3d;
64 
65 class VTKFILTERSPARALLELDIY2_EXPORT vtkProbeLineFilter : public vtkDataObjectAlgorithm
66 {
67 public:
69  void PrintSelf(ostream& os, vtkIndent indent) override;
70 
71  static vtkProbeLineFilter* New();
72 
74 
77  virtual void SetController(vtkMultiProcessController*);
78  vtkGetObjectMacro(Controller, vtkMultiProcessController);
80 
85  virtual void SetSourceConnection(vtkAlgorithmOutput* input);
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 
197 protected:
199  ~vtkProbeLineFilter() override;
200 
203  int FillInputPortInformation(int port, vtkInformation* info) override;
204 
209  vtkSmartPointer<vtkPolyData> CreateSamplingPolyLine(
210  vtkPoints* points, vtkIdList* pointIds, vtkDataObject* input, double tol) const;
211 
213 
217  vtkSmartPointer<vtkPolyData> SampleLineAtEachCell(const vtkVector3d& p1, const vtkVector3d& p2,
218  const std::vector<vtkDataSet*>& input, const double tolerance) const;
219  vtkSmartPointer<vtkPolyData> SampleLineUniformly(
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 
236 private:
237  vtkProbeLineFilter(const vtkProbeLineFilter&) = delete;
238  void operator=(const vtkProbeLineFilter&) = delete;
239 
240  struct vtkInternals;
241  vtkInternals* Internal;
242 };
243 
244 #endif
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
SamplingPatternEnum
Sampling pattern enumeration.
static vtkDataObjectAlgorithm * New()
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:90
Proxy object to connect input/output ports.
a simple class to control print indentation
Definition: vtkIndent.h:39
list of point or cell ids
Definition: vtkIdList.h:33
probe dataset along a line in parallel
Superclass for algorithms that produce only data object as output.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Store zero or more vtkInformation instances.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
general representation of visualization data
Definition: vtkDataObject.h:65
represent and manipulate 3D points
Definition: vtkPoints.h:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Multiprocessing communication superclass.