VTK
dox/Filters/Texture/vtkThresholdTextureCoords.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkThresholdTextureCoords.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 =========================================================================*/
00043 #ifndef __vtkThresholdTextureCoords_h
00044 #define __vtkThresholdTextureCoords_h
00045 
00046 #include "vtkFiltersTextureModule.h" // For export macro
00047 #include "vtkDataSetAlgorithm.h"
00048 
00049 class VTKFILTERSTEXTURE_EXPORT vtkThresholdTextureCoords : public vtkDataSetAlgorithm
00050 {
00051 public:
00052   static vtkThresholdTextureCoords *New();
00053   vtkTypeMacro(vtkThresholdTextureCoords,vtkDataSetAlgorithm);
00054   void PrintSelf(ostream& os, vtkIndent indent);
00055 
00057   void ThresholdByLower(double lower);
00058 
00060   void ThresholdByUpper(double upper);
00061 
00064   void ThresholdBetween(double lower, double upper);
00065 
00067 
00068   vtkGetMacro(UpperThreshold,double);
00069   vtkGetMacro(LowerThreshold,double);
00071 
00073 
00074   vtkSetClampMacro(TextureDimension,int,1,3);
00075   vtkGetMacro(TextureDimension,int);
00077 
00079 
00081   vtkSetVector3Macro(InTextureCoord,double);
00082   vtkGetVectorMacro(InTextureCoord,double,3);
00084 
00086 
00088   vtkSetVector3Macro(OutTextureCoord,double);
00089   vtkGetVectorMacro(OutTextureCoord,double,3);
00091 
00092 protected:
00093   vtkThresholdTextureCoords();
00094   ~vtkThresholdTextureCoords() {}
00095 
00096   // Usual data generation method
00097   int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00098 
00099   double LowerThreshold;
00100   double UpperThreshold;
00101 
00102   int TextureDimension;
00103 
00104   double InTextureCoord[3];
00105   double OutTextureCoord[3];
00106 
00107   //BTX
00108   int (vtkThresholdTextureCoords::*ThresholdFunction)(double s);
00109   //ETX
00110 
00111   int Lower(double s) {return ( s <= this->LowerThreshold ? 1 : 0 );};
00112   int Upper(double s) {return ( s >= this->UpperThreshold ? 1 : 0 );};
00113   int Between(double s) {return ( s >= this->LowerThreshold ?
00114                                ( s <= this->UpperThreshold ? 1 : 0 ) : 0 );};
00115 private:
00116   vtkThresholdTextureCoords(const vtkThresholdTextureCoords&);  // Not implemented.
00117   void operator=(const vtkThresholdTextureCoords&);  // Not implemented.
00118 };
00119 
00120 #endif