VTK  9.1.0
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 =========================================================================*/
57 #ifndef vtkThresholdTextureCoords_h
58 #define vtkThresholdTextureCoords_h
59 
60 #include "vtkDataSetAlgorithm.h"
61 #include "vtkFiltersTextureModule.h" // For export macro
62 
63 class VTKFILTERSTEXTURE_EXPORT vtkThresholdTextureCoords : public vtkDataSetAlgorithm
64 {
65 public:
68  void PrintSelf(ostream& os, vtkIndent indent) override;
69 
73  void ThresholdByLower(double lower);
74 
78  void ThresholdByUpper(double upper);
79 
83  void ThresholdBetween(double lower, double upper);
84 
86 
89  vtkGetMacro(UpperThreshold, double);
90  vtkGetMacro(LowerThreshold, double);
92 
94 
97  vtkSetClampMacro(TextureDimension, int, 1, 3);
98  vtkGetMacro(TextureDimension, int);
100 
102 
105  vtkSetVector3Macro(InTextureCoord, double);
106  vtkGetVectorMacro(InTextureCoord, double, 3);
108 
110 
114  vtkSetVector3Macro(OutTextureCoord, double);
115  vtkGetVectorMacro(OutTextureCoord, double, 3);
117 
118 protected:
120  ~vtkThresholdTextureCoords() override = default;
121 
122  // Usual data generation method
124 
127 
129 
130  double InTextureCoord[3];
131  double OutTextureCoord[3];
132 
133  int (vtkThresholdTextureCoords::*ThresholdFunction)(double s);
134 
135  int Lower(double s) { return (s <= this->LowerThreshold ? 1 : 0); }
136  int Upper(double s) { return (s >= this->UpperThreshold ? 1 : 0); }
137  int Between(double s)
138  {
139  return (s >= this->LowerThreshold ? (s <= this->UpperThreshold ? 1 : 0) : 0);
140  }
141 
142 private:
144  void operator=(const vtkThresholdTextureCoords&) = delete;
145 };
146 
147 #endif
vtkThresholdTextureCoords::ThresholdByLower
void ThresholdByLower(double lower)
Criterion is cells whose scalars are less than lower threshold.
vtkThresholdTextureCoords::Upper
int Upper(double s)
Definition: vtkThresholdTextureCoords.h:136
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkThresholdTextureCoords::Lower
int Lower(double s)
Definition: vtkThresholdTextureCoords.h:135
vtkThresholdTextureCoords::UpperThreshold
double UpperThreshold
Definition: vtkThresholdTextureCoords.h:126
vtkThresholdTextureCoords::ThresholdByUpper
void ThresholdByUpper(double upper)
Criterion is cells whose scalars are less than upper threshold.
vtkThresholdTextureCoords::vtkThresholdTextureCoords
vtkThresholdTextureCoords()
vtkThresholdTextureCoords::Between
int Between(double s)
Definition: vtkThresholdTextureCoords.h:137
vtkDataSetAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkDataSetAlgorithm.h:49
vtkThresholdTextureCoords::~vtkThresholdTextureCoords
~vtkThresholdTextureCoords() override=default
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkThresholdTextureCoords::ThresholdBetween
void ThresholdBetween(double lower, double upper)
Criterion is cells whose scalars are between lower and upper thresholds.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkThresholdTextureCoords::TextureDimension
int TextureDimension
Definition: vtkThresholdTextureCoords.h:128
vtkDataSetAlgorithm.h
vtkThresholdTextureCoords::New
static vtkThresholdTextureCoords * New()
vtkThresholdTextureCoords::LowerThreshold
double LowerThreshold
Definition: vtkThresholdTextureCoords.h:125
vtkThresholdTextureCoords::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
vtkThresholdTextureCoords::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkThresholdTextureCoords
compute 1D, 2D, or 3D texture coordinates based on scalar threshold
Definition: vtkThresholdTextureCoords.h:64