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
43class VTKINFOVISCORE_EXPORT vtkThresholdTable : public vtkTableAlgorithm
44{
45public:
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
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
132protected:
135
140
143 int Mode;
144
145private:
146 vtkThresholdTable(const vtkThresholdTable&) VTK_DELETE_FUNCTION;
147 void operator=(const vtkThresholdTable&) VTK_DELETE_FUNCTION;
148};
149
150#endif
151
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
virtual void Modified()
Update the modification time for this object.
Superclass for algorithms that produce only vtkTables as output.
Thresholds table rows.
virtual vtkVariant GetMinValue()
virtual void SetMinValue(vtkVariant v)
The minimum value for the threshold.
void SetMaxValue(double v)
The maximum value for the threshold as a double.
void SetMinValue(double v)
The minimum value for the threshold as a double.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual vtkVariant GetMaxValue()
virtual void SetMaxValue(vtkVariant v)
The maximum value for the threshold.
static vtkThresholdTable * New()
void ThresholdBetween(double lower, double upper)
Criterion is rows whose scalars are between lower and upper thresholds (inclusive of the end values).
void ThresholdBetween(vtkVariant lower, vtkVariant upper)
Criterion is rows whose scalars are between lower and upper thresholds (inclusive of the end values).
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
A atomic type representing the union of many types.
Definition: vtkVariant.h:76