VTK  9.3.20240419
vtkComputeHistogram2DOutliers.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2009 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
33 #ifndef vtkComputeHistogram2DOutliers_h
34 #define vtkComputeHistogram2DOutliers_h
35 //------------------------------------------------------------------------------
36 #include "vtkFiltersImagingModule.h" // For export macro
37 #include "vtkSelectionAlgorithm.h"
38 
39 //------------------------------------------------------------------------------
40 VTK_ABI_NAMESPACE_BEGIN
41 class vtkCollection;
42 class vtkDoubleArray;
43 class vtkIdTypeArray;
44 class vtkImageData;
45 class vtkTable;
46 //------------------------------------------------------------------------------
47 class VTKFILTERSIMAGING_EXPORT vtkComputeHistogram2DOutliers : public vtkSelectionAlgorithm
48 {
49 public:
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
54  vtkSetMacro(PreferredNumberOfOutliers, int);
55  vtkGetMacro(PreferredNumberOfOutliers, int);
56 
57  //
59 
61  {
62  INPUT_TABLE_DATA = 0,
64  INPUT_HISTOGRAMS_MULTIBLOCK
65  };
67  {
68  OUTPUT_SELECTED_ROWS = 0,
69  OUTPUT_SELECTED_TABLE_DATA
70  };
71 
76  {
77  this->SetInputConnection(INPUT_TABLE_DATA, cxn);
78  }
79 
84  {
85  this->SetInputConnection(INPUT_HISTOGRAMS_IMAGE_DATA, cxn);
86  }
87 
93  {
94  this->SetInputConnection(INPUT_HISTOGRAMS_MULTIBLOCK, cxn);
95  }
96 
97 protected:
100 
103 
105 
108 
113  virtual int ComputeOutlierThresholds(vtkCollection* histograms, vtkCollection* thresholds);
114 
119  vtkImageData* histogram, vtkDoubleArray* thresholds, double threshold);
120 
125  virtual int FillOutlierIds(
126  vtkTable* data, vtkCollection* thresholds, vtkIdTypeArray* rowIds, vtkTable* outTable);
127 
128 private:
130  void operator=(const vtkComputeHistogram2DOutliers&) = delete;
131 };
132 
133 VTK_ABI_NAMESPACE_END
134 #endif
Proxy object to connect input/output ports.
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
Set the connection for the given input port index.
create and manipulate ordered lists of objects
Definition: vtkCollection.h:46
compute the outliers in a set of 2D histograms and extract the corresponding row data.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetInputTableConnection(vtkAlgorithmOutput *cxn)
Set the source table data, from which data will be filtered.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void SetInputHistogramMultiBlockConnection(vtkAlgorithmOutput *cxn)
Set the input histogram data as a vtkMultiBlockData set containing multiple vtkImageData objects.
virtual int ComputeOutlierThresholds(vtkCollection *histograms, vtkCollection *thresholds)
Compute the thresholds (essentially bin extents) that contain outliers for a collection of vtkImageDa...
~vtkComputeHistogram2DOutliers() override
static vtkComputeHistogram2DOutliers * New()
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void SetInputHistogramImageDataConnection(vtkAlgorithmOutput *cxn)
Set the input histogram data as a (repeatable) vtkImageData.
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
virtual int ComputeOutlierThresholds(vtkImageData *histogram, vtkDoubleArray *thresholds, double threshold)
Compute the thresholds (bin extents) that contain outliers for a single vtkImageData histogram.
virtual int FillOutlierIds(vtkTable *data, vtkCollection *thresholds, vtkIdTypeArray *rowIds, vtkTable *outTable)
Take a set of range thresholds (bin extents) and filter out rows from the input table data that fits ...
dynamic, self-adjusting array of double
dynamic, self-adjusting array of vtkIdType
topologically and geometrically regular array of data
Definition: vtkImageData.h:156
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only Selection as output.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:168
record modification and/or execution time
Definition: vtkTimeStamp.h:44
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
@ data
Definition: vtkX3D.h:315