Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Graphics/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 =========================================================================*/
    00059 #ifndef __vtkThresholdTextureCoords_h
    00060 #define __vtkThresholdTextureCoords_h
    00061
    00062 #include "vtkDataSetToDataSetFilter.h"
    00063
    00064 class VTK_GRAPHICS_EXPORT vtkThresholdTextureCoords : public vtkDataSetToDataSetFilter
    00065 {
    00066 public:
    00067   static vtkThresholdTextureCoords *New();
    00068   vtkTypeRevisionMacro(vtkThresholdTextureCoords,vtkDataSetToDataSetFilter);
    00069   void PrintSelf(ostream& os, vtkIndent indent);
    00070
    00072   void ThresholdByLower(float lower);
    00073
    00075   void ThresholdByUpper(float upper);
    00076
    00079   void ThresholdBetween(float lower, float upper);
    00080
    00082
    00083   vtkGetMacro(UpperThreshold,float);
    00084   vtkGetMacro(LowerThreshold,float);
    00086
    00088
    00089   vtkSetClampMacro(TextureDimension,int,1,3);
    00090   vtkGetMacro(TextureDimension,int);
    00092
    00094
    00096   vtkSetVector3Macro(InTextureCoord,float);
    00097   vtkGetVectorMacro(InTextureCoord,float,3);
    00099
    00101
    00103   vtkSetVector3Macro(OutTextureCoord,float);
    00104   vtkGetVectorMacro(OutTextureCoord,float,3);
    00106
    00107 protected:
    00108   vtkThresholdTextureCoords();
    00109   ~vtkThresholdTextureCoords() {};
    00110
    00111   // Usual data generation method
    00112   void Execute();
    00113
    00114   float LowerThreshold;
    00115   float UpperThreshold;
    00116
    00117   int TextureDimension;
    00118
    00119   float InTextureCoord[3];
    00120   float OutTextureCoord[3];
    00121
    00122   //BTX
    00123   int (vtkThresholdTextureCoords::*ThresholdFunction)(float s);
    00124   //ETX
    00125
    00126   int Lower(float s) {return ( s <= this->LowerThreshold ? 1 : 0 );};
    00127   int Upper(float s) {return ( s >= this->UpperThreshold ? 1 : 0 );};
    00128   int Between(float s) {return ( s >= this->LowerThreshold ?
    00129                                ( s <= this->UpperThreshold ? 1 : 0 ) : 0 );};
    00130 private:
    00131   vtkThresholdTextureCoords(const vtkThresholdTextureCoords&);  // Not implemented.
    00132   void operator=(const vtkThresholdTextureCoords&);  // Not implemented.
    00133 };
    00134
    00135 #endif