VTK
vtkBivariateLinearTableThreshold.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 Module: vtkBivariateLinearTableThreshold.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 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2009 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
39 #ifndef vtkBivariateLinearTableThreshold__h
40 #define vtkBivariateLinearTableThreshold__h
41 
42 #include "vtkFiltersStatisticsModule.h" // For export macro
43 #include "vtkTableAlgorithm.h"
44 #include "vtkSmartPointer.h" //Required for smart pointer internal ivars
45 
47 class vtkDoubleArray;
48 class vtkIdTypeArray;
49 class vtkTable;
50 
52 {
53 public:
56  void PrintSelf(ostream& os, vtkIndent indent);
57 
59 
61  vtkSetMacro(Inclusive,int);
62  vtkGetMacro(Inclusive,int);
64 
68 
71 
75 
78 
80  vtkIdTypeArray* GetSelectedRowIds(int selection=0);
81 
82  //BTX
84  {
85  OUTPUT_ROW_IDS=0,
86  OUTPUT_ROW_DATA
87  };
89  {
90  BLT_ABOVE=0,
93  BLT_BETWEEN
94  };
95  //ETX
96 
98  void Initialize();
99 
101  void AddLineEquation(double* p1, double* p2);
102 
104  void AddLineEquation(double* p, double slope);
105 
107  void AddLineEquation(double a, double b, double c);
108 
111 
113 
124 
126 
129  vtkSetVector2Macro(ColumnRanges,double);
130  vtkGetVector2Macro(ColumnRanges,double);
132 
134 
136  vtkSetMacro(DistanceThreshold,double);
137  vtkGetMacro(DistanceThreshold,double);
139 
141 
147  vtkSetMacro(UseNormalizedDistance,int);
148  vtkGetMacro(UseNormalizedDistance,int);
149  vtkBooleanMacro(UseNormalizedDistance,int);
151 
153  static void ComputeImplicitLineFunction(double* p1, double* p2, double* abc);
154 
156  static void ComputeImplicitLineFunction(double* p, double slope, double* abc);
157 
158 protected:
161 
162  double ColumnRanges[2];
168 
169  //BTX
171  class Internals;
172  Internals* Implementation;
173  //ETX
174 
175  virtual int RequestData(
179 
182 
185  virtual int ApplyThreshold(vtkTable* tableToThreshold, vtkIdTypeArray* acceptedIds);
186 
188  int ThresholdAbove(double x, double y);
189 
191  int ThresholdBelow(double x, double y);
192 
194  int ThresholdNear(double x, double y);
195 
197 
198  int ThresholdBetween(double x, double y);
199 private:
201  void operator=(const vtkBivariateLinearTableThreshold&); // Not implemented
202 };
204 
205 #endif
vtkBivariateLinearTableThreshold::AddLineEquation
void AddLineEquation(double *p1, double *p2)
vtkSetVector2Macro
#define vtkSetVector2Macro(name, type)
Definition: vtkSetGet.h:254
vtkBivariateLinearTableThreshold::SetLinearThresholdTypeToBelow
void SetLinearThresholdTypeToBelow()
Definition: vtkBivariateLinearTableThreshold.h:120
vtkgl::b
GLboolean GLboolean GLboolean b
Definition: vtkgl.h:12312
vtkX3D::component
@ component
Definition: vtkX3D.h:175
vtkFiltersStatisticsModule.h
vtkGetVector2Macro
#define vtkGetVector2Macro(name, type)
Definition: vtkSetGet.h:270
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkBivariateLinearTableThreshold::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
vtkDataArrayCollection
maintain an unordered list of dataarray objects
Definition: vtkDataArrayCollection.h:31
vtkBivariateLinearTableThreshold::LineEquations
vtkSmartPointer< vtkDoubleArray > LineEquations
Definition: vtkBivariateLinearTableThreshold.h:170
vtkBivariateLinearTableThreshold::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkBivariateLinearTableThreshold::GetNumberOfColumnsToThreshold
int GetNumberOfColumnsToThreshold()
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkSmartPointer< vtkDoubleArray >
vtkBivariateLinearTableThreshold::LinearThresholdType
int LinearThresholdType
Definition: vtkBivariateLinearTableThreshold.h:165
vtkgl::x
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
vtkBivariateLinearTableThreshold::ComputeImplicitLineFunction
static void ComputeImplicitLineFunction(double *p1, double *p2, double *abc)
vtkBivariateLinearTableThreshold::GetColumnToThreshold
void GetColumnToThreshold(vtkIdType idx, vtkIdType &column, vtkIdType &component)
vtkBivariateLinearTableThreshold::ThresholdBelow
int ThresholdBelow(double x, double y)
vtkBivariateLinearTableThreshold::SetLinearThresholdTypeToNear
void SetLinearThresholdTypeToNear()
Definition: vtkBivariateLinearTableThreshold.h:121
vtkBivariateLinearTableThreshold::~vtkBivariateLinearTableThreshold
virtual ~vtkBivariateLinearTableThreshold()
vtkBivariateLinearTableThreshold::ThresholdNear
int ThresholdNear(double x, double y)
vtkBivariateLinearTableThreshold::BLT_BETWEEN
@ BLT_BETWEEN
Definition: vtkBivariateLinearTableThreshold.h:93
vtkBivariateLinearTableThreshold::NumberOfLineEquations
int NumberOfLineEquations
Definition: vtkBivariateLinearTableThreshold.h:166
vtkBivariateLinearTableThreshold::SetLinearThresholdTypeToBetween
void SetLinearThresholdTypeToBetween()
Definition: vtkBivariateLinearTableThreshold.h:122
vtkBivariateLinearTableThreshold::vtkBivariateLinearTableThreshold
vtkBivariateLinearTableThreshold()
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkBivariateLinearTableThreshold::AddLineEquation
void AddLineEquation(double *p, double slope)
vtkBivariateLinearTableThreshold::FillOutputPortInformation
virtual int FillOutputPortInformation(int port, vtkInformation *info)
vtkBivariateLinearTableThreshold::BLT_NEAR
@ BLT_NEAR
Definition: vtkBivariateLinearTableThreshold.h:92
vtkgl::c
const GLubyte * c
Definition: vtkgl.h:15720
vtkBivariateLinearTableThreshold::Implementation
Internals * Implementation
Definition: vtkBivariateLinearTableThreshold.h:171
vtkTableAlgorithm
Superclass for algorithms that produce only vtkTables as output.
Definition: vtkTableAlgorithm.h:48
vtkBivariateLinearTableThreshold::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkBivariateLinearTableThreshold::ApplyThreshold
virtual int ApplyThreshold(vtkTable *tableToThreshold, vtkIdTypeArray *acceptedIds)
vtkgl::column
GLenum GLenum GLvoid GLvoid * column
Definition: vtkgl.h:11352
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkBivariateLinearTableThreshold::ThresholdAbove
int ThresholdAbove(double x, double y)
vtkBivariateLinearTableThreshold::SetLinearThresholdTypeToAbove
void SetLinearThresholdTypeToAbove()
Definition: vtkBivariateLinearTableThreshold.h:119
vtkBivariateLinearTableThreshold
performs line-based thresholding for vtkTable data.
Definition: vtkBivariateLinearTableThreshold.h:52
VTKFILTERSSTATISTICS_EXPORT
#define VTKFILTERSSTATISTICS_EXPORT
Definition: vtkFiltersStatisticsModule.h:15
vtkSmartPointer.h
vtkBivariateLinearTableThreshold::GetSelectedRowIds
vtkIdTypeArray * GetSelectedRowIds(int selection=0)
vtkBivariateLinearTableThreshold::ThresholdBetween
int ThresholdBetween(double x, double y)
vtkBivariateLinearTableThreshold::ClearColumnsToThreshold
void ClearColumnsToThreshold()
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkBivariateLinearTableThreshold::AddColumnToThreshold
void AddColumnToThreshold(vtkIdType column, vtkIdType component)
vtkBivariateLinearTableThreshold::BLT_ABOVE
@ BLT_ABOVE
Definition: vtkBivariateLinearTableThreshold.h:90
vtkgl::a
GLboolean GLboolean GLboolean GLboolean a
Definition: vtkgl.h:12312
vtkBivariateLinearTableThreshold::UseNormalizedDistance
int UseNormalizedDistance
Definition: vtkBivariateLinearTableThreshold.h:167
vtkBivariateLinearTableThreshold::BLT_BELOW
@ BLT_BELOW
Definition: vtkBivariateLinearTableThreshold.h:91
vtkBivariateLinearTableThreshold::AddLineEquation
void AddLineEquation(double a, double b, double c)
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkBivariateLinearTableThreshold::Inclusive
int Inclusive
Definition: vtkBivariateLinearTableThreshold.h:164
vtkBivariateLinearTableThreshold::ClearLineEquations
void ClearLineEquations()
vtkIdTypeArray
dynamic, self-adjusting array of vtkIdType
Definition: vtkIdTypeArray.h:49
vtkgl::y
GLint GLint GLint GLint GLint GLint y
Definition: vtkgl.h:11318
vtkBivariateLinearTableThreshold::New
static vtkBivariateLinearTableThreshold * New()
vtkgl::p
GLfloat GLfloat p
Definition: vtkgl.h:15717
vtkTableAlgorithm.h
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:49
vtkBivariateLinearTableThreshold::DistanceThreshold
double DistanceThreshold
Definition: vtkBivariateLinearTableThreshold.h:163
vtkBivariateLinearTableThreshold::LinearThresholdType
LinearThresholdType
Definition: vtkBivariateLinearTableThreshold.h:89
vtkBivariateLinearTableThreshold::ComputeImplicitLineFunction
static void ComputeImplicitLineFunction(double *p, double slope, double *abc)
vtkBivariateLinearTableThreshold::Initialize
void Initialize()
vtkBivariateLinearTableThreshold::OutputPorts
OutputPorts
Definition: vtkBivariateLinearTableThreshold.h:84