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  {
92  this->SetInputConnection(INPUT_TABLE_DATA, cxn);
93  }
94 
99  {
100  this->SetInputConnection(INPUT_HISTOGRAMS_IMAGE_DATA, cxn);
101  }
102 
108  {
109  this->SetInputConnection(INPUT_HISTOGRAMS_MULTIBLOCK, cxn);
110  }
111 
112 protected:
114  ~vtkComputeHistogram2DOutliers() override;
115 
118 
120 
121  int FillInputPortInformation(int port, vtkInformation* info) override;
123 
128  virtual int ComputeOutlierThresholds(vtkCollection* histograms, vtkCollection* thresholds);
129 
133  virtual int ComputeOutlierThresholds(
134  vtkImageData* histogram, vtkDoubleArray* thresholds, double threshold);
135 
140  virtual int FillOutlierIds(
141  vtkTable* data, vtkCollection* thresholds, vtkIdTypeArray* rowIds, vtkTable* outTable);
142 
143 private:
145  void operator=(const vtkComputeHistogram2DOutliers&) = delete;
146 };
147 
148 #endif
vtkSelectionAlgorithm::FillOutputPortInformation
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
vtkComputeHistogram2DOutliers
compute the outliers in a set of 2D histograms and extract the corresponding row data.
Definition: vtkComputeHistogram2DOutliers.h:62
vtkX3D::data
Definition: vtkX3D.h:321
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:62
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:32
vtkComputeHistogram2DOutliers::BuildTime
vtkTimeStamp BuildTime
Definition: vtkComputeHistogram2DOutliers.h:117
vtkSelectionAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkSelectionAlgorithm.h
vtkSelectionAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkX3D::port
Definition: vtkX3D.h:453
vtkCollection
create and manipulate ordered lists of objects
Definition: vtkCollection.h:52
vtkComputeHistogram2DOutliers::InputPorts
InputPorts
Definition: vtkComputeHistogram2DOutliers.h:75
vtkComputeHistogram2DOutliers::SetInputHistogramMultiBlockConnection
void SetInputHistogramMultiBlockConnection(vtkAlgorithmOutput *cxn)
Set the input histogram data as a vtkMultiBlockData set containing multiple vtkImageData objects.
Definition: vtkComputeHistogram2DOutliers.h:107
vtkComputeHistogram2DOutliers::PreferredNumberOfOutliers
int PreferredNumberOfOutliers
Definition: vtkComputeHistogram2DOutliers.h:116
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:41
vtkSelectionAlgorithm::New
static vtkSelectionAlgorithm * New()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkSelectionAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkComputeHistogram2DOutliers::INPUT_HISTOGRAMS_IMAGE_DATA
Definition: vtkComputeHistogram2DOutliers.h:78
vtkComputeHistogram2DOutliers::OutputPorts
OutputPorts
Definition: vtkComputeHistogram2DOutliers.h:81
vtkAlgorithm::SetInputConnection
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
Set the connection for the given input port index.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:64
vtkX3D::info
Definition: vtkX3D.h:382
vtkIdTypeArray
dynamic, self-adjusting array of vtkIdType
Definition: vtkIdTypeArray.h:35
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:36
vtkSelectionAlgorithm
Superclass for algorithms that produce only Selection as output.
Definition: vtkSelectionAlgorithm.h:46
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:35
vtkComputeHistogram2DOutliers::SetInputHistogramImageDataConnection
void SetInputHistogramImageDataConnection(vtkAlgorithmOutput *cxn)
Set the input histogram data as a (repeatable) vtkImageData.
Definition: vtkComputeHistogram2DOutliers.h:98
vtkComputeHistogram2DOutliers::SetInputTableConnection
void SetInputTableConnection(vtkAlgorithmOutput *cxn)
Set the source table data, from which data will be filtered.
Definition: vtkComputeHistogram2DOutliers.h:90