VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Infovis/Core/vtkThresholdTable.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkThresholdTable.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 /*-------------------------------------------------------------------------
00016   Copyright 2008 Sandia Corporation.
00017   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00018   the U.S. Government retains certain rights in this software.
00019 -------------------------------------------------------------------------*/
00035 #ifndef vtkThresholdTable_h
00036 #define vtkThresholdTable_h
00037 
00038 #include "vtkInfovisCoreModule.h" // For export macro
00039 #include "vtkTableAlgorithm.h"
00040 #include "vtkVariant.h" // For vtkVariant arguments
00041 
00042 class VTKINFOVISCORE_EXPORT vtkThresholdTable : public vtkTableAlgorithm
00043 {
00044 public:
00045   static vtkThresholdTable* New();
00046   vtkTypeMacro(vtkThresholdTable, vtkTableAlgorithm);
00047   void PrintSelf(ostream& os, vtkIndent indent);
00048 
00049   //BTX
00050   enum {
00051     ACCEPT_LESS_THAN = 0,
00052     ACCEPT_GREATER_THAN = 1,
00053     ACCEPT_BETWEEN = 2,
00054     ACCEPT_OUTSIDE = 3
00055     };
00056   //ETX
00057 
00059 
00064   vtkSetClampMacro(Mode, int, 0, 3);
00065   vtkGetMacro(Mode, int);
00067 
00069 
00071   virtual void SetMinValue(vtkVariant v)
00072     {
00073     this->MinValue = v;
00074     this->Modified();
00075     }
00076   virtual vtkVariant GetMinValue()
00077     {
00078     return this->MinValue;
00079     }
00081 
00083 
00085   virtual void SetMaxValue(vtkVariant v)
00086     {
00087     this->MaxValue = v;
00088     this->Modified();
00089     }
00090   virtual vtkVariant GetMaxValue()
00091     {
00092     return this->MaxValue;
00093     }
00095 
00098   void ThresholdBetween(vtkVariant lower, vtkVariant upper);
00099 
00101 
00102   void SetMinValue(double v)
00103   {
00104     this->SetMinValue(vtkVariant(v));
00105   }
00107 
00109 
00110   void SetMaxValue(double v)
00111   {
00112     this->SetMaxValue(vtkVariant(v));
00113   }
00115 
00117 
00119   void ThresholdBetween(double lower, double upper)
00120   {
00121     this->ThresholdBetween(vtkVariant(lower),vtkVariant(upper));
00122   }
00124 
00125 protected:
00126   vtkThresholdTable();
00127   ~vtkThresholdTable();
00128 
00129   int RequestData(
00130     vtkInformation*,
00131     vtkInformationVector**,
00132     vtkInformationVector*);
00133 
00134   vtkVariant MinValue;
00135   vtkVariant MaxValue;
00136   int Mode;
00137 
00138 private:
00139   vtkThresholdTable(const vtkThresholdTable&); // Not implemented
00140   void operator=(const vtkThresholdTable&);   // Not implemented
00141 };
00142 
00143 #endif
00144