OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / ALPHALINUX5 / util / ALPHALINUX5 / include / vtk / vtkBooleanTexture.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkBooleanTexture.h,v $
5   Language:  C++
6   Date:      $Date: 2002/02/01 06:35:46 $
7   Version:   $Revision: 1.1.1.1 $
8
9
10 Copyright (c) 1993-1998 Ken Martin, Will Schroeder, Bill Lorensen.
11
12 This software is copyrighted by Ken Martin, Will Schroeder and Bill Lorensen.
13 The following terms apply to all files associated with the software unless
14 explicitly disclaimed in individual files. This copyright specifically does
15 not apply to the related textbook "The Visualization Toolkit" ISBN
16 013199837-4 published by Prentice Hall which is covered by its own copyright.
17
18 The authors hereby grant permission to use, copy, and distribute this
19 software and its documentation for any purpose, provided that existing
20 copyright notices are retained in all copies and that this notice is included
21 verbatim in any distributions. Additionally, the authors grant permission to
22 modify this software and its documentation for any purpose, provided that
23 such modifications are not distributed without the explicit consent of the
24 authors and that existing copyright notices are retained in all copies. Some
25 of the algorithms implemented by this software are patented, observe all
26 applicable patent law.
27
28 IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
29 DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
30 OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF,
31 EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
33 THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING,
34 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
35 PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE IS PROVIDED ON AN
36 "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
37 MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
38
39
40 =========================================================================*/
41 // .NAME vtkBooleanTexture - generate 2D texture map based on combinations of inside, outside, and on region boundary
42 // .SECTION Description
43 // vtkBooleanTexture is a filter to generate a 2D texture map based on 
44 // combinations of inside, outside, and on region boundary. The "region" is
45 // implicitly represented via 2D texture coordinates. These texture 
46 // coordinates are normally generated using a filter like 
47 // vtkImplicitTextureCoords, which generates the texture coordinates for 
48 // any implicit function.
49 //
50 // vtkBooleanTexture generates the map according to the s-t texture
51 // coordinates plus the notion of being in, on, or outside of a
52 // region. An in region is when the texture coordinate is between
53 // (0,0.5-thickness/2).  An out region is where the texture coordinate
54 // is (0.5+thickness/2). An on region is between
55 // (0.5-thickness/2,0.5+thickness/2). The combination in, on, and out
56 // for each of the s-t texture coordinates results in 16 possible
57 // combinations (see text). For each combination, a different value of 
58 // intensity and transparency can be assigned. To assign maximum intensity
59 // and/or opacity use the value 255. A minimum value of 0 results in
60 // a black region (for intensity) and a fully transparent region (for
61 // transparency).
62 // .SECTION See Also
63 // vtkImplicitTextureCoords vtkThresholdTextureCoords
64
65 #ifndef __vtkBooleanTexture_h
66 #define __vtkBooleanTexture_h
67
68 #include "vtkStructuredPointsSource.h"
69
70 class VTK_EXPORT vtkBooleanTexture : public vtkStructuredPointsSource
71 {
72 public:
73   vtkBooleanTexture();
74   static vtkBooleanTexture *New() {return new vtkBooleanTexture;};
75   const char *GetClassName() {return "vtkBooleanTexture";};
76   void PrintSelf(ostream& os, vtkIndent indent);
77
78   // Description:
79   // Set the X texture map dimension.
80   vtkSetMacro(XSize,int);
81   vtkGetMacro(XSize,int);
82
83   // Description:
84   // Set the Y texture map dimension.
85   vtkSetMacro(YSize,int);
86   vtkGetMacro(YSize,int);
87
88   // Description:
89   // Set the thickness of the "on" region.
90   vtkSetMacro(Thickness,int);
91   vtkGetMacro(Thickness,int);
92
93   // Description:
94   // Specify intensity/transparency for "in/in" region.
95   vtkSetVector2Macro(InIn,unsigned char);
96   vtkGetVectorMacro(InIn,unsigned char,2);
97
98   // Description:
99   // Specify intensity/transparency for "in/out" region.
100   vtkSetVector2Macro(InOut,unsigned char);
101   vtkGetVectorMacro(InOut,unsigned char,2);
102
103   // Description:
104   // Specify intensity/transparency for "out/in" region.
105   vtkSetVector2Macro(OutIn,unsigned char);
106   vtkGetVectorMacro(OutIn,unsigned char,2);
107
108   // Description:
109   // Specify intensity/transparency for "out/out" region.
110   vtkSetVector2Macro(OutOut,unsigned char);
111   vtkGetVectorMacro(OutOut,unsigned char,2);
112
113   // Description:
114   // Specify intensity/transparency for "on/on" region.
115   vtkSetVector2Macro(OnOn,unsigned char);
116   vtkGetVectorMacro(OnOn,unsigned char,2);
117
118   // Description:
119   // Specify intensity/transparency for "on/in" region.
120   vtkSetVector2Macro(OnIn,unsigned char);
121   vtkGetVectorMacro(OnIn,unsigned char,2);
122
123   // Description:
124   // Specify intensity/transparency for "on/out" region.
125   vtkSetVector2Macro(OnOut,unsigned char);
126   vtkGetVectorMacro(OnOut,unsigned char,2);
127
128   // Description:
129   // Specify intensity/transparency for "in/on" region.
130   vtkSetVector2Macro(InOn,unsigned char);
131   vtkGetVectorMacro(InOn,unsigned char,2);
132
133   // Description:
134   // Specify intensity/transparency for "out/on" region.
135   vtkSetVector2Macro(OutOn,unsigned char);
136   vtkGetVectorMacro(OutOn,unsigned char,2);
137
138 protected:
139   void Execute();
140
141   int XSize;
142   int YSize;
143
144   int Thickness;
145   unsigned char InIn[2];
146   unsigned char InOut[2];
147   unsigned char OutIn[2];
148   unsigned char OutOut[2];
149   unsigned char OnOn[2];
150   unsigned char OnIn[2];
151   unsigned char OnOut[2];
152   unsigned char InOn[2];
153   unsigned char OutOn[2];
154
155 };
156
157 #endif
158
159