/*========================================================================= Program: Visualization Toolkit Module: vtkThresholdTextureCoords.h Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ /** * @class vtkThresholdTextureCoords * @brief compute 1D, 2D, or 3D texture coordinates based on scalar threshold * * vtkThresholdTextureCoords is a filter that generates texture coordinates for * any input dataset type given a threshold criterion. The criterion can take * three forms: 1) greater than a particular value (ThresholdByUpper()); * 2) less than a particular value (ThresholdByLower(); or 3) between two * values (ThresholdBetween(). If the threshold criterion is satisfied, * the "in" texture coordinate will be set (this can be specified by the * user). If the threshold criterion is not satisfied the "out" is set. * * @warning * There is a texture map - texThres.vtk - that can be used in conjunction * with this filter. This map defines a "transparent" region for texture * coordinates 0<=r<0.5, and an opaque full intensity map for texture * coordinates 0.5LowerThreshold ? 1 : 0); } int Upper(double s) { return (s >= this->UpperThreshold ? 1 : 0); } int Between(double s) { return (s >= this->LowerThreshold ? (s <= this->UpperThreshold ? 1 : 0) : 0); } private: vtkThresholdTextureCoords(const vtkThresholdTextureCoords&) = delete; void operator=(const vtkThresholdTextureCoords&) = delete; }; #endif