VTK  9.3.20240329
vtkThresholdTable.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
17 #ifndef vtkThresholdTable_h
18 #define vtkThresholdTable_h
19 
20 #include "vtkInfovisCoreModule.h" // For export macro
21 #include "vtkTableAlgorithm.h"
22 #include "vtkVariant.h" // For vtkVariant arguments
23 
24 VTK_ABI_NAMESPACE_BEGIN
25 class VTKINFOVISCORE_EXPORT vtkThresholdTable : public vtkTableAlgorithm
26 {
27 public:
30  void PrintSelf(ostream& os, vtkIndent indent) override;
31 
32  enum
33  {
34  ACCEPT_LESS_THAN = 0,
35  ACCEPT_GREATER_THAN = 1,
36  ACCEPT_BETWEEN = 2,
37  ACCEPT_OUTSIDE = 3
38  };
39 
41 
48  vtkSetClampMacro(Mode, int, 0, 3);
49  vtkGetMacro(Mode, int);
51 
53 
57  virtual void SetMinValue(vtkVariant v)
58  {
59  this->MinValue = v;
60  this->Modified();
61  }
62  virtual vtkVariant GetMinValue() { return this->MinValue; }
64 
66 
70  virtual void SetMaxValue(vtkVariant v)
71  {
72  this->MaxValue = v;
73  this->Modified();
74  }
75  virtual vtkVariant GetMaxValue() { return this->MaxValue; }
77 
83 
87  void SetMinValue(double v) { this->SetMinValue(vtkVariant(v)); }
88 
92  void SetMaxValue(double v) { this->SetMaxValue(vtkVariant(v)); }
93 
98  void ThresholdBetween(double lower, double upper)
99  {
100  this->ThresholdBetween(vtkVariant(lower), vtkVariant(upper));
101  }
102 
107 
108 protected:
110  ~vtkThresholdTable() override;
111 
113 
116  int Mode;
117 
118 private:
119  vtkThresholdTable(const vtkThresholdTable&) = delete;
120  void operator=(const vtkThresholdTable&) = delete;
121 };
122 
123 VTK_ABI_NAMESPACE_END
124 #endif
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
virtual void Modified()
Update the modification time for this object.
Superclass for algorithms that produce only vtkTables as output.
Thresholds table rows.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual vtkVariant GetMinValue()
The minimum value for the threshold.
virtual void SetMinValue(vtkVariant v)
The minimum value for the threshold.
static vtkThresholdTable * New()
void SetMaxValue(double v)
The maximum value for the threshold as a double.
void SetMinValue(double v)
The minimum value for the threshold as a double.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
virtual vtkVariant GetMaxValue()
The maximum value for the threshold.
virtual void SetMaxValue(vtkVariant v)
The maximum value for the threshold.
~vtkThresholdTable() override
void ThresholdBetween(double lower, double upper)
Criterion is rows whose scalars are between lower and upper thresholds (inclusive of the end values).
bool IsValueAcceptable(vtkVariant value)
Return true if value, converted to double, matches the criteria of the current Mode.
void ThresholdBetween(vtkVariant lower, vtkVariant upper)
Criterion is rows whose scalars are between lower and upper thresholds (inclusive of the end values).
A type representing the union of many types.
Definition: vtkVariant.h:162
@ value
Definition: vtkX3D.h:220