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 "vtkTableAlgorithm.h"
43 #include "vtkSmartPointer.h" //Required for smart pointer internal ivars
44 
46 class vtkDoubleArray;
47 class vtkIdTypeArray;
48 class vtkTable;
49 
51 {
52 public:
55  void PrintSelf(ostream& os, vtkIndent indent);
56 
58 
60  vtkSetMacro(Inclusive,int);
61  vtkGetMacro(Inclusive,int);
63 
66  void AddColumnToThreshold(vtkIdType column, vtkIdType component);
67 
69  int GetNumberOfColumnsToThreshold();
70 
73  void GetColumnToThreshold(vtkIdType idx, vtkIdType& column, vtkIdType& component);
74 
76  void ClearColumnsToThreshold();
77 
79  vtkIdTypeArray* GetSelectedRowIds(int selection=0);
80 
81  //BTX
83  {
84  OUTPUT_ROW_IDS=0,
85  OUTPUT_ROW_DATA
86  };
88  {
89  BLT_ABOVE=0,
92  BLT_BETWEEN
93  };
94  //ETX
95 
97  void Initialize();
98 
100  void AddLineEquation(double* p1, double* p2);
101 
103  void AddLineEquation(double* p, double slope);
104 
106  void AddLineEquation(double a, double b, double c);
107 
109  void ClearLineEquations();
110 
112 
116  vtkGetMacro(LinearThresholdType,int);
117  vtkSetMacro(LinearThresholdType,int);
123 
125 
128  vtkSetVector2Macro(ColumnRanges,double);
129  vtkGetVector2Macro(ColumnRanges,double);
131 
133 
135  vtkSetMacro(DistanceThreshold,double);
136  vtkGetMacro(DistanceThreshold,double);
138 
140 
146  vtkSetMacro(UseNormalizedDistance,int);
147  vtkGetMacro(UseNormalizedDistance,int);
148  vtkBooleanMacro(UseNormalizedDistance,int);
150 
152  static void ComputeImplicitLineFunction(double* p1, double* p2, double* abc);
153 
155  static void ComputeImplicitLineFunction(double* p, double slope, double* abc);
156 
157 protected:
160 
161  double ColumnRanges[2];
167 
168  //BTX
170  class Internals;
171  Internals* Implementation;
172  //ETX
173 
174  virtual int RequestData(
178 
179  virtual int FillInputPortInformation( int port, vtkInformation* info );
180  virtual int FillOutputPortInformation( int port, vtkInformation* info );
181 
184  virtual int ApplyThreshold(vtkTable* tableToThreshold, vtkIdTypeArray* acceptedIds);
185 
187  int ThresholdAbove(double x, double y);
188 
190  int ThresholdBelow(double x, double y);
191 
193  int ThresholdNear(double x, double y);
194 
196 
197  int ThresholdBetween(double x, double y);
198 private:
200  void operator=(const vtkBivariateLinearTableThreshold&); // Not implemented
201 };
203 
204 #endif
virtual int FillOutputPortInformation(int port, vtkInformation *info)
void PrintSelf(ostream &os, vtkIndent indent)
static vtkTableAlgorithm * New()
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:255
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:37
virtual int FillInputPortInformation(int port, vtkInformation *info)
vtkSmartPointer< vtkDoubleArray > LineEquations
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:66
#define VTK_INFOVIS_EXPORT
maintain an unordered list of dataarray objects
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Superclass for algorithms that produce only vtkTables as output.
Store zero or more vtkInformation instances.
performs line-based thresholding for vtkTable data.