VTK: Infovis/Core/vtkThresholdTable.h Source File

| 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();
29 vtkTypeMacro(vtkThresholdTable, vtkTableAlgorithm);
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:
109 vtkThresholdTable();
110 ~vtkThresholdTable() override;
111
112 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
113
114 vtkVariant MinValue;
115 vtkVariant MaxValue;
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
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkObject::Modified
virtual void Modified()
Update the modification time for this object.
vtkTableAlgorithm
Superclass for algorithms that produce only vtkTables as output.
Definition: vtkTableAlgorithm.h:37
vtkThresholdTable
Thresholds table rows.
Definition: vtkThresholdTable.h:26
vtkThresholdTable::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkThresholdTable::GetMinValue
virtual vtkVariant GetMinValue()
The minimum value for the threshold.
Definition: vtkThresholdTable.h:62
vtkThresholdTable::SetMinValue
virtual void SetMinValue(vtkVariant v)
The minimum value for the threshold.
Definition: vtkThresholdTable.h:57
vtkThresholdTable::New
static vtkThresholdTable * New()
vtkThresholdTable::SetMaxValue
void SetMaxValue(double v)
The maximum value for the threshold as a double.
Definition: vtkThresholdTable.h:92
vtkThresholdTable::SetMinValue
void SetMinValue(double v)
The minimum value for the threshold as a double.
Definition: vtkThresholdTable.h:87
vtkThresholdTable::vtkThresholdTable
vtkThresholdTable()
vtkThresholdTable::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkThresholdTable::GetMaxValue
virtual vtkVariant GetMaxValue()
The maximum value for the threshold.
Definition: vtkThresholdTable.h:75
vtkThresholdTable::SetMaxValue
virtual void SetMaxValue(vtkVariant v)
The maximum value for the threshold.
Definition: vtkThresholdTable.h:70
vtkThresholdTable::~vtkThresholdTable
~vtkThresholdTable() override
vtkThresholdTable::ThresholdBetween
void ThresholdBetween(double lower, double upper)
Criterion is rows whose scalars are between lower and upper thresholds (inclusive of the end values).
Definition: vtkThresholdTable.h:98
vtkThresholdTable::IsValueAcceptable
bool IsValueAcceptable(vtkVariant value)
Return true if value, converted to double, matches the criteria of the current Mode.
vtkThresholdTable::MinValue
vtkVariant MinValue
Definition: vtkThresholdTable.h:114
vtkThresholdTable::MaxValue
vtkVariant MaxValue
Definition: vtkThresholdTable.h:115
vtkThresholdTable::ThresholdBetween
void ThresholdBetween(vtkVariant lower, vtkVariant upper)
Criterion is rows whose scalars are between lower and upper thresholds (inclusive of the end values).
vtkThresholdTable::Mode
int Mode
Definition: vtkThresholdTable.h:116
vtkVariant
A type representing the union of many types.
Definition: vtkVariant.h:62
vtkX3D::value
@ value
Definition: vtkX3D.h:220
vtkTableAlgorithm.h
vtkVariant.h