VTK
dox/Infovis/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 "vtkSelectionAlgorithm.h"
00052 
00053 //------------------------------------------------------------------------------
00054 class vtkCollection;
00055 class vtkDoubleArray;
00056 class vtkIdTypeArray;
00057 class vtkImageData;
00058 class vtkTable;
00059 //------------------------------------------------------------------------------
00060 class VTK_INFOVIS_EXPORT vtkComputeHistogram2DOutliers : public vtkSelectionAlgorithm
00061 {
00062 public:
00063   static vtkComputeHistogram2DOutliers* New();
00064   vtkTypeMacro(vtkComputeHistogram2DOutliers, vtkSelectionAlgorithm);
00065   void PrintSelf(ostream& os, vtkIndent indent);
00066 
00067   vtkSetMacro(PreferredNumberOfOutliers,int);
00068   vtkGetMacro(PreferredNumberOfOutliers,int);
00069 
00070   // 
00071   vtkTable* GetOutputTable();
00072 //BTX
00073   enum InputPorts
00074   {
00075     INPUT_TABLE_DATA=0,
00076     INPUT_HISTOGRAMS_IMAGE_DATA,
00077     INPUT_HISTOGRAMS_MULTIBLOCK
00078   };
00079   enum OutputPorts
00080   {
00081     OUTPUT_SELECTED_ROWS=0,
00082     OUTPUT_SELECTED_TABLE_DATA
00083   };
00084 //ETX
00085 
00087 
00088   void SetInputTableConnection(vtkAlgorithmOutput* cxn) 
00089   { this->SetInputConnection(INPUT_TABLE_DATA,cxn); }
00091   
00093 
00094   void SetInputHistogramImageDataConnection(vtkAlgorithmOutput* cxn)
00095   { this->SetInputConnection(INPUT_HISTOGRAMS_IMAGE_DATA,cxn); }
00097 
00099 
00101   void SetInputHistogramMultiBlockConnection(vtkAlgorithmOutput* cxn)
00102   { this->SetInputConnection(INPUT_HISTOGRAMS_MULTIBLOCK,cxn); }
00104 
00105 protected:
00106   vtkComputeHistogram2DOutliers();
00107   ~vtkComputeHistogram2DOutliers();
00108 
00109   int PreferredNumberOfOutliers;
00110   vtkTimeStamp BuildTime;
00111 
00112   virtual int RequestData(
00113     vtkInformation*,
00114     vtkInformationVector**,
00115     vtkInformationVector*);
00116 
00117   virtual int FillInputPortInformation( int port, vtkInformation* info );
00118   virtual int FillOutputPortInformation( int port, vtkInformation* info );
00119 
00122   virtual int ComputeOutlierThresholds(vtkCollection* histograms, vtkCollection* thresholds);
00123 
00126   virtual int ComputeOutlierThresholds(vtkImageData* histogram, vtkDoubleArray* thresholds, double threshold);
00127   
00129 
00131   virtual int FillOutlierIds(vtkTable* data, vtkCollection* thresholds, vtkIdTypeArray* rowIds, vtkTable* outTable);
00132 private:
00133   vtkComputeHistogram2DOutliers(const vtkComputeHistogram2DOutliers&); // Not implemented
00134   void operator=(const vtkComputeHistogram2DOutliers&);   // Not implemented
00135 };
00137 
00138 #endif