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 -------------------------------------------------------------------------*/
40 #ifndef vtkBivariateLinearTableThreshold_h
41 #define vtkBivariateLinearTableThreshold_h
42 
43 #include "vtkFiltersStatisticsModule.h" // For export macro
44 #include "vtkTableAlgorithm.h"
45 #include "vtkSmartPointer.h" //Required for smart pointer internal ivars
46 
48 class vtkDoubleArray;
49 class vtkIdTypeArray;
50 class vtkTable;
51 
52 class VTKFILTERSSTATISTICS_EXPORT vtkBivariateLinearTableThreshold : public vtkTableAlgorithm
53 {
54 public:
57  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
58 
60 
64  vtkSetMacro(Inclusive,int);
65  vtkGetMacro(Inclusive,int);
67 
71  void AddColumnToThreshold(vtkIdType column, vtkIdType component);
72 
76  int GetNumberOfColumnsToThreshold();
77 
81  void GetColumnToThreshold(vtkIdType idx, vtkIdType& column, vtkIdType& component);
82 
86  void ClearColumnsToThreshold();
87 
91  vtkIdTypeArray* GetSelectedRowIds(int selection=0);
92 
94  {
95  OUTPUT_ROW_IDS=0,
96  OUTPUT_ROW_DATA
97  };
99  {
100  BLT_ABOVE=0,
103  BLT_BETWEEN
104  };
105 
109  void Initialize();
110 
114  void AddLineEquation(double* p1, double* p2);
115 
119  void AddLineEquation(double* p, double slope);
120 
124  void AddLineEquation(double a, double b, double c);
125 
129  void ClearLineEquations();
130 
132 
138  vtkGetMacro(LinearThresholdType,int);
139  vtkSetMacro(LinearThresholdType,int);
145 
147 
152  vtkSetVector2Macro(ColumnRanges,double);
153  vtkGetVector2Macro(ColumnRanges,double);
155 
157 
160  vtkSetMacro(DistanceThreshold,double);
161  vtkGetMacro(DistanceThreshold,double);
163 
165 
172  vtkSetMacro(UseNormalizedDistance,int);
173  vtkGetMacro(UseNormalizedDistance,int);
174  vtkBooleanMacro(UseNormalizedDistance,int);
176 
180  static void ComputeImplicitLineFunction(double* p1, double* p2, double* abc);
181 
185  static void ComputeImplicitLineFunction(double* p, double slope, double* abc);
186 
187 protected:
189  ~vtkBivariateLinearTableThreshold() VTK_OVERRIDE;
190 
191  double ColumnRanges[2];
192  double DistanceThreshold;
193  int Inclusive;
195  int NumberOfLineEquations;
196  int UseNormalizedDistance;
197 
199  class Internals;
200  Internals* Implementation;
201 
202  int RequestData(
205  vtkInformationVector*) VTK_OVERRIDE;
206 
207  int FillInputPortInformation( int port, vtkInformation* info ) VTK_OVERRIDE;
208  int FillOutputPortInformation( int port, vtkInformation* info ) VTK_OVERRIDE;
209 
213  virtual int ApplyThreshold(vtkTable* tableToThreshold, vtkIdTypeArray* acceptedIds);
214 
216 
219  int ThresholdAbove(double x, double y);
220 
224  int ThresholdBelow(double x, double y);
225 
229  int ThresholdNear(double x, double y);
230 
234  int ThresholdBetween(double x, double y);
236 
237 private:
239  void operator=(const vtkBivariateLinearTableThreshold&) VTK_DELETE_FUNCTION;
240 };
241 
242 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkTableAlgorithm * New()
Store vtkAlgorithm input/output information.
void SetLinearThresholdTypeToNear()
Set the threshold type.
dynamic, self-adjusting array of vtkIdType
Hold a reference to a vtkObjectBase instance.
int vtkIdType
Definition: vtkType.h:287
void SetLinearThresholdTypeToAbove()
Set the threshold type.
dynamic, self-adjusting array of double
void SetLinearThresholdTypeToBelow()
Set the threshold type.
a simple class to control print indentation
Definition: vtkIndent.h:39
void SetLinearThresholdTypeToBetween()
Set the threshold type.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
maintain an unordered list of dataarray objects
Superclass for algorithms that produce only vtkTables as output.
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
performs line-based thresholding for vtkTable data.