VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkThresholdTable.h,v $ 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 -------------------------------------------------------------------------*/ 00032 #ifndef __vtkThresholdTable_h 00033 #define __vtkThresholdTable_h 00034 00035 #include "vtkTableAlgorithm.h" 00036 #include "vtkVariant.h" // For vtkVariant arguments 00037 00038 class VTK_INFOVIS_EXPORT vtkThresholdTable : public vtkTableAlgorithm 00039 { 00040 public: 00041 static vtkThresholdTable* New(); 00042 vtkTypeRevisionMacro(vtkThresholdTable, vtkTableAlgorithm); 00043 void PrintSelf(ostream& os, vtkIndent indent); 00044 00045 //BTX 00046 enum { 00047 ACCEPT_LESS_THAN = 0, 00048 ACCEPT_GREATER_THAN = 1, 00049 ACCEPT_BETWEEN = 2, 00050 ACCEPT_OUTSIDE = 3 00051 }; 00052 //ETX 00053 00055 00060 vtkSetClampMacro(Mode, int, 0, 3); 00061 vtkGetMacro(Mode, int); 00063 00064 //BTX 00066 00068 virtual void SetMinValue(vtkVariant v) 00069 { 00070 this->MinValue = v; 00071 this->Modified(); 00072 } 00073 virtual vtkVariant GetMinValue() 00074 { 00075 return this->MinValue; 00076 } 00078 00080 00082 virtual void SetMaxValue(vtkVariant v) 00083 { 00084 this->MaxValue = v; 00085 this->Modified(); 00086 } 00087 virtual vtkVariant GetMaxValue() 00088 { 00089 return this->MaxValue; 00090 } 00092 00095 void ThresholdBetween(vtkVariant lower, vtkVariant upper); 00096 00097 //ETX 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