Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkThresholdTextureCoords.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkThresholdTextureCoords.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 =========================================================================*/
00055 #ifndef __vtkThresholdTextureCoords_h
00056 #define __vtkThresholdTextureCoords_h
00057 
00058 #include "vtkDataSetToDataSetFilter.h"
00059 
00060 class VTK_GRAPHICS_EXPORT vtkThresholdTextureCoords : public vtkDataSetToDataSetFilter
00061 {
00062 public:
00063   static vtkThresholdTextureCoords *New();
00064   vtkTypeRevisionMacro(vtkThresholdTextureCoords,vtkDataSetToDataSetFilter);
00065   void PrintSelf(ostream& os, vtkIndent indent);
00066   
00068   void ThresholdByLower(double lower);
00069 
00071   void ThresholdByUpper(double upper);
00072 
00075   void ThresholdBetween(double lower, double upper);
00076 
00078 
00079   vtkGetMacro(UpperThreshold,double);
00080   vtkGetMacro(LowerThreshold,double);
00082 
00084 
00085   vtkSetClampMacro(TextureDimension,int,1,3);
00086   vtkGetMacro(TextureDimension,int);
00088 
00090 
00092   vtkSetVector3Macro(InTextureCoord,double);
00093   vtkGetVectorMacro(InTextureCoord,double,3);
00095 
00097 
00099   vtkSetVector3Macro(OutTextureCoord,double);
00100   vtkGetVectorMacro(OutTextureCoord,double,3);
00102 
00103 protected:
00104   vtkThresholdTextureCoords();
00105   ~vtkThresholdTextureCoords() {};
00106 
00107   // Usual data generation method
00108   void Execute();
00109 
00110   double LowerThreshold;
00111   double UpperThreshold;
00112 
00113   int TextureDimension;
00114 
00115   double InTextureCoord[3];
00116   double OutTextureCoord[3];
00117 
00118   //BTX
00119   int (vtkThresholdTextureCoords::*ThresholdFunction)(double s);
00120   //ETX
00121 
00122   int Lower(double s) {return ( s <= this->LowerThreshold ? 1 : 0 );};
00123   int Upper(double s) {return ( s >= this->UpperThreshold ? 1 : 0 );};
00124   int Between(double s) {return ( s >= this->LowerThreshold ? 
00125                                ( s <= this->UpperThreshold ? 1 : 0 ) : 0 );};
00126 private:
00127   vtkThresholdTextureCoords(const vtkThresholdTextureCoords&);  // Not implemented.
00128   void operator=(const vtkThresholdTextureCoords&);  // Not implemented.
00129 };
00130 
00131 #endif