Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | 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   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00047 #ifndef __vtkThresholdTextureCoords_h
00048 #define __vtkThresholdTextureCoords_h
00049 
00050 #include "vtkDataSetToDataSetFilter.h"
00051 
00052 class VTK_GRAPHICS_EXPORT vtkThresholdTextureCoords : public vtkDataSetToDataSetFilter
00053 {
00054 public:
00055   static vtkThresholdTextureCoords *New();
00056   vtkTypeRevisionMacro(vtkThresholdTextureCoords,vtkDataSetToDataSetFilter);
00057   void PrintSelf(ostream& os, vtkIndent indent);
00058   
00060   void ThresholdByLower(float lower);
00061 
00063   void ThresholdByUpper(float upper);
00064 
00067   void ThresholdBetween(float lower, float upper);
00068 
00070 
00071   vtkGetMacro(UpperThreshold,float);
00072   vtkGetMacro(LowerThreshold,float);
00074 
00076 
00077   vtkSetClampMacro(TextureDimension,int,1,3);
00078   vtkGetMacro(TextureDimension,int);
00080 
00082 
00084   vtkSetVector3Macro(InTextureCoord,float);
00085   vtkGetVectorMacro(InTextureCoord,float,3);
00087 
00089 
00091   vtkSetVector3Macro(OutTextureCoord,float);
00092   vtkGetVectorMacro(OutTextureCoord,float,3);
00094 
00095 protected:
00096   vtkThresholdTextureCoords();
00097   ~vtkThresholdTextureCoords() {};
00098 
00099   // Usual data generation method
00100   void Execute();
00101 
00102   float LowerThreshold;
00103   float UpperThreshold;
00104 
00105   int TextureDimension;
00106 
00107   float InTextureCoord[3];
00108   float OutTextureCoord[3];
00109 
00110   //BTX
00111   int (vtkThresholdTextureCoords::*ThresholdFunction)(float s);
00112   //ETX
00113 
00114   int Lower(float s) {return ( s <= this->LowerThreshold ? 1 : 0 );};
00115   int Upper(float s) {return ( s >= this->UpperThreshold ? 1 : 0 );};
00116   int Between(float s) {return ( s >= this->LowerThreshold ? 
00117                                ( s <= this->UpperThreshold ? 1 : 0 ) : 0 );};
00118 private:
00119   vtkThresholdTextureCoords(const vtkThresholdTextureCoords&);  // Not implemented.
00120   void operator=(const vtkThresholdTextureCoords&);  // Not implemented.
00121 };
00122 
00123 #endif