VTK
dox/Hybrid/vtkTemporalInterpolator.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkTemporalInterpolator.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 =========================================================================*/
00057 #ifndef __vtkTemporalInterpolator_h
00058 #define __vtkTemporalInterpolator_h
00059 
00060 #include "vtkTemporalDataSetAlgorithm.h"
00061 
00062 class vtkDataSet;
00063 
00064 class VTK_HYBRID_EXPORT vtkTemporalInterpolator : public vtkTemporalDataSetAlgorithm
00065 {
00066 public:
00067   static vtkTemporalInterpolator *New();
00068   vtkTypeMacro(vtkTemporalInterpolator, vtkTemporalDataSetAlgorithm);
00069   void PrintSelf(ostream& os, vtkIndent indent);
00070 
00072 
00079   vtkSetMacro(DiscreteTimeStepInterval, double);
00080   vtkGetMacro(DiscreteTimeStepInterval, double);
00082 
00084 
00091   vtkSetMacro(ResampleFactor, int);
00092   vtkGetMacro(ResampleFactor, int);
00094 
00095 protected:
00096   vtkTemporalInterpolator();
00097   ~vtkTemporalInterpolator();
00098 
00099   double DiscreteTimeStepInterval;
00100   int    ResampleFactor;
00101 /*
00102   virtual int FillInputPortInformation(int port, vtkInformation* info);
00103 
00104   virtual int RequestDataObject(vtkInformation *,
00105                                 vtkInformationVector **,
00106                                 vtkInformationVector *);
00107 */
00108   virtual int RequestUpdateExtent(vtkInformation *,
00109                                   vtkInformationVector **,
00110                                   vtkInformationVector *);
00111   virtual int RequestInformation(vtkInformation *,
00112                                  vtkInformationVector **,
00113                                  vtkInformationVector *);
00114   
00115   virtual int RequestData(vtkInformation *,
00116                           vtkInformationVector **,
00117                           vtkInformationVector *);
00118 
00120 
00122   vtkDataObject *InterpolateDataObject(vtkDataObject *in1, 
00123                                        vtkDataObject *in2,
00124                                        double ratio);
00126 
00128 
00131   virtual vtkDataSet *InterpolateDataSet(vtkDataSet *in1, 
00132                                          vtkDataSet *in2,
00133                                          double ratio);
00135 
00137 
00139   virtual vtkDataArray *InterpolateDataArray(double ratio, 
00140                                              vtkDataArray **arrays, 
00141                                              vtkIdType N);
00143 
00146   virtual bool VerifyArrays(vtkDataArray **arrays, int N);
00147 
00148   // internally used : Ratio is {0,1} between two time steps
00149   // DeltaT is time between current 2 steps.
00150   // These are only valid when 2 time steps are interpolated
00151   // Higher order schemes will require changes to the API
00152   double Ratio;
00153   double DeltaT;
00154   double Tfrac;
00155 
00156 private:
00157   vtkTemporalInterpolator(const vtkTemporalInterpolator&);  // Not implemented.
00158   void operator=(const vtkTemporalInterpolator&);  // Not implemented.
00159 };
00160 
00161 
00162 
00163 #endif
00164 
00165 
00166