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 =========================================================================*/
33 #ifndef vtkThresholdPoints_h
34 #define vtkThresholdPoints_h
35 
36 #include "vtkFiltersCoreModule.h" // For export macro
37 #include "vtkPolyDataAlgorithm.h"
38 
39 class VTKFILTERSCORE_EXPORT vtkThresholdPoints : public vtkPolyDataAlgorithm
40 {
41 public:
44  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
45 
49  void ThresholdByLower(double lower);
50 
54  void ThresholdByUpper(double upper);
55 
60  void ThresholdBetween(double lower, double upper);
61 
63 
66  vtkSetMacro(UpperThreshold,double);
67  vtkGetMacro(UpperThreshold,double);
69 
71 
74  vtkSetMacro(LowerThreshold,double);
75  vtkGetMacro(LowerThreshold,double);
77 
79 
84  vtkSetMacro(OutputPointsPrecision,int);
85  vtkGetMacro(OutputPointsPrecision,int);
87 
88 protected:
90  ~vtkThresholdPoints() VTK_OVERRIDE {}
91 
92  // Usual data generation method
94 
96 
100 
101  int (vtkThresholdPoints::*ThresholdFunction)(double s);
102 
103  int Lower(double s) {return ( s <= this->LowerThreshold ? 1 : 0 );};
104  int Upper(double s) {return ( s >= this->UpperThreshold ? 1 : 0 );};
105  int Between(double s) {return ( s >= this->LowerThreshold ?
106  ( s <= this->UpperThreshold ? 1 : 0 ) : 0 );};
107 private:
108  vtkThresholdPoints(const vtkThresholdPoints&) VTK_DELETE_FUNCTION;
109  void operator=(const vtkThresholdPoints&) VTK_DELETE_FUNCTION;
110 };
111 
112 #endif
vtkThresholdPoints::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkThresholdPoints.h:99
vtkThresholdPoints::New
static vtkThresholdPoints * New()
vtkThresholdPoints::~vtkThresholdPoints
~vtkThresholdPoints() override
Definition: vtkThresholdPoints.h:90
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkThresholdPoints::vtkThresholdPoints
vtkThresholdPoints()
vtkThresholdPoints::Lower
int Lower(double s)
Definition: vtkThresholdPoints.h:103
vtkThresholdPoints::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkThresholdPoints::Between
int Between(double s)
Definition: vtkThresholdPoints.h:105
vtkPolyDataAlgorithm.h
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkThresholdPoints::UpperThreshold
double UpperThreshold
Definition: vtkThresholdPoints.h:98
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkThresholdPoints::ThresholdByLower
void ThresholdByLower(double lower)
Criterion is cells whose scalars are less or equal to lower threshold.
vtkThresholdPoints
extracts points whose scalar value satisfies threshold criterion
Definition: vtkThresholdPoints.h:40
vtkThresholdPoints::LowerThreshold
double LowerThreshold
Definition: vtkThresholdPoints.h:97
vtkThresholdPoints::Upper
int Upper(double s)
Definition: vtkThresholdPoints.h:104
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkThresholdPoints::ThresholdByUpper
void ThresholdByUpper(double upper)
Criterion is cells whose scalars are greater or equal to upper threshold.
vtkThresholdPoints::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkThresholdPoints::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int
int
Definition: vtkVectorOperators.h:164
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:45
vtkThresholdPoints::ThresholdBetween
void ThresholdBetween(double lower, double upper)
Criterion is cells whose scalars are between lower and upper thresholds (inclusive of the end values)...