VTK  9.4.20241221
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
48#ifndef vtkThresholdTextureCoords_h
49#define vtkThresholdTextureCoords_h
50
51#include "vtkDataSetAlgorithm.h"
52#include "vtkFiltersTextureModule.h" // For export macro
53
54VTK_ABI_NAMESPACE_BEGIN
55class VTKFILTERSTEXTURE_EXPORT vtkThresholdTextureCoords : public vtkDataSetAlgorithm
56{
57public:
60 void PrintSelf(ostream& os, vtkIndent indent) override;
61
65 void ThresholdByLower(double lower);
66
70 void ThresholdByUpper(double upper);
71
75 void ThresholdBetween(double lower, double upper);
76
78
81 vtkGetMacro(UpperThreshold, double);
82 vtkGetMacro(LowerThreshold, double);
84
86
89 vtkSetClampMacro(TextureDimension, int, 1, 3);
90 vtkGetMacro(TextureDimension, int);
92
94
97 vtkSetVector3Macro(InTextureCoord, double);
98 vtkGetVectorMacro(InTextureCoord, double, 3);
100
102
106 vtkSetVector3Macro(OutTextureCoord, double);
107 vtkGetVectorMacro(OutTextureCoord, double, 3);
109
110protected:
112 ~vtkThresholdTextureCoords() override = default;
113
114 // Usual data generation method
116
119
121
122 double InTextureCoord[3];
123 double OutTextureCoord[3];
124
125 int (vtkThresholdTextureCoords::*ThresholdFunction)(double s);
126
127 int Lower(double s) { return (s <= this->LowerThreshold ? 1 : 0); }
128 int Upper(double s) { return (s >= this->UpperThreshold ? 1 : 0); }
129 int Between(double s)
130 {
131 return (s >= this->LowerThreshold ? (s <= this->UpperThreshold ? 1 : 0) : 0);
132 }
133
134private:
136 void operator=(const vtkThresholdTextureCoords&) = delete;
137};
138
139VTK_ABI_NAMESPACE_END
140#endif
Superclass for algorithms that produce output of the same type as input.
a simple class to control print indentation
Definition vtkIndent.h:108
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.
static vtkThresholdTextureCoords * New()
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
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