42 #ifndef __vtkThreshold_h
43 #define __vtkThreshold_h
45 #include "vtkFiltersCoreModule.h"
46 #include "vtkUnstructuredGridAlgorithm.h"
48 #define VTK_ATTRIBUTE_MODE_DEFAULT 0
49 #define VTK_ATTRIBUTE_MODE_USE_POINT_DATA 1
50 #define VTK_ATTRIBUTE_MODE_USE_CELL_DATA 2
53 #define VTK_COMPONENT_MODE_USE_SELECTED 0
54 #define VTK_COMPONENT_MODE_USE_ALL 1
55 #define VTK_COMPONENT_MODE_USE_ANY 2
60 class VTKFILTERSCORE_EXPORT
vtkThreshold :
public vtkUnstructuredGridAlgorithm
65 void PrintSelf(ostream& os, vtkIndent indent);
69 void ThresholdByLower(
double lower);
73 void ThresholdByUpper(
double upper);
77 void ThresholdBetween(
double lower,
double upper);
81 vtkGetMacro(UpperThreshold,
double);
82 vtkGetMacro(LowerThreshold,
double);
92 vtkSetMacro(AttributeMode,
int);
93 vtkGetMacro(AttributeMode,
int);
100 const char *GetAttributeModeAsString();
110 vtkSetClampMacro(ComponentMode,
int,
113 vtkGetMacro(ComponentMode,
int);
120 const char *GetComponentModeAsString();
126 vtkSetClampMacro(SelectedComponent,
int,0,VTK_INT_MAX);
127 vtkGetMacro(SelectedComponent,
int);
135 vtkSetMacro(AllScalars,
int);
136 vtkGetMacro(AllScalars,
int);
137 vtkBooleanMacro(AllScalars,
int);
147 vtkSetMacro(UseContinuousCellRange,
int);
148 vtkGetMacro(UseContinuousCellRange,
int);
149 vtkBooleanMacro(UseContinuousCellRange,
int);
159 void SetPointsDataType(
int type);
160 int GetPointsDataType();
167 void SetOutputPointsPrecision(
int precision);
168 int GetOutputPointsPrecision()
const;
171 virtual int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
178 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
180 virtual int FillInputPortInformation(
int port, vtkInformation *info);
196 int Lower(
double s) {
return ( s <= this->LowerThreshold ? 1 : 0 );};
197 int Upper(
double s) {
return ( s >= this->UpperThreshold ? 1 : 0 );};
198 int Between(
double s) {
return ( s >= this->LowerThreshold ?
199 ( s <= this->UpperThreshold ? 1 : 0 ) : 0 );};
201 int EvaluateComponents( vtkDataArray *scalars, vtkIdType
id );
202 int EvaluateCell( vtkDataArray *scalars, vtkIdList* cellPts,
int numCellPts );
203 int EvaluateCell( vtkDataArray *scalars,
int c, vtkIdList* cellPts,
int numCellPts );
#define VTK_ATTRIBUTE_MODE_USE_CELL_DATA
#define VTK_ATTRIBUTE_MODE_USE_POINT_DATA
void SetPointsDataTypeToDouble()
void SetAttributeModeToUseCellData()
extracts cells where scalar value in cell satisfies threshold criterion
void SetAttributeModeToUsePointData()
void SetPointsDataTypeToFloat()
#define VTK_COMPONENT_MODE_USE_SELECTED
#define VTK_COMPONENT_MODE_USE_ALL
#define VTK_ATTRIBUTE_MODE_DEFAULT
void SetComponentModeToUseSelected()
void SetComponentModeToUseAll()
#define VTK_COMPONENT_MODE_USE_ANY
int UseContinuousCellRange
void SetAttributeModeToDefault()
int OutputPointsPrecision
void SetComponentModeToUseAny()