VTK  9.0.2
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 -------------------------------------------------------------------------*/
30 #ifndef vtkThresholdTable_h
31 #define vtkThresholdTable_h
32 
33 #include "vtkInfovisCoreModule.h" // For export macro
34 #include "vtkTableAlgorithm.h"
35 #include "vtkVariant.h" // For vtkVariant arguments
36 
37 class VTKINFOVISCORE_EXPORT vtkThresholdTable : public vtkTableAlgorithm
38 {
39 public:
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
44  enum
45  {
46  ACCEPT_LESS_THAN = 0,
47  ACCEPT_GREATER_THAN = 1,
48  ACCEPT_BETWEEN = 2,
49  ACCEPT_OUTSIDE = 3
50  };
51 
53 
60  vtkSetClampMacro(Mode, int, 0, 3);
61  vtkGetMacro(Mode, int);
63 
65 
69  virtual void SetMinValue(vtkVariant v)
70  {
71  this->MinValue = v;
72  this->Modified();
73  }
74  virtual vtkVariant GetMinValue() { return this->MinValue; }
76 
78 
82  virtual void SetMaxValue(vtkVariant v)
83  {
84  this->MaxValue = v;
85  this->Modified();
86  }
87  virtual vtkVariant GetMaxValue() { return this->MaxValue; }
89 
95 
99  void SetMinValue(double v) { this->SetMinValue(vtkVariant(v)); }
100 
104  void SetMaxValue(double v) { this->SetMaxValue(vtkVariant(v)); }
105 
110  void ThresholdBetween(double lower, double upper)
111  {
112  this->ThresholdBetween(vtkVariant(lower), vtkVariant(upper));
113  }
114 
115 protected:
117  ~vtkThresholdTable() override;
118 
120 
123  int Mode;
124 
125 private:
126  vtkThresholdTable(const vtkThresholdTable&) = delete;
127  void operator=(const vtkThresholdTable&) = delete;
128 };
129 
130 #endif
a simple class to control print indentation
Definition: vtkIndent.h:34
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()
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()
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).
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:66