VTK  9.3.1
vtkThresholdTextureCoords.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
29 #ifndef vtkThresholdTextureCoords_h
30 #define vtkThresholdTextureCoords_h
31 
32 #include "vtkDataSetAlgorithm.h"
33 #include "vtkFiltersTextureModule.h" // For export macro
34 
35 VTK_ABI_NAMESPACE_BEGIN
36 class VTKFILTERSTEXTURE_EXPORT vtkThresholdTextureCoords : public vtkDataSetAlgorithm
37 {
38 public:
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
46  void ThresholdByLower(double lower);
47 
51  void ThresholdByUpper(double upper);
52 
56  void ThresholdBetween(double lower, double upper);
57 
59 
62  vtkGetMacro(UpperThreshold, double);
63  vtkGetMacro(LowerThreshold, double);
65 
67 
70  vtkSetClampMacro(TextureDimension, int, 1, 3);
71  vtkGetMacro(TextureDimension, int);
73 
75 
78  vtkSetVector3Macro(InTextureCoord, double);
79  vtkGetVectorMacro(InTextureCoord, double, 3);
81 
83 
87  vtkSetVector3Macro(OutTextureCoord, double);
88  vtkGetVectorMacro(OutTextureCoord, double, 3);
90 
91 protected:
93  ~vtkThresholdTextureCoords() override = default;
94 
95  // Usual data generation method
97 
100 
102 
103  double InTextureCoord[3];
104  double OutTextureCoord[3];
105 
106  int (vtkThresholdTextureCoords::*ThresholdFunction)(double s);
107 
108  int Lower(double s) { return (s <= this->LowerThreshold ? 1 : 0); }
109  int Upper(double s) { return (s >= this->UpperThreshold ? 1 : 0); }
110  int Between(double s)
111  {
112  return (s >= this->LowerThreshold ? (s <= this->UpperThreshold ? 1 : 0) : 0);
113  }
114 
115 private:
117  void operator=(const vtkThresholdTextureCoords&) = delete;
118 };
119 
120 VTK_ABI_NAMESPACE_END
121 #endif
Store vtkAlgorithm input/output information.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
Store zero or more vtkInformation instances.
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()