VTK  9.2.6
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 =========================================================================*/
41 #ifndef vtkThresholdTextureCoords_h
42 #define vtkThresholdTextureCoords_h
43 
44 #include "vtkDataSetAlgorithm.h"
45 #include "vtkFiltersTextureModule.h" // For export macro
46 
47 class VTKFILTERSTEXTURE_EXPORT vtkThresholdTextureCoords : public vtkDataSetAlgorithm
48 {
49 public:
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
57  void ThresholdByLower(double lower);
58 
62  void ThresholdByUpper(double upper);
63 
67  void ThresholdBetween(double lower, double upper);
68 
70 
73  vtkGetMacro(UpperThreshold, double);
74  vtkGetMacro(LowerThreshold, double);
76 
78 
81  vtkSetClampMacro(TextureDimension, int, 1, 3);
82  vtkGetMacro(TextureDimension, int);
84 
86 
89  vtkSetVector3Macro(InTextureCoord, double);
90  vtkGetVectorMacro(InTextureCoord, double, 3);
92 
94 
98  vtkSetVector3Macro(OutTextureCoord, double);
99  vtkGetVectorMacro(OutTextureCoord, double, 3);
101 
102 protected:
104  ~vtkThresholdTextureCoords() override = default;
105 
106  // Usual data generation method
108 
111 
113 
114  double InTextureCoord[3];
115  double OutTextureCoord[3];
116 
117  int (vtkThresholdTextureCoords::*ThresholdFunction)(double s);
118 
119  int Lower(double s) { return (s <= this->LowerThreshold ? 1 : 0); }
120  int Upper(double s) { return (s >= this->UpperThreshold ? 1 : 0); }
121  int Between(double s)
122  {
123  return (s >= this->LowerThreshold ? (s <= this->UpperThreshold ? 1 : 0) : 0);
124  }
125 
126 private:
128  void operator=(const vtkThresholdTextureCoords&) = delete;
129 };
130 
131 #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:39
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()