OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I386LINUX / util / I386LINUX / include / vtk / vtkBooleanTexture.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkBooleanTexture.h,v $
5   Language:  C++
6   Date:      $Date: 2002/06/11 15:47:59 $
7   Version:   $Revision: 1.34 $
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 vtkBooleanTexture - generate 2D texture map based on combinations of inside, outside, and on region boundary
19
20 // .SECTION Description
21 // vtkBooleanTexture is a filter to generate a 2D texture map based on 
22 // combinations of inside, outside, and on region boundary. The "region" is
23 // implicitly represented via 2D texture coordinates. These texture 
24 // coordinates are normally generated using a filter like 
25 // vtkImplicitTextureCoords, which generates the texture coordinates for 
26 // any implicit function.
27 //
28 // vtkBooleanTexture generates the map according to the s-t texture
29 // coordinates plus the notion of being in, on, or outside of a
30 // region. An in region is when the texture coordinate is between
31 // (0,0.5-thickness/2).  An out region is where the texture coordinate
32 // is (0.5+thickness/2). An on region is between
33 // (0.5-thickness/2,0.5+thickness/2). The combination in, on, and out
34 // for each of the s-t texture coordinates results in 16 possible
35 // combinations (see text). For each combination, a different value of 
36 // intensity and transparency can be assigned. To assign maximum intensity
37 // and/or opacity use the value 255. A minimum value of 0 results in
38 // a black region (for intensity) and a fully transparent region (for
39 // transparency).
40
41 // .SECTION See Also
42 // vtkImplicitTextureCoords vtkThresholdTextureCoords
43
44 #ifndef __vtkBooleanTexture_h
45 #define __vtkBooleanTexture_h
46
47 #include "vtkImageSource.h"
48
49 class VTK_IMAGING_EXPORT vtkBooleanTexture : public vtkImageSource
50 {
51 public:
52   static vtkBooleanTexture *New();
53
54   vtkTypeRevisionMacro(vtkBooleanTexture,vtkImageSource);
55   void PrintSelf(ostream& os, vtkIndent indent);
56
57   // Description:
58   // Set the X texture map dimension.
59   vtkSetMacro(XSize,int);
60   vtkGetMacro(XSize,int);
61
62   // Description:
63   // Set the Y texture map dimension.
64   vtkSetMacro(YSize,int);
65   vtkGetMacro(YSize,int);
66
67   // Description:
68   // Set the thickness of the "on" region.
69   vtkSetMacro(Thickness,int);
70   vtkGetMacro(Thickness,int);
71
72   // Description:
73   // Specify intensity/transparency for "in/in" region.
74   vtkSetVector2Macro(InIn,unsigned char);
75   vtkGetVectorMacro(InIn,unsigned char,2);
76
77   // Description:
78   // Specify intensity/transparency for "in/out" region.
79   vtkSetVector2Macro(InOut,unsigned char);
80   vtkGetVectorMacro(InOut,unsigned char,2);
81
82   // Description:
83   // Specify intensity/transparency for "out/in" region.
84   vtkSetVector2Macro(OutIn,unsigned char);
85   vtkGetVectorMacro(OutIn,unsigned char,2);
86
87   // Description:
88   // Specify intensity/transparency for "out/out" region.
89   vtkSetVector2Macro(OutOut,unsigned char);
90   vtkGetVectorMacro(OutOut,unsigned char,2);
91
92   // Description:
93   // Specify intensity/transparency for "on/on" region.
94   vtkSetVector2Macro(OnOn,unsigned char);
95   vtkGetVectorMacro(OnOn,unsigned char,2);
96
97   // Description:
98   // Specify intensity/transparency for "on/in" region.
99   vtkSetVector2Macro(OnIn,unsigned char);
100   vtkGetVectorMacro(OnIn,unsigned char,2);
101
102   // Description:
103   // Specify intensity/transparency for "on/out" region.
104   vtkSetVector2Macro(OnOut,unsigned char);
105   vtkGetVectorMacro(OnOut,unsigned char,2);
106
107   // Description:
108   // Specify intensity/transparency for "in/on" region.
109   vtkSetVector2Macro(InOn,unsigned char);
110   vtkGetVectorMacro(InOn,unsigned char,2);
111
112   // Description:
113   // Specify intensity/transparency for "out/on" region.
114   vtkSetVector2Macro(OutOn,unsigned char);
115   vtkGetVectorMacro(OutOn,unsigned char,2);
116
117 protected:
118   vtkBooleanTexture();
119   ~vtkBooleanTexture() {};
120
121   virtual void ExecuteInformation();
122   virtual void ExecuteData(vtkDataObject *data);
123
124   int XSize;
125   int YSize;
126
127   int Thickness;
128   unsigned char InIn[2];
129   unsigned char InOut[2];
130   unsigned char OutIn[2];
131   unsigned char OutOut[2];
132   unsigned char OnOn[2];
133   unsigned char OnIn[2];
134   unsigned char OnOut[2];
135   unsigned char InOn[2];
136   unsigned char OutOn[2];
137
138 private:
139   vtkBooleanTexture(const vtkBooleanTexture&);  // Not implemented.
140   void operator=(const vtkBooleanTexture&);  // Not implemented.
141 };
142
143 #endif
144
145