VTK
vtkComputeHistogram2DOutliers.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkComputeHistogram2DOutliers.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 -------------------------------------------------------------------------*/
49 #ifndef vtkComputeHistogram2DOutliers_h
50 #define vtkComputeHistogram2DOutliers_h
51 //------------------------------------------------------------------------------
52 #include "vtkFiltersImagingModule.h" // For export macro
53 #include "vtkSelectionAlgorithm.h"
54 
55 //------------------------------------------------------------------------------
56 class vtkCollection;
57 class vtkDoubleArray;
58 class vtkIdTypeArray;
59 class vtkImageData;
60 class vtkTable;
61 //------------------------------------------------------------------------------
62 class VTKFILTERSIMAGING_EXPORT vtkComputeHistogram2DOutliers : public vtkSelectionAlgorithm
63 {
64 public:
67  void PrintSelf(ostream& os, vtkIndent indent) override;
68 
69  vtkSetMacro(PreferredNumberOfOutliers,int);
70  vtkGetMacro(PreferredNumberOfOutliers,int);
71 
72  //
73  vtkTable* GetOutputTable();
74 
76  {
77  INPUT_TABLE_DATA=0,
79  INPUT_HISTOGRAMS_MULTIBLOCK
80  };
82  {
83  OUTPUT_SELECTED_ROWS=0,
84  OUTPUT_SELECTED_TABLE_DATA
85  };
86 
91  { this->SetInputConnection(INPUT_TABLE_DATA,cxn); }
92 
97  { this->SetInputConnection(INPUT_HISTOGRAMS_IMAGE_DATA,cxn); }
98 
104  { this->SetInputConnection(INPUT_HISTOGRAMS_MULTIBLOCK,cxn); }
105 
106 protected:
108  ~vtkComputeHistogram2DOutliers() override;
109 
112 
113  int RequestData(
116  vtkInformationVector*) override;
117 
118  int FillInputPortInformation( int port, vtkInformation* info ) override;
119  int FillOutputPortInformation( int port, vtkInformation* info ) override;
120 
125  virtual int ComputeOutlierThresholds(vtkCollection* histograms, vtkCollection* thresholds);
126 
130  virtual int ComputeOutlierThresholds(vtkImageData* histogram, vtkDoubleArray* thresholds, double threshold);
131 
136  virtual int FillOutlierIds(vtkTable* data, vtkCollection* thresholds, vtkIdTypeArray* rowIds, vtkTable* outTable);
137 
138 private:
140  void operator=(const vtkComputeHistogram2DOutliers&) = delete;
141 };
142 
143 #endif
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Store vtkAlgorithm input/output information.
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
record modification and/or execution time
Definition: vtkTimeStamp.h:35
dynamic, self-adjusting array of vtkIdType
Proxy object to connect input/output ports.
dynamic, self-adjusting array of double
void SetInputHistogramImageDataConnection(vtkAlgorithmOutput *cxn)
Set the input histogram data as a (repeatable) vtkImageData.
static vtkSelectionAlgorithm * New()
a simple class to control print indentation
Definition: vtkIndent.h:39
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
Set the connection for the given input port index.
void SetInputHistogramMultiBlockConnection(vtkAlgorithmOutput *cxn)
Set the input histogram data as a vtkMultiBlockData set containing multiple vtkImageData objects...
Superclass for algorithms that produce only Selection as output.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
void SetInputTableConnection(vtkAlgorithmOutput *cxn)
Set the source table data, from which data will be filtered.
create and manipulate ordered lists of objects
Definition: vtkCollection.h:51
Store zero or more vtkInformation instances.
compute the outliers in a set of 2D histograms and extract the corresponding row data.