VTK
vtkPolyDataToImageStencil.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkPolyDataToImageStencil.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=========================================================================*/
15/*=========================================================================
16
17Copyright (c) 2008 Atamai, Inc.
18
19Use, modification and redistribution of the software, in source or
20binary forms, are permitted provided that the following terms and
21conditions are met:
22
231) Redistribution of the source code, in verbatim or modified
24 form, must retain the above copyright notice, this license,
25 the following disclaimer, and any notices that refer to this
26 license and/or the following disclaimer.
27
282) Redistribution in binary form must include the above copyright
29 notice, a copy of this license and the following disclaimer
30 in the documentation or with other materials provided with the
31 distribution.
32
333) Modified copies of the source code must be clearly marked as such,
34 and must not be misrepresented as verbatim copies of the source code.
35
36THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS"
37WITHOUT EXPRESSED OR IMPLIED WARRANTY INCLUDING, BUT NOT LIMITED TO,
38THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
39PURPOSE. IN NO EVENT SHALL ANY COPYRIGHT HOLDER OR OTHER PARTY WHO MAY
40MODIFY AND/OR REDISTRIBUTE THE SOFTWARE UNDER THE TERMS OF THIS LICENSE
41BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES
42(INCLUDING, BUT NOT LIMITED TO, LOSS OF DATA OR DATA BECOMING INACCURATE
43OR LOSS OF PROFIT OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF
44THE USE OR INABILITY TO USE THE SOFTWARE, EVEN IF ADVISED OF THE
45POSSIBILITY OF SUCH DAMAGES.
46
47=========================================================================*/
68#ifndef vtkPolyDataToImageStencil_h
69#define vtkPolyDataToImageStencil_h
70
71#include "vtkImagingStencilModule.h" // For export macro
73
74class vtkMergePoints;
75class vtkDataSet;
76class vtkPolyData;
77
78class VTKIMAGINGSTENCIL_EXPORT vtkPolyDataToImageStencil :
80{
81public:
84 void PrintSelf(ostream& os, vtkIndent indent);
85
87
90 virtual void SetInputData(vtkPolyData*);
93
95
102 vtkSetClampMacro(Tolerance, double, 0.0, 1.0);
103 vtkGetMacro(Tolerance, double);
105
106protected:
109
111 int extent[6], int threadId);
112
113 static void PolyDataCutter(vtkPolyData *input, vtkPolyData *output,
114 double z);
115
116 static void PolyDataSelector(vtkPolyData *input, vtkPolyData *output,
117 double z, double thickness);
118
121
123
127 double Tolerance;
128
129private:
130 vtkPolyDataToImageStencil(const vtkPolyDataToImageStencil&) VTK_DELETE_FUNCTION;
131 void operator=(const vtkPolyDataToImageStencil&) VTK_DELETE_FUNCTION;
132};
133
134#endif
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
efficient description of an image stencil
generate an image stencil
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
merge exactly coincident points
use polydata to mask an image
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual int FillInputPortInformation(int, vtkInformation *)
Fill the input port information objects for this algorithm.
static void PolyDataCutter(vtkPolyData *input, vtkPolyData *output, double z)
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.
static vtkPolyDataToImageStencil * New()
vtkPolyData * GetInput()
static void PolyDataSelector(vtkPolyData *input, vtkPolyData *output, double z, double thickness)
void ThreadedExecute(vtkImageStencilData *output, int extent[6], int threadId)
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
@ extent
Definition: vtkX3D.h:345