VTK  9.0.1
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:
40  static vtkThresholdTable* New();
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 
94  void ThresholdBetween(vtkVariant lower, vtkVariant upper);
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
vtkVariant.h
vtkTableAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkThresholdTable::SetMinValue
virtual void SetMinValue(vtkVariant v)
The minimum value for the threshold.
Definition: vtkThresholdTable.h:69
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkObject::Modified
virtual void Modified()
Update the modification time for this object.
vtkThresholdTable
Thresholds table rows.
Definition: vtkThresholdTable.h:37
vtkThresholdTable::SetMaxValue
void SetMaxValue(double v)
The maximum value for the threshold as a double.
Definition: vtkThresholdTable.h:104
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:110
vtkThresholdTable::MinValue
vtkVariant MinValue
Definition: vtkThresholdTable.h:121
vtkThresholdTable::GetMaxValue
virtual vtkVariant GetMaxValue()
Definition: vtkThresholdTable.h:87
vtkTableAlgorithm
Superclass for algorithms that produce only vtkTables as output.
Definition: vtkTableAlgorithm.h:48
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkVariant
A atomic type representing the union of many types.
Definition: vtkVariant.h:65
vtkThresholdTable::GetMinValue
virtual vtkVariant GetMinValue()
Definition: vtkThresholdTable.h:74
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkThresholdTable::Mode
int Mode
Definition: vtkThresholdTable.h:123
vtkThresholdTable::SetMinValue
void SetMinValue(double v)
The minimum value for the threshold as a double.
Definition: vtkThresholdTable.h:99
vtkTableAlgorithm.h
vtkThresholdTable::SetMaxValue
virtual void SetMaxValue(vtkVariant v)
The maximum value for the threshold.
Definition: vtkThresholdTable.h:82
vtkThresholdTable::MaxValue
vtkVariant MaxValue
Definition: vtkThresholdTable.h:122
vtkTableAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkTableAlgorithm::New
static vtkTableAlgorithm * New()