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 -------------------------------------------------------------------------*/
36 #ifndef vtkThresholdTable_h
37 #define vtkThresholdTable_h
38 
39 #include "vtkInfovisCoreModule.h" // For export macro
40 #include "vtkTableAlgorithm.h"
41 #include "vtkVariant.h" // For vtkVariant arguments
42 
43 class VTKINFOVISCORE_EXPORT vtkThresholdTable : public vtkTableAlgorithm
44 {
45 public:
46  static vtkThresholdTable* New();
48  void PrintSelf(ostream& os, vtkIndent indent);
49 
50  enum {
51  ACCEPT_LESS_THAN = 0,
52  ACCEPT_GREATER_THAN = 1,
53  ACCEPT_BETWEEN = 2,
54  ACCEPT_OUTSIDE = 3
55  };
56 
58 
65  vtkSetClampMacro(Mode, int, 0, 3);
66  vtkGetMacro(Mode, int);
68 
70 
74  virtual void SetMinValue(vtkVariant v)
75  {
76  this->MinValue = v;
77  this->Modified();
78  }
80  {
81  return this->MinValue;
82  }
84 
86 
90  virtual void SetMaxValue(vtkVariant v)
91  {
92  this->MaxValue = v;
93  this->Modified();
94  }
96  {
97  return this->MaxValue;
98  }
100 
105  void ThresholdBetween(vtkVariant lower, vtkVariant upper);
106 
110  void SetMinValue(double v)
111  {
112  this->SetMinValue(vtkVariant(v));
113  }
114 
118  void SetMaxValue(double v)
119  {
120  this->SetMaxValue(vtkVariant(v));
121  }
122 
127  void ThresholdBetween(double lower, double upper)
128  {
129  this->ThresholdBetween(vtkVariant(lower),vtkVariant(upper));
130  }
131 
132 protected:
135 
136  int RequestData(
140 
143  int Mode;
144 
145 private:
146  vtkThresholdTable(const vtkThresholdTable&) VTK_DELETE_FUNCTION;
147  void operator=(const vtkThresholdTable&) VTK_DELETE_FUNCTION;
148 };
149 
150 #endif
151 
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:75
void SetMaxValue(double v)
The maximum value for the threshold as a double.
a simple class to control print indentation
Definition: vtkIndent.h:39
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.