VTK
dox/Infovis/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 "vtkTableAlgorithm.h"
00039 #include "vtkVariant.h" // For vtkVariant arguments
00040 
00041 class VTK_INFOVIS_EXPORT vtkThresholdTable : public vtkTableAlgorithm
00042 {
00043 public:
00044   static vtkThresholdTable* New();
00045   vtkTypeMacro(vtkThresholdTable, vtkTableAlgorithm);
00046   void PrintSelf(ostream& os, vtkIndent indent);
00047 
00048   //BTX
00049   enum {
00050     ACCEPT_LESS_THAN = 0,
00051     ACCEPT_GREATER_THAN = 1,
00052     ACCEPT_BETWEEN = 2,
00053     ACCEPT_OUTSIDE = 3
00054     };
00055   //ETX
00056 
00058 
00063   vtkSetClampMacro(Mode, int, 0, 3);
00064   vtkGetMacro(Mode, int);
00066 
00068 
00070   virtual void SetMinValue(vtkVariant v)
00071     {
00072     this->MinValue = v;
00073     this->Modified();
00074     }
00075   virtual vtkVariant GetMinValue()
00076     {
00077     return this->MinValue;
00078     }
00080 
00082 
00084   virtual void SetMaxValue(vtkVariant v)
00085     {
00086     this->MaxValue = v;
00087     this->Modified();
00088     }
00089   virtual vtkVariant GetMaxValue()
00090     {
00091     return this->MaxValue;
00092     }
00094 
00097   void ThresholdBetween(vtkVariant lower, vtkVariant upper);
00098 
00100 
00101   void SetMinValue(double v)
00102   {
00103     this->SetMinValue(vtkVariant(v));
00104   }
00106 
00108 
00109   void SetMaxValue(double v)
00110   {
00111     this->SetMaxValue(vtkVariant(v));
00112   }
00114 
00116 
00118   void ThresholdBetween(double lower, double upper)
00119   {
00120     this->ThresholdBetween(vtkVariant(lower),vtkVariant(upper));
00121   }
00123 
00124 protected:
00125   vtkThresholdTable();
00126   ~vtkThresholdTable();
00127 
00128   int RequestData(
00129     vtkInformation*, 
00130     vtkInformationVector**, 
00131     vtkInformationVector*);
00132 
00133   vtkVariant MinValue;
00134   vtkVariant MaxValue;
00135   int Mode;
00136     
00137 private:
00138   vtkThresholdTable(const vtkThresholdTable&); // Not implemented
00139   void operator=(const vtkThresholdTable&);   // Not implemented
00140 };
00141 
00142 #endif
00143