OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I386LINUX / util / I386LINUX / include / vtk / vtkPolyDataToImageStencil.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkPolyDataToImageStencil.h,v $
5   Language:  C++
6   Date:      $Date: 2002/08/07 23:12:10 $
7   Version:   $Revision: 1.8 $
8
9   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
10   All rights reserved.
11   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
12
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.
16
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.
23 // .SECTION see also
24 // vtkPolyData vtkImageStencil vtkImplicitFunctionToImageStencil
25
26 #ifndef __vtkPolyDataToImageStencil_h
27 #define __vtkPolyDataToImageStencil_h
28
29
30 #include "vtkImageStencilSource.h"
31
32 class vtkPolyData;
33 class vtkOBBTree;
34
35 class VTK_HYBRID_EXPORT vtkPolyDataToImageStencil : public vtkImageStencilSource
36 {
37 public:
38   static vtkPolyDataToImageStencil *New();
39   vtkTypeRevisionMacro(vtkPolyDataToImageStencil, vtkImageStencilSource);
40   void PrintSelf(ostream& os, vtkIndent indent);
41
42   // Description:
43   // Specify the polydata to convert into a stencil.
44   void SetInput(vtkPolyData *input);
45   vtkPolyData *GetInput();
46
47   // Description:
48   // Set the tolerance for doing spatial searches of the polydata.
49   vtkSetMacro(Tolerance, float);
50   vtkGetMacro(Tolerance, float);
51
52 protected:
53   vtkPolyDataToImageStencil();
54   ~vtkPolyDataToImageStencil();
55
56   void ExecuteData(vtkDataObject *out);
57   void ThreadedExecute(vtkImageStencilData *output,
58                        int extent[6], int threadId);
59
60   float Tolerance;
61   vtkOBBTree *OBBTree;
62 private:
63   vtkPolyDataToImageStencil(const vtkPolyDataToImageStencil&);  // Not implemented.
64   void operator=(const vtkPolyDataToImageStencil&);  // Not implemented.
65 };
66
67 #endif