VTK  9.3.1
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:
28  static vtkThresholdTable* New();
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 
82  void ThresholdBetween(vtkVariant lower, vtkVariant upper);
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 
106  bool IsValueAcceptable(vtkVariant value);
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
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Thresholds table rows.
static vtkTableAlgorithm * New()
Store vtkAlgorithm input/output information.
void ThresholdBetween(double lower, double 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:52
void SetMaxValue(double v)
The maximum value for the threshold as a double.
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual vtkVariant GetMaxValue()
The maximum value for the threshold.
virtual void Modified()
Update the modification time for this object.
virtual vtkVariant GetMinValue()
The minimum value for the threshold.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Superclass for algorithms that produce only vtkTables as output.
virtual void SetMaxValue(vtkVariant v)
The maximum value for the threshold.
Store zero or more vtkInformation instances.
void SetMinValue(double v)
The minimum value for the threshold as a double.
virtual void SetMinValue(vtkVariant v)
The minimum value for the threshold.