VTK
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  ACCEPT_LESS_THAN = 0,
46  ACCEPT_GREATER_THAN = 1,
47  ACCEPT_BETWEEN = 2,
48  ACCEPT_OUTSIDE = 3
49  };
50 
52 
59  vtkSetClampMacro(Mode, int, 0, 3);
60  vtkGetMacro(Mode, int);
62 
64 
68  virtual void SetMinValue(vtkVariant v)
69  {
70  this->MinValue = v;
71  this->Modified();
72  }
74  {
75  return this->MinValue;
76  }
78 
80 
84  virtual void SetMaxValue(vtkVariant v)
85  {
86  this->MaxValue = v;
87  this->Modified();
88  }
90  {
91  return this->MaxValue;
92  }
94 
99  void ThresholdBetween(vtkVariant lower, vtkVariant upper);
100 
104  void SetMinValue(double v)
105  {
106  this->SetMinValue(vtkVariant(v));
107  }
108 
112  void SetMaxValue(double v)
113  {
114  this->SetMaxValue(vtkVariant(v));
115  }
116 
121  void ThresholdBetween(double lower, double upper)
122  {
123  this->ThresholdBetween(vtkVariant(lower),vtkVariant(upper));
124  }
125 
126 protected:
128  ~vtkThresholdTable() override;
129 
130  int RequestData(
133  vtkInformationVector*) override;
134 
137  int Mode;
138 
139 private:
140  vtkThresholdTable(const vtkThresholdTable&) = delete;
141  void operator=(const vtkThresholdTable&) = delete;
142 };
143 
144 #endif
145 
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 atomic type representing the union of many types.
Definition: vtkVariant.h:65
void SetMaxValue(double v)
The maximum value for the threshold as a double.
a simple class to control print indentation
Definition: vtkIndent.h:33
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.