VTK  9.3.0
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
35VTK_ABI_NAMESPACE_BEGIN
36class VTKFILTERSTEXTURE_EXPORT vtkThresholdTextureCoords : public vtkDataSetAlgorithm
37{
38public:
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
91protected:
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
115private:
117 void operator=(const vtkThresholdTextureCoords&) = delete;
118};
119
120VTK_ABI_NAMESPACE_END
121#endif
Superclass for algorithms that produce output of the same type as input.
a simple class to control print indentation
Definition vtkIndent.h:29
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