VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkTemporalPathLineFilter.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 =========================================================================*/ 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 <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 vtkTypeMacro(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 00087 vtkSetStringMacro(IdChannelArray); 00088 vtkGetStringMacro(IdChannelArray); 00090 00091 // DO NOT CALL. Deprecated in VTK 5.6. This class now tracks all scalars. 00092 VTK_LEGACY(void SetScalarArray(const char *)); 00093 VTK_LEGACY(const char *GetScalarArray()); 00094 00096 00102 vtkSetVector3Macro(MaxStepDistance,double); 00103 vtkGetVector3Macro(MaxStepDistance,double); 00105 00107 00111 vtkSetMacro(KeepDeadTrails,int); 00112 vtkGetMacro(KeepDeadTrails,int); 00114 00117 void Flush(); 00118 00123 void SetSelectionConnection(vtkAlgorithmOutput *algOutput); 00124 00129 void SetSelection(vtkDataSet *input); 00130 00131 protected: 00132 vtkTemporalPathLineFilter(); 00133 ~vtkTemporalPathLineFilter(); 00134 00135 // 00136 // Make sure the pipeline knows what type we expect as input 00137 // 00138 virtual int FillInputPortInformation (int port, vtkInformation* info); 00139 virtual int FillOutputPortInformation(int port, vtkInformation* info); 00140 00142 00143 virtual int RequestInformation (vtkInformation *, 00144 vtkInformationVector **, 00145 vtkInformationVector *); 00146 // 00147 virtual int RequestData(vtkInformation *request, 00148 vtkInformationVector** inputVector, 00149 vtkInformationVector* outputVector); 00151 00152 //BTX 00153 TrailPointer GetTrail(vtkIdType i); 00154 void IncrementTrail( 00155 TrailPointer trail, vtkDataSet *input, vtkIdType i); 00156 //ETX 00157 // internal data variables 00158 int NumberOfTimeSteps; 00159 int MaskPoints; 00160 unsigned int MaxTrackLength; 00161 unsigned int LastTrackLength; 00162 int FirstTime; 00163 char *IdChannelArray; 00164 double MaxStepDistance[3]; 00165 double LatestTime; 00166 int KeepDeadTrails; 00167 int UsingSelection; 00168 // 00169 //BTX 00170 vtkSmartPointer<vtkCellArray> PolyLines; 00171 vtkSmartPointer<vtkCellArray> Vertices; 00172 vtkSmartPointer<vtkPoints> LineCoordinates; 00173 vtkSmartPointer<vtkPoints> VertexCoordinates; 00174 vtkSmartPointer<vtkFloatArray> TrailId; 00175 vtkSmartPointer<vtkTemporalPathLineFilterInternals> Internals; 00176 std::set<vtkIdType> SelectionIds; 00177 //ETX 00178 // 00179 private: 00180 vtkTemporalPathLineFilter(const vtkTemporalPathLineFilter&); // Not implemented. 00181 void operator=(const vtkTemporalPathLineFilter&); // Not implemented. 00182 }; 00183 00184 #endif