1 /*=========================================================================
3 Program: Visualization Toolkit
4 Module: $RCSfile: vtkPolyDataToImageStencil.h,v $
6 Date: $Date: 2002/08/07 23:12:10 $
7 Version: $Revision: 1.8 $
9 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
11 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notice for more information.
17 =========================================================================*/
18 // .NAME vtkPolyDataToImageStencil - clip an image with polydata
19 // .SECTION Description
20 // vtkPolyDataToImageStencil will convert a vtkPolyData into an image
21 // that can be used with vtkImageStecil or other vtk classes that apply
22 // a stencil to an image.
24 // vtkPolyData vtkImageStencil vtkImplicitFunctionToImageStencil
26 #ifndef __vtkPolyDataToImageStencil_h
27 #define __vtkPolyDataToImageStencil_h
30 #include "vtkImageStencilSource.h"
35 class VTK_HYBRID_EXPORT vtkPolyDataToImageStencil : public vtkImageStencilSource
38 static vtkPolyDataToImageStencil *New();
39 vtkTypeRevisionMacro(vtkPolyDataToImageStencil, vtkImageStencilSource);
40 void PrintSelf(ostream& os, vtkIndent indent);
43 // Specify the polydata to convert into a stencil.
44 void SetInput(vtkPolyData *input);
45 vtkPolyData *GetInput();
48 // Set the tolerance for doing spatial searches of the polydata.
49 vtkSetMacro(Tolerance, float);
50 vtkGetMacro(Tolerance, float);
53 vtkPolyDataToImageStencil();
54 ~vtkPolyDataToImageStencil();
56 void ExecuteData(vtkDataObject *out);
57 void ThreadedExecute(vtkImageStencilData *output,
58 int extent[6], int threadId);
63 vtkPolyDataToImageStencil(const vtkPolyDataToImageStencil&); // Not implemented.
64 void operator=(const vtkPolyDataToImageStencil&); // Not implemented.