VTK  9.2.5
vtkThresholdTable.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkThresholdTable.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=========================================================================*/
15/*-------------------------------------------------------------------------
16 Copyright 2008 Sandia Corporation.
17 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18 the U.S. Government retains certain rights in this software.
19-------------------------------------------------------------------------*/
33#ifndef vtkThresholdTable_h
34#define vtkThresholdTable_h
35
36#include "vtkInfovisCoreModule.h" // For export macro
37#include "vtkTableAlgorithm.h"
38#include "vtkVariant.h" // For vtkVariant arguments
39
40class VTKINFOVISCORE_EXPORT vtkThresholdTable : public vtkTableAlgorithm
41{
42public:
45 void PrintSelf(ostream& os, vtkIndent indent) override;
46
47 enum
48 {
49 ACCEPT_LESS_THAN = 0,
50 ACCEPT_GREATER_THAN = 1,
51 ACCEPT_BETWEEN = 2,
52 ACCEPT_OUTSIDE = 3
53 };
54
56
63 vtkSetClampMacro(Mode, int, 0, 3);
64 vtkGetMacro(Mode, int);
66
68
72 virtual void SetMinValue(vtkVariant v)
73 {
74 this->MinValue = v;
75 this->Modified();
76 }
77 virtual vtkVariant GetMinValue() { return this->MinValue; }
79
81
85 virtual void SetMaxValue(vtkVariant v)
86 {
87 this->MaxValue = v;
88 this->Modified();
89 }
90 virtual vtkVariant GetMaxValue() { return this->MaxValue; }
92
98
102 void SetMinValue(double v) { this->SetMinValue(vtkVariant(v)); }
103
107 void SetMaxValue(double v) { this->SetMaxValue(vtkVariant(v)); }
108
113 void ThresholdBetween(double lower, double upper)
114 {
115 this->ThresholdBetween(vtkVariant(lower), vtkVariant(upper));
116 }
117
118protected:
121
123
126 int Mode;
127
128private:
129 vtkThresholdTable(const vtkThresholdTable&) = delete;
130 void operator=(const vtkThresholdTable&) = delete;
131};
132
133#endif
a simple class to control print indentation
Definition: vtkIndent.h:40
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.
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.
static vtkThresholdTable * New()
~vtkThresholdTable() override
void ThresholdBetween(double lower, double upper)
Criterion is rows whose scalars are between lower and upper thresholds (inclusive of the end values).
void ThresholdBetween(vtkVariant lower, vtkVariant upper)
Criterion is rows whose scalars are between lower and upper thresholds (inclusive of the end values).
A atomic type representing the union of many types.
Definition: vtkVariant.h:70