VTK
vtkThresholdPoints.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkThresholdPoints.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
32 #ifndef __vtkThresholdPoints_h
33 #define __vtkThresholdPoints_h
34 
35 #include "vtkPolyDataAlgorithm.h"
36 
38 {
39 public:
40  static vtkThresholdPoints *New();
42  void PrintSelf(ostream& os, vtkIndent indent);
43 
46  void ThresholdByLower(double lower);
47 
50  void ThresholdByUpper(double upper);
51 
54  void ThresholdBetween(double lower, double upper);
55 
57 
58  vtkSetMacro(UpperThreshold,double);
59  vtkGetMacro(UpperThreshold,double);
61 
63 
64  vtkSetMacro(LowerThreshold,double);
65  vtkGetMacro(LowerThreshold,double);
67 
68 protected:
71 
72  // Usual data generation method
74 
76 
79 
80  //BTX
81  int (vtkThresholdPoints::*ThresholdFunction)(double s);
82  //ETX
83 
84  int Lower(double s) {return ( s <= this->LowerThreshold ? 1 : 0 );};
85  int Upper(double s) {return ( s >= this->UpperThreshold ? 1 : 0 );};
86  int Between(double s) {return ( s >= this->LowerThreshold ?
87  ( s <= this->UpperThreshold ? 1 : 0 ) : 0 );};
88 private:
89  vtkThresholdPoints(const vtkThresholdPoints&); // Not implemented.
90  void operator=(const vtkThresholdPoints&); // Not implemented.
91 };
92 
93 #endif
#define VTK_GRAPHICS_EXPORT
virtual int FillInputPortInformation(int port, vtkInformation *info)
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:37
extracts points whose scalar value satisfies threshold criterion
Store zero or more vtkInformation instances.