VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 -------------------------------------------------------------------------*/
48 #ifndef __vtkComputeHistogram2DOutliers_h
49 #define __vtkComputeHistogram2DOutliers_h
50 //------------------------------------------------------------------------------
51 #include "vtkFiltersImagingModule.h" // For export macro
52 #include "vtkSelectionAlgorithm.h"
53 
54 //------------------------------------------------------------------------------
55 class vtkCollection;
56 class vtkDoubleArray;
57 class vtkIdTypeArray;
58 class vtkImageData;
59 class vtkTable;
60 //------------------------------------------------------------------------------
61 class VTKFILTERSIMAGING_EXPORT vtkComputeHistogram2DOutliers : public vtkSelectionAlgorithm
62 {
63 public:
64  static vtkComputeHistogram2DOutliers* New();
65  vtkTypeMacro(vtkComputeHistogram2DOutliers, vtkSelectionAlgorithm);
66  void PrintSelf(ostream& os, vtkIndent indent);
67 
68  vtkSetMacro(PreferredNumberOfOutliers,int);
69  vtkGetMacro(PreferredNumberOfOutliers,int);
70 
71  //
72  vtkTable* GetOutputTable();
73 //BTX
75  {
76  INPUT_TABLE_DATA=0,
78  INPUT_HISTOGRAMS_MULTIBLOCK
79  };
81  {
82  OUTPUT_SELECTED_ROWS=0,
83  OUTPUT_SELECTED_TABLE_DATA
84  };
85 //ETX
86 
88 
89  void SetInputTableConnection(vtkAlgorithmOutput* cxn)
90  { this->SetInputConnection(INPUT_TABLE_DATA,cxn); }
92 
94 
95  void SetInputHistogramImageDataConnection(vtkAlgorithmOutput* cxn)
96  { this->SetInputConnection(INPUT_HISTOGRAMS_IMAGE_DATA,cxn); }
98 
100 
102  void SetInputHistogramMultiBlockConnection(vtkAlgorithmOutput* cxn)
103  { this->SetInputConnection(INPUT_HISTOGRAMS_MULTIBLOCK,cxn); }
105 
106 protected:
109 
111  vtkTimeStamp BuildTime;
112 
113  virtual int RequestData(
114  vtkInformation*,
115  vtkInformationVector**,
116  vtkInformationVector*);
117 
118  virtual int FillInputPortInformation( int port, vtkInformation* info );
119  virtual int FillOutputPortInformation( int port, vtkInformation* info );
120 
123  virtual int ComputeOutlierThresholds(vtkCollection* histograms, vtkCollection* thresholds);
124 
127  virtual int ComputeOutlierThresholds(vtkImageData* histogram, vtkDoubleArray* thresholds, double threshold);
128 
130 
132  virtual int FillOutlierIds(vtkTable* data, vtkCollection* thresholds, vtkIdTypeArray* rowIds, vtkTable* outTable);
133 private:
135  void operator=(const vtkComputeHistogram2DOutliers&); // Not implemented
136 };
138 
139 #endif
void SetInputHistogramImageDataConnection(vtkAlgorithmOutput *cxn)
void SetInputHistogramMultiBlockConnection(vtkAlgorithmOutput *cxn)
void SetInputTableConnection(vtkAlgorithmOutput *cxn)
compute the outliers in a set of 2D histograms and extract the corresponding row data.