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 
67  void AddColumnToThreshold(vtkIdType column, vtkIdType component);
68 
70  int GetNumberOfColumnsToThreshold();
71 
74  void GetColumnToThreshold(vtkIdType idx, vtkIdType& column, vtkIdType& component);
75 
77  void ClearColumnsToThreshold();
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 
110  void ClearLineEquations();
111 
113 
117  vtkGetMacro(LinearThresholdType,int);
118  vtkSetMacro(LinearThresholdType,int);
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 
180  virtual int FillInputPortInformation( int port, vtkInformation* info );
181  virtual int FillOutputPortInformation( int port, vtkInformation* info );
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
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:275
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual int FillInputPortInformation(int port, vtkInformation *info)
vtkSmartPointer< vtkDoubleArray > LineEquations
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:67
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.
#define VTKFILTERSSTATISTICS_EXPORT
performs line-based thresholding for vtkTable data.