VTK  9.3.1
vtkPolyDataToImageStencil.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright (c) 2008 Atamai, Inc.
3 // SPDX-License-Identifier: BSD-3-Clause
21 #ifndef vtkPolyDataToImageStencil_h
22 #define vtkPolyDataToImageStencil_h
23 
24 #include "vtkImageStencilSource.h"
25 #include "vtkImagingStencilModule.h" // For export macro
26 
27 VTK_ABI_NAMESPACE_BEGIN
28 class vtkIdList;
29 class vtkMergePoints;
30 class vtkDataSet;
31 class vtkPolyData;
32 
33 class VTKIMAGINGSTENCIL_EXPORT vtkPolyDataToImageStencil : public vtkImageStencilSource
34 {
35 public:
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
41 
44  virtual void SetInputData(vtkPolyData*);
45  vtkPolyData* GetInput();
47 
49 
56  vtkSetClampMacro(Tolerance, double, 0.0, 1.0);
57  vtkGetMacro(Tolerance, double);
59 
61 
64  vtkGetMacro(EnableSMP, bool);
65  vtkSetMacro(EnableSMP, bool);
67 
68 protected:
70  ~vtkPolyDataToImageStencil() override;
71 
72  void ThreadedExecute(
73  vtkImageStencilData* output, vtkIdList* storage, int extent[6], int threadId);
74 
75  static void PolyDataCutter(vtkPolyData* input, vtkPolyData* output, vtkIdList* storage, double z);
76 
77  static void PolyDataSelector(
78  vtkPolyData* input, vtkPolyData* output, vtkIdList* storage, double z, double thickness);
79 
81 
82  int FillInputPortInformation(int, vtkInformation*) override;
83 
87  double Tolerance;
88 
89  bool EnableSMP;
90  class ThreadWorker;
91 
92 private:
94  void operator=(const vtkPolyDataToImageStencil&) = delete;
95 };
96 
97 VTK_ABI_NAMESPACE_END
98 #endif
Store vtkAlgorithm input/output information.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkImageStencilSource * New()
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
a simple class to control print indentation
Definition: vtkIndent.h:28
efficient description of an image stencil
merge exactly coincident points
list of point or cell ids
Definition: vtkIdList.h:22
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Store zero or more vtkInformation instances.
generate an image stencil
use polydata to mask an image
double Tolerance
The tolerance distance for favoring the inside of the stencil.