VTK
vtkThresholdTextureCoords.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkThresholdTextureCoords.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 =========================================================================*/
43 #ifndef __vtkThresholdTextureCoords_h
44 #define __vtkThresholdTextureCoords_h
45 
46 #include "vtkDataSetAlgorithm.h"
47 
49 {
50 public:
53  void PrintSelf(ostream& os, vtkIndent indent);
54 
56  void ThresholdByLower(double lower);
57 
59  void ThresholdByUpper(double upper);
60 
63  void ThresholdBetween(double lower, double upper);
64 
66 
67  vtkGetMacro(UpperThreshold,double);
68  vtkGetMacro(LowerThreshold,double);
70 
72 
73  vtkSetClampMacro(TextureDimension,int,1,3);
74  vtkGetMacro(TextureDimension,int);
76 
78 
80  vtkSetVector3Macro(InTextureCoord,double);
81  vtkGetVectorMacro(InTextureCoord,double,3);
83 
85 
87  vtkSetVector3Macro(OutTextureCoord,double);
88  vtkGetVectorMacro(OutTextureCoord,double,3);
90 
91 protected:
94 
95  // Usual data generation method
97 
100 
102 
103  double InTextureCoord[3];
104  double OutTextureCoord[3];
105 
106  //BTX
107  int (vtkThresholdTextureCoords::*ThresholdFunction)(double s);
108  //ETX
109 
110  int Lower(double s) {return ( s <= this->LowerThreshold ? 1 : 0 );};
111  int Upper(double s) {return ( s >= this->UpperThreshold ? 1 : 0 );};
112  int Between(double s) {return ( s >= this->LowerThreshold ?
113  ( s <= this->UpperThreshold ? 1 : 0 ) : 0 );};
114 private:
115  vtkThresholdTextureCoords(const vtkThresholdTextureCoords&); // Not implemented.
116  void operator=(const vtkThresholdTextureCoords&); // Not implemented.
117 };
118 
119 #endif