VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Filters/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 "vtkFiltersHybridModule.h" // For export macro
00061 #include "vtkMultiTimeStepAlgorithm.h"
00062 
00063 class vtkDataSet;
00064 class VTKFILTERSHYBRID_EXPORT vtkTemporalInterpolator : public vtkMultiTimeStepAlgorithm
00065 {
00066 public:
00067   static vtkTemporalInterpolator *New();
00068   vtkTypeMacro(vtkTemporalInterpolator, vtkMultiTimeStepAlgorithm);
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 
00096 
00098   vtkSetMacro(CacheData, bool);
00099   vtkGetMacro(CacheData, bool);
00101 
00102 protected:
00103   vtkTemporalInterpolator();
00104   ~vtkTemporalInterpolator();
00105 
00106 
00107   double DiscreteTimeStepInterval;
00108   int    ResampleFactor;
00109 
00110   virtual int FillInputPortInformation(int port, vtkInformation* info);
00111   virtual int FillOutputPortInformation(int vtkNotUsed(port), vtkInformation* info);
00112 
00113 
00114   virtual int RequestDataObject(vtkInformation *,
00115                                 vtkInformationVector **,
00116                                 vtkInformationVector *);
00117 
00118   virtual int RequestUpdateExtent(vtkInformation *,
00119                                   vtkInformationVector **,
00120                                   vtkInformationVector *);
00121   virtual int RequestInformation(vtkInformation *,
00122                                  vtkInformationVector **,
00123                                  vtkInformationVector *);
00124 
00125   virtual int RequestData(vtkInformation *,
00126                           vtkInformationVector **,
00127                           vtkInformationVector *);
00128 
00130 
00132   vtkDataObject *InterpolateDataObject(vtkDataObject *in1,
00133                                        vtkDataObject *in2,
00134                                        double ratio);
00136 
00138 
00141   virtual vtkDataSet *InterpolateDataSet(vtkDataSet *in1,
00142                                          vtkDataSet *in2,
00143                                          double ratio);
00145 
00147 
00149   virtual vtkDataArray *InterpolateDataArray(double ratio,
00150                                              vtkDataArray **arrays,
00151                                              vtkIdType N);
00153 
00156   virtual bool VerifyArrays(vtkDataArray **arrays, int N);
00157 
00158   // internally used : Ratio is {0,1} between two time steps
00159   // DeltaT is time between current 2 steps.
00160   // These are only valid when 2 time steps are interpolated
00161   // Higher order schemes will require changes to the API
00162   double Ratio;
00163   double DeltaT;
00164   double Tfrac;
00165 
00166 private:
00167   vtkTemporalInterpolator(const vtkTemporalInterpolator&);  // Not implemented.
00168   void operator=(const vtkTemporalInterpolator&);  // Not implemented.
00169 };
00170 
00171 
00172 
00173 #endif
00174 
00175 
00176