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 -------------------------------------------------------------------------*/
35 #ifndef __vtkThresholdTable_h
36 #define __vtkThresholdTable_h
37 
38 #include "vtkTableAlgorithm.h"
39 #include "vtkVariant.h" // For vtkVariant arguments
40 
42 {
43 public:
44  static vtkThresholdTable* New();
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
48  //BTX
49  enum {
50  ACCEPT_LESS_THAN = 0,
51  ACCEPT_GREATER_THAN = 1,
52  ACCEPT_BETWEEN = 2,
53  ACCEPT_OUTSIDE = 3
54  };
55  //ETX
56 
58 
63  vtkSetClampMacro(Mode, int, 0, 3);
64  vtkGetMacro(Mode, int);
66 
68 
70  virtual void SetMinValue(vtkVariant v)
71  {
72  this->MinValue = v;
73  this->Modified();
74  }
75  virtual vtkVariant GetMinValue()
76  {
77  return this->MinValue;
78  }
80 
82 
84  virtual void SetMaxValue(vtkVariant v)
85  {
86  this->MaxValue = v;
87  this->Modified();
88  }
89  virtual vtkVariant GetMaxValue()
90  {
91  return this->MaxValue;
92  }
94 
97  void ThresholdBetween(vtkVariant lower, vtkVariant upper);
98 
100 
101  void SetMinValue(double v)
102  {
103  this->SetMinValue(vtkVariant(v));
104  }
106 
108 
109  void SetMaxValue(double v)
110  {
111  this->SetMaxValue(vtkVariant(v));
112  }
114 
116 
118  void ThresholdBetween(double lower, double upper)
119  {
120  this->ThresholdBetween(vtkVariant(lower),vtkVariant(upper));
121  }
123 
124 protected:
127 
128  int RequestData(
129  vtkInformation*,
132 
135  int Mode;
136 
137 private:
138  vtkThresholdTable(const vtkThresholdTable&); // Not implemented
139  void operator=(const vtkThresholdTable&); // Not implemented
140 };
141 
142 #endif
143