VTK  9.1.0
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=========================================================================*/
47#ifndef vtkThresholdTextureCoords_h
48#define vtkThresholdTextureCoords_h
49
50#include "vtkDataSetAlgorithm.h"
51#include "vtkFiltersTextureModule.h" // For export macro
52
53class VTKFILTERSTEXTURE_EXPORT vtkThresholdTextureCoords : public vtkDataSetAlgorithm
54{
55public:
58 void PrintSelf(ostream& os, vtkIndent indent) override;
59
63 void ThresholdByLower(double lower);
64
68 void ThresholdByUpper(double upper);
69
73 void ThresholdBetween(double lower, double upper);
74
76
79 vtkGetMacro(UpperThreshold, double);
80 vtkGetMacro(LowerThreshold, double);
82
84
87 vtkSetClampMacro(TextureDimension, int, 1, 3);
88 vtkGetMacro(TextureDimension, int);
90
92
95 vtkSetVector3Macro(InTextureCoord, double);
96 vtkGetVectorMacro(InTextureCoord, double, 3);
98
100
104 vtkSetVector3Macro(OutTextureCoord, double);
105 vtkGetVectorMacro(OutTextureCoord, double, 3);
107
108protected:
110 ~vtkThresholdTextureCoords() override = default;
111
112 // Usual data generation method
114
117
119
120 double InTextureCoord[3];
121 double OutTextureCoord[3];
122
123 int (vtkThresholdTextureCoords::*ThresholdFunction)(double s);
124
125 int Lower(double s) { return (s <= this->LowerThreshold ? 1 : 0); }
126 int Upper(double s) { return (s >= this->UpperThreshold ? 1 : 0); }
127 int Between(double s)
128 {
129 return (s >= this->LowerThreshold ? (s <= this->UpperThreshold ? 1 : 0) : 0);
130 }
131
132private:
134 void operator=(const vtkThresholdTextureCoords&) = delete;
135};
136
137#endif
Superclass for algorithms that produce output of the same type as input.
a simple class to control print indentation
Definition: vtkIndent.h:43
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