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
vtkThresholdTextureCoords::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkThresholdTextureCoords::ThresholdByLower
void ThresholdByLower(double lower)
vtkThresholdTextureCoords::Upper
int Upper(double s)
Definition: vtkThresholdTextureCoords.h:112
vtkSetVector3Macro
#define vtkSetVector3Macro(name, type)
Definition: vtkSetGet.h:287
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkgl::s
GLdouble s
Definition: vtkgl.h:11594
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkThresholdTextureCoords::Lower
int Lower(double s)
Definition: vtkThresholdTextureCoords.h:111
vtkThresholdTextureCoords::UpperThreshold
double UpperThreshold
Definition: vtkThresholdTextureCoords.h:100
vtkThresholdTextureCoords::ThresholdByUpper
void ThresholdByUpper(double upper)
vtkThresholdTextureCoords::vtkThresholdTextureCoords
vtkThresholdTextureCoords()
vtkThresholdTextureCoords::Between
int Between(double s)
Definition: vtkThresholdTextureCoords.h:113
vtkGetVectorMacro
#define vtkGetVectorMacro(name, type, count)
Definition: vtkSetGet.h:424
vtkDataSetAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkDataSetAlgorithm.h:51
vtkSetClampMacro
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:143
vtkThresholdTextureCoords::~vtkThresholdTextureCoords
~vtkThresholdTextureCoords()
Definition: vtkThresholdTextureCoords.h:94
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkThresholdTextureCoords::ThresholdBetween
void ThresholdBetween(double lower, double upper)
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkFiltersTextureModule.h
vtkThresholdTextureCoords::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
VTKFILTERSTEXTURE_EXPORT
#define VTKFILTERSTEXTURE_EXPORT
Definition: vtkFiltersTextureModule.h:15
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkThresholdTextureCoords::TextureDimension
int TextureDimension
Definition: vtkThresholdTextureCoords.h:102
vtkDataSetAlgorithm.h
vtkThresholdTextureCoords::New
static vtkThresholdTextureCoords * New()
vtkThresholdTextureCoords::LowerThreshold
double LowerThreshold
Definition: vtkThresholdTextureCoords.h:99
int
int
Definition: vtkVectorOperators.h:164
vtkThresholdTextureCoords
compute 1D, 2D, or 3D texture coordinates based on scalar threshold
Definition: vtkThresholdTextureCoords.h:50