VTK
dox/Filters/Imaging/vtkComputeHistogram2DOutliers.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkComputeHistogram2DOutliers.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 /*-------------------------------------------------------------------------
00016   Copyright 2009 Sandia Corporation.
00017   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00018   the U.S. Government retains certain rights in this software.
00019 -------------------------------------------------------------------------*/
00048 #ifndef __vtkComputeHistogram2DOutliers_h
00049 #define __vtkComputeHistogram2DOutliers_h
00050 //------------------------------------------------------------------------------
00051 #include "vtkFiltersImagingModule.h" // For export macro
00052 #include "vtkSelectionAlgorithm.h"
00053 
00054 //------------------------------------------------------------------------------
00055 class vtkCollection;
00056 class vtkDoubleArray;
00057 class vtkIdTypeArray;
00058 class vtkImageData;
00059 class vtkTable;
00060 //------------------------------------------------------------------------------
00061 class VTKFILTERSIMAGING_EXPORT vtkComputeHistogram2DOutliers : public vtkSelectionAlgorithm
00062 {
00063 public:
00064   static vtkComputeHistogram2DOutliers* New();
00065   vtkTypeMacro(vtkComputeHistogram2DOutliers, vtkSelectionAlgorithm);
00066   void PrintSelf(ostream& os, vtkIndent indent);
00067 
00068   vtkSetMacro(PreferredNumberOfOutliers,int);
00069   vtkGetMacro(PreferredNumberOfOutliers,int);
00070 
00071   //
00072   vtkTable* GetOutputTable();
00073 //BTX
00074   enum InputPorts
00075   {
00076     INPUT_TABLE_DATA=0,
00077     INPUT_HISTOGRAMS_IMAGE_DATA,
00078     INPUT_HISTOGRAMS_MULTIBLOCK
00079   };
00080   enum OutputPorts
00081   {
00082     OUTPUT_SELECTED_ROWS=0,
00083     OUTPUT_SELECTED_TABLE_DATA
00084   };
00085 //ETX
00086 
00088 
00089   void SetInputTableConnection(vtkAlgorithmOutput* cxn)
00090   { this->SetInputConnection(INPUT_TABLE_DATA,cxn); }
00092 
00094 
00095   void SetInputHistogramImageDataConnection(vtkAlgorithmOutput* cxn)
00096   { this->SetInputConnection(INPUT_HISTOGRAMS_IMAGE_DATA,cxn); }
00098 
00100 
00102   void SetInputHistogramMultiBlockConnection(vtkAlgorithmOutput* cxn)
00103   { this->SetInputConnection(INPUT_HISTOGRAMS_MULTIBLOCK,cxn); }
00105 
00106 protected:
00107   vtkComputeHistogram2DOutliers();
00108   ~vtkComputeHistogram2DOutliers();
00109 
00110   int PreferredNumberOfOutliers;
00111   vtkTimeStamp BuildTime;
00112 
00113   virtual int RequestData(
00114     vtkInformation*,
00115     vtkInformationVector**,
00116     vtkInformationVector*);
00117 
00118   virtual int FillInputPortInformation( int port, vtkInformation* info );
00119   virtual int FillOutputPortInformation( int port, vtkInformation* info );
00120 
00123   virtual int ComputeOutlierThresholds(vtkCollection* histograms, vtkCollection* thresholds);
00124 
00127   virtual int ComputeOutlierThresholds(vtkImageData* histogram, vtkDoubleArray* thresholds, double threshold);
00128 
00130 
00132   virtual int FillOutlierIds(vtkTable* data, vtkCollection* thresholds, vtkIdTypeArray* rowIds, vtkTable* outTable);
00133 private:
00134   vtkComputeHistogram2DOutliers(const vtkComputeHistogram2DOutliers&); // Not implemented
00135   void operator=(const vtkComputeHistogram2DOutliers&);   // Not implemented
00136 };
00138 
00139 #endif