VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkTemporalPathLineFilter.h,v $ 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 =========================================================================*/ 00035 #ifndef _vtkTemporalPathLineFilter_h 00036 #define _vtkTemporalPathLineFilter_h 00037 00038 #include "vtkPolyDataAlgorithm.h" 00039 00040 class vtkPoints; 00041 class vtkCellArray; 00042 class vtkMergePoints; 00043 class vtkFloatArray; 00044 00045 //BTX 00046 #include "vtkSmartPointer.h" // for memory safety 00047 #include <vtkstd/set> // Because we want to use it 00048 class ParticleTrail; 00049 class vtkTemporalPathLineFilterInternals; 00050 typedef vtkSmartPointer<ParticleTrail> TrailPointer; 00051 //ETX 00052 00053 class VTK_GRAPHICS_EXPORT vtkTemporalPathLineFilter : public vtkPolyDataAlgorithm { 00054 public: 00056 00057 static vtkTemporalPathLineFilter *New(); 00058 vtkTypeRevisionMacro(vtkTemporalPathLineFilter,vtkPolyDataAlgorithm); 00059 void PrintSelf(ostream& os, vtkIndent indent); 00061 00063 00065 vtkSetMacro(MaskPoints,int); 00066 vtkGetMacro(MaskPoints,int); 00068 00070 00076 vtkSetMacro(MaxTrackLength,unsigned int); 00077 vtkGetMacro(MaxTrackLength,unsigned int); 00079 00081 00085 vtkSetMacro(UsePointIndexForIds,int); 00086 vtkGetMacro(UsePointIndexForIds,int); 00087 vtkBooleanMacro(UsePointIndexForIds,int); 00089 00091 00095 vtkSetStringMacro(IdChannelArray); 00096 vtkGetStringMacro(IdChannelArray); 00098 00100 00104 vtkSetStringMacro(ScalarArray); 00105 vtkGetStringMacro(ScalarArray); 00107 00109 00115 vtkSetVector3Macro(MaxStepDistance,double); 00116 vtkGetVector3Macro(MaxStepDistance,double); 00118 00120 00124 vtkSetMacro(KeepDeadTrails,int); 00125 vtkGetMacro(KeepDeadTrails,int); 00127 00130 void Flush(); 00131 00136 void SetSelectionConnection(vtkAlgorithmOutput *algOutput); 00137 00142 void SetSelection(vtkDataSet *input); 00143 00144 protected: 00145 vtkTemporalPathLineFilter(); 00146 ~vtkTemporalPathLineFilter(); 00147 00148 // 00149 // Make sure the pipeline knows what type we expect as input 00150 // 00151 virtual int FillInputPortInformation(int port, vtkInformation* info); 00152 00154 00155 virtual int RequestInformation (vtkInformation *, 00156 vtkInformationVector **, 00157 vtkInformationVector *); 00158 // 00159 virtual int RequestData(vtkInformation *request, 00160 vtkInformationVector** inputVector, 00161 vtkInformationVector* outputVector); 00163 00164 //BTX 00165 TrailPointer GetTrail(vtkIdType i); 00166 void IncrementTrail(TrailPointer trail, vtkDataSet *input, 00167 vtkDataArray *inscalars, vtkIdType i); 00168 //ETX 00169 // internal data variables 00170 int NumberOfTimeSteps; 00171 int MaskPoints; 00172 unsigned int MaxTrackLength; 00173 unsigned int LastTrackLength; 00174 int UsePointIndexForIds; 00175 int FirstTime; 00176 char *IdChannelArray; 00177 char *ScalarArray; 00178 double MaxStepDistance[3]; 00179 double LatestTime; 00180 int KeepDeadTrails; 00181 int UsingSelection; 00182 // 00183 //BTX 00184 vtkSmartPointer<vtkPoints> ParticleCoordinates; 00185 vtkSmartPointer<vtkCellArray> ParticlePolyLines; 00186 vtkSmartPointer<vtkFloatArray> PointOpacity; 00187 vtkSmartPointer<vtkFloatArray> PointId; 00188 vtkSmartPointer<vtkFloatArray> PointScalars; 00189 vtkSmartPointer<vtkTemporalPathLineFilterInternals> Internals; 00190 vtkstd::set<vtkIdType> SelectionIds; 00191 //ETX 00192 // 00193 private: 00194 vtkTemporalPathLineFilter(const vtkTemporalPathLineFilter&); // Not implemented. 00195 void operator=(const vtkTemporalPathLineFilter&); // Not implemented. 00196 }; 00197 00198 #endif