VTK
|
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 00095 protected: 00096 vtkTemporalInterpolator(); 00097 ~vtkTemporalInterpolator(); 00098 00099 00100 double DiscreteTimeStepInterval; 00101 int ResampleFactor; 00102 00103 virtual int FillInputPortInformation(int port, vtkInformation* info); 00104 virtual int FillOutputPortInformation(int vtkNotUsed(port), vtkInformation* info); 00105 00106 00107 virtual int RequestDataObject(vtkInformation *, 00108 vtkInformationVector **, 00109 vtkInformationVector *); 00110 00111 virtual int RequestUpdateExtent(vtkInformation *, 00112 vtkInformationVector **, 00113 vtkInformationVector *); 00114 virtual int RequestInformation(vtkInformation *, 00115 vtkInformationVector **, 00116 vtkInformationVector *); 00117 00118 virtual int RequestData(vtkInformation *, 00119 vtkInformationVector **, 00120 vtkInformationVector *); 00121 00123 00125 vtkDataObject *InterpolateDataObject(vtkDataObject *in1, 00126 vtkDataObject *in2, 00127 double ratio); 00129 00131 00134 virtual vtkDataSet *InterpolateDataSet(vtkDataSet *in1, 00135 vtkDataSet *in2, 00136 double ratio); 00138 00140 00142 virtual vtkDataArray *InterpolateDataArray(double ratio, 00143 vtkDataArray **arrays, 00144 vtkIdType N); 00146 00149 virtual bool VerifyArrays(vtkDataArray **arrays, int N); 00150 00151 // internally used : Ratio is {0,1} between two time steps 00152 // DeltaT is time between current 2 steps. 00153 // These are only valid when 2 time steps are interpolated 00154 // Higher order schemes will require changes to the API 00155 double Ratio; 00156 double DeltaT; 00157 double Tfrac; 00158 00159 private: 00160 vtkTemporalInterpolator(const vtkTemporalInterpolator&); // Not implemented. 00161 void operator=(const vtkTemporalInterpolator&); // Not implemented. 00162 }; 00163 00164 00165 00166 #endif 00167 00168 00169