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 
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:68
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:112
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:121
vtkThresholdTable::MinValue
vtkVariant MinValue
Definition: vtkThresholdTable.h:135
vtkThresholdTable::GetMaxValue
virtual vtkVariant GetMaxValue()
Definition: vtkThresholdTable.h:89
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:73
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkThresholdTable::Mode
int Mode
Definition: vtkThresholdTable.h:137
vtkThresholdTable::SetMinValue
void SetMinValue(double v)
The minimum value for the threshold as a double.
Definition: vtkThresholdTable.h:104
vtkTableAlgorithm.h
vtkThresholdTable::SetMaxValue
virtual void SetMaxValue(vtkVariant v)
The maximum value for the threshold.
Definition: vtkThresholdTable.h:84
vtkThresholdTable::MaxValue
vtkVariant MaxValue
Definition: vtkThresholdTable.h:136
vtkTableAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkTableAlgorithm::New
static vtkTableAlgorithm * New()