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) override;
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:
134  ~vtkThresholdTable() override;
135 
136  int RequestData(
139  vtkInformationVector*) override;
140 
143  int Mode;
144 
145 private:
146  vtkThresholdTable(const vtkThresholdTable&) = delete;
147  void operator=(const vtkThresholdTable&) = delete;
148 };
149 
150 #endif
151 
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:74
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkObject::Modified
virtual void Modified()
Update the modification time for this object.
vtkThresholdTable
Thresholds table rows.
Definition: vtkThresholdTable.h:43
vtkThresholdTable::SetMaxValue
void SetMaxValue(double v)
The maximum value for the threshold as a double.
Definition: vtkThresholdTable.h:118
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:127
vtkThresholdTable::MinValue
vtkVariant MinValue
Definition: vtkThresholdTable.h:141
vtkThresholdTable::GetMaxValue
virtual vtkVariant GetMaxValue()
Definition: vtkThresholdTable.h:95
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:39
vtkVariant
A atomic type representing the union of many types.
Definition: vtkVariant.h:71
vtkThresholdTable::GetMinValue
virtual vtkVariant GetMinValue()
Definition: vtkThresholdTable.h:79
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkThresholdTable::Mode
int Mode
Definition: vtkThresholdTable.h:143
vtkThresholdTable::SetMinValue
void SetMinValue(double v)
The minimum value for the threshold as a double.
Definition: vtkThresholdTable.h:110
vtkTableAlgorithm.h
vtkThresholdTable::SetMaxValue
virtual void SetMaxValue(vtkVariant v)
The maximum value for the threshold.
Definition: vtkThresholdTable.h:90
vtkThresholdTable::MaxValue
vtkVariant MaxValue
Definition: vtkThresholdTable.h:142
vtkTableAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkTableAlgorithm::New
static vtkTableAlgorithm * New()