VTK  9.3.0
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
30 #ifndef vtkPolyDataToImageStencil_h
31 #define vtkPolyDataToImageStencil_h
32 
33 #include "vtkImageStencilSource.h"
34 #include "vtkImagingStencilModule.h" // For export macro
35 
36 VTK_ABI_NAMESPACE_BEGIN
37 class vtkIdList;
38 class vtkMergePoints;
39 class vtkDataSet;
40 class vtkPolyData;
41 
42 class VTKIMAGINGSTENCIL_EXPORT vtkPolyDataToImageStencil : public vtkImageStencilSource
43 {
44 public:
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
50 
53  virtual void SetInputData(vtkPolyData*);
56 
58 
65  vtkSetClampMacro(Tolerance, double, 0.0, 1.0);
66  vtkGetMacro(Tolerance, double);
68 
70 
73  vtkGetMacro(EnableSMP, bool);
74  vtkSetMacro(EnableSMP, bool);
76 
77 protected:
80 
82  vtkImageStencilData* output, vtkIdList* storage, int extent[6], int threadId);
83 
84  static void PolyDataCutter(vtkPolyData* input, vtkPolyData* output, vtkIdList* storage, double z);
85 
86  static void PolyDataSelector(
87  vtkPolyData* input, vtkPolyData* output, vtkIdList* storage, double z, double thickness);
88 
90 
92 
96  double Tolerance;
97 
98  bool EnableSMP;
99  class ThreadWorker;
100 
101 private:
103  void operator=(const vtkPolyDataToImageStencil&) = delete;
104 };
105 
106 VTK_ABI_NAMESPACE_END
107 #endif
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
list of point or cell ids
Definition: vtkIdList.h:32
efficient description of an image stencil
generate an image stencil
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
merge exactly coincident points
use polydata to mask an image
void ThreadedExecute(vtkImageStencilData *output, vtkIdList *storage, int extent[6], int threadId)
static void PolyDataCutter(vtkPolyData *input, vtkPolyData *output, vtkIdList *storage, double z)
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
double Tolerance
The tolerance distance for favoring the inside of the stencil.
virtual void SetInputData(vtkPolyData *)
Specify the implicit function to convert into a stencil.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkPolyDataToImageStencil() override
static vtkPolyDataToImageStencil * New()
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
static void PolyDataSelector(vtkPolyData *input, vtkPolyData *output, vtkIdList *storage, double z, double thickness)
vtkPolyData * GetInput()
Specify the implicit function to convert into a stencil.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:89
@ extent
Definition: vtkX3D.h:345