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 =========================================================================*/
50 #ifndef vtkThresholdTextureCoords_h
51 #define vtkThresholdTextureCoords_h
52 
53 #include "vtkDataSetAlgorithm.h"
54 #include "vtkFiltersTextureModule.h" // For export macro
55 
56 class VTKFILTERSTEXTURE_EXPORT vtkThresholdTextureCoords : public vtkDataSetAlgorithm
57 {
58 public:
61  void PrintSelf(ostream& os, vtkIndent indent) override;
62 
66  void ThresholdByLower(double lower);
67 
71  void ThresholdByUpper(double upper);
72 
76  void ThresholdBetween(double lower, double upper);
77 
79 
82  vtkGetMacro(UpperThreshold, double);
83  vtkGetMacro(LowerThreshold, double);
85 
87 
90  vtkSetClampMacro(TextureDimension, int, 1, 3);
91  vtkGetMacro(TextureDimension, int);
93 
95 
98  vtkSetVector3Macro(InTextureCoord, double);
99  vtkGetVectorMacro(InTextureCoord, double, 3);
101 
103 
107  vtkSetVector3Macro(OutTextureCoord, double);
108  vtkGetVectorMacro(OutTextureCoord, double, 3);
110 
111 protected:
113  ~vtkThresholdTextureCoords() override = default;
114 
115  // Usual data generation method
117 
120 
122 
123  double InTextureCoord[3];
124  double OutTextureCoord[3];
125 
126  int (vtkThresholdTextureCoords::*ThresholdFunction)(double s);
127 
128  int Lower(double s) { return (s <= this->LowerThreshold ? 1 : 0); }
129  int Upper(double s) { return (s >= this->UpperThreshold ? 1 : 0); }
130  int Between(double s)
131  {
132  return (s >= this->LowerThreshold ? (s <= this->UpperThreshold ? 1 : 0) : 0);
133  }
134 
135 private:
137  void operator=(const vtkThresholdTextureCoords&) = delete;
138 };
139 
140 #endif
Superclass for algorithms that produce output of the same type as input.
a simple class to control print indentation
Definition: vtkIndent.h:49
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
compute 1D, 2D, or 3D texture coordinates based on scalar threshold
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ThresholdBetween(double lower, double upper)
Criterion is cells whose scalars are between lower and upper thresholds.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
static vtkThresholdTextureCoords * New()
void ThresholdByLower(double lower)
Criterion is cells whose scalars are less than lower threshold.
void ThresholdByUpper(double upper)
Criterion is cells whose scalars are less than upper threshold.
~vtkThresholdTextureCoords() override=default