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 "vtkFiltersTextureModule.h" // For export macro
47 #include "vtkDataSetAlgorithm.h"
48 
50 {
51 public:
54  void PrintSelf(ostream& os, vtkIndent indent);
55 
57  void ThresholdByLower(double lower);
58 
60  void ThresholdByUpper(double upper);
61 
64  void ThresholdBetween(double lower, double upper);
65 
67 
68  vtkGetMacro(UpperThreshold,double);
69  vtkGetMacro(LowerThreshold,double);
71 
73 
74  vtkSetClampMacro(TextureDimension,int,1,3);
75  vtkGetMacro(TextureDimension,int);
77 
79 
81  vtkSetVector3Macro(InTextureCoord,double);
82  vtkGetVectorMacro(InTextureCoord,double,3);
84 
86 
88  vtkSetVector3Macro(OutTextureCoord,double);
89  vtkGetVectorMacro(OutTextureCoord,double,3);
91 
92 protected:
95 
96  // Usual data generation method
98 
101 
103 
104  double InTextureCoord[3];
105  double OutTextureCoord[3];
106 
107  //BTX
108  int (vtkThresholdTextureCoords::*ThresholdFunction)(double s);
109  //ETX
110 
111  int Lower(double s) {return ( s <= this->LowerThreshold ? 1 : 0 );};
112  int Upper(double s) {return ( s >= this->UpperThreshold ? 1 : 0 );};
113  int Between(double s) {return ( s >= this->LowerThreshold ?
114  ( s <= this->UpperThreshold ? 1 : 0 ) : 0 );};
115 private:
116  vtkThresholdTextureCoords(const vtkThresholdTextureCoords&); // Not implemented.
117  void operator=(const vtkThresholdTextureCoords&); // Not implemented.
118 };
119 
120 #endif
Store vtkAlgorithm input/output information.
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Store zero or more vtkInformation instances.
#define VTKFILTERSTEXTURE_EXPORT
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce output of the same type as input.
compute 1D, 2D, or 3D texture coordinates based on scalar threshold
static vtkDataSetAlgorithm * New()