VTK
dox/Filters/General/vtkTemporalStatistics.h
Go to the documentation of this file.
00001 // -*- c++ -*-
00002 /*=========================================================================
00003 
00004   Program:   Visualization Toolkit
00005   Module:    vtkTemporalStatistics.h
00006 
00007   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00016 
00017 /*
00018  * Copyright 2008 Sandia Corporation.
00019  * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00020  * license for use of this work by or on behalf of the
00021  * U.S. Government. Redistribution and use in source and binary forms, with
00022  * or without modification, are permitted provided that this Notice and any
00023  * statement of authorship are reproduced on all copies.
00024  */
00025 
00054 #ifndef _vtkTemporalStatistics_h
00055 #define _vtkTemporalStatistics_h
00056 
00057 #include "vtkFiltersGeneralModule.h" // For export macro
00058 #include "vtkPassInputTypeAlgorithm.h"
00059 
00060 class vtkCompositeDataSet;
00061 class vtkDataSet;
00062 class vtkFieldData;
00063 class vtkGraph;
00064 
00065 class VTKFILTERSGENERAL_EXPORT vtkTemporalStatistics : public vtkPassInputTypeAlgorithm
00066 {
00067 public:
00068   vtkTypeMacro(vtkTemporalStatistics, vtkPassInputTypeAlgorithm);
00069   static vtkTemporalStatistics *New();
00070   virtual void PrintSelf(ostream &os, vtkIndent indent);
00071 
00073 
00075   vtkGetMacro(ComputeAverage, int);
00076   vtkSetMacro(ComputeAverage, int);
00077   vtkBooleanMacro(ComputeAverage, int);
00079 
00081 
00083   vtkGetMacro(ComputeMinimum, int);
00084   vtkSetMacro(ComputeMinimum, int);
00085   vtkBooleanMacro(ComputeMinimum, int);
00087 
00089 
00091   vtkGetMacro(ComputeMaximum, int);
00092   vtkSetMacro(ComputeMaximum, int);
00093   vtkBooleanMacro(ComputeMaximum, int);
00095 
00096   // Definition:
00097   // Turn on/off the computation of the standard deviation of the values over
00098   // time.  On by default.  The resulting array names have "_stddev" appended to
00099   // them.
00100   vtkGetMacro(ComputeStandardDeviation, int);
00101   vtkSetMacro(ComputeStandardDeviation, int);
00102   vtkBooleanMacro(ComputeStandardDeviation, int);
00103 
00104 protected:
00105   vtkTemporalStatistics();
00106   ~vtkTemporalStatistics();
00107 
00108   int ComputeAverage;
00109   int ComputeMaximum;
00110   int ComputeMinimum;
00111   int ComputeStandardDeviation;
00112 
00113   // Used when iterating the pipeline to keep track of which timestep we are on.
00114   int CurrentTimeIndex;
00115 
00116   virtual int FillInputPortInformation(int port, vtkInformation *info);
00117 
00118   virtual int RequestDataObject(vtkInformation *request,
00119                                 vtkInformationVector **inputVector,
00120                                 vtkInformationVector *outputVector);
00121   virtual int RequestInformation(vtkInformation *request,
00122                                  vtkInformationVector **inputVector,
00123                                  vtkInformationVector *outputVector);
00124   virtual int RequestUpdateExtent(vtkInformation *request,
00125                                   vtkInformationVector **inputVector,
00126                                   vtkInformationVector *outputVector);
00127   virtual int RequestData(vtkInformation *request,
00128                           vtkInformationVector **inputVector,
00129                           vtkInformationVector *outputVector);
00130 
00131   virtual void InitializeStatistics(vtkDataObject *input,
00132                                     vtkDataObject *output);
00133   virtual void InitializeStatistics(vtkDataSet *input, vtkDataSet *output);
00134   virtual void InitializeStatistics(vtkGraph *input, vtkGraph *output);
00135   virtual void InitializeStatistics(vtkCompositeDataSet *input,
00136                                     vtkCompositeDataSet *output);
00137   virtual void InitializeArrays(vtkFieldData *inFd, vtkFieldData *outFd);
00138   virtual void InitializeArray(vtkDataArray *array, vtkFieldData *outFd);
00139 
00140   virtual void AccumulateStatistics(vtkDataObject *input,
00141                                     vtkDataObject *output);
00142   virtual void AccumulateStatistics(vtkDataSet *input, vtkDataSet *output);
00143   virtual void AccumulateStatistics(vtkGraph *input, vtkGraph *output);
00144   virtual void AccumulateStatistics(vtkCompositeDataSet *input,
00145                                     vtkCompositeDataSet *output);
00146   virtual void AccumulateArrays(vtkFieldData *inFd, vtkFieldData *outFd);
00147 
00148   virtual void PostExecute(vtkDataObject *input, vtkDataObject *output);
00149   virtual void PostExecute(vtkDataSet *input, vtkDataSet *output);
00150   virtual void PostExecute(vtkGraph *input, vtkGraph *output);
00151   virtual void PostExecute(vtkCompositeDataSet *input,
00152                            vtkCompositeDataSet *output);
00153   virtual void FinishArrays(vtkFieldData *inFd, vtkFieldData *outFd);
00154 
00155   virtual vtkDataArray *GetArray(vtkFieldData *fieldData,
00156                                  vtkDataArray *inArray,
00157                                  const char *nameSuffix);
00158 
00159 private:
00160   vtkTemporalStatistics(const vtkTemporalStatistics &); // Not implemented.
00161   void operator=(const vtkTemporalStatistics &);        // Not implemented.
00162 };
00163 
00164 #endif //_vtkTemporalStatistics_h