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 "vtkFiltersGeneralModule.h" // For export macro 00039 #include "vtkPolyDataAlgorithm.h" 00040 00041 class vtkPoints; 00042 class vtkCellArray; 00043 class vtkMergePoints; 00044 class vtkFloatArray; 00045 00046 //BTX 00047 #include "vtkSmartPointer.h" // for memory safety 00048 #include <set> // Because we want to use it 00049 class ParticleTrail; 00050 class vtkTemporalPathLineFilterInternals; 00051 typedef vtkSmartPointer<ParticleTrail> TrailPointer; 00052 //ETX 00053 00054 class VTKFILTERSGENERAL_EXPORT vtkTemporalPathLineFilter : public vtkPolyDataAlgorithm { 00055 public: 00057 00058 static vtkTemporalPathLineFilter *New(); 00059 vtkTypeMacro(vtkTemporalPathLineFilter,vtkPolyDataAlgorithm); 00060 void PrintSelf(ostream& os, vtkIndent indent); 00062 00064 00066 vtkSetMacro(MaskPoints,int); 00067 vtkGetMacro(MaskPoints,int); 00069 00071 00077 vtkSetMacro(MaxTrackLength,unsigned int); 00078 vtkGetMacro(MaxTrackLength,unsigned int); 00080 00082 00088 vtkSetStringMacro(IdChannelArray); 00089 vtkGetStringMacro(IdChannelArray); 00091 00093 00099 vtkSetVector3Macro(MaxStepDistance,double); 00100 vtkGetVector3Macro(MaxStepDistance,double); 00102 00104 00108 vtkSetMacro(KeepDeadTrails,int); 00109 vtkGetMacro(KeepDeadTrails,int); 00111 00114 void Flush(); 00115 00120 void SetSelectionConnection(vtkAlgorithmOutput *algOutput); 00121 00126 void SetSelectionData(vtkDataSet *input); 00127 00128 protected: 00129 vtkTemporalPathLineFilter(); 00130 ~vtkTemporalPathLineFilter(); 00131 00132 // 00133 // Make sure the pipeline knows what type we expect as input 00134 // 00135 virtual int FillInputPortInformation (int port, vtkInformation* info); 00136 virtual int FillOutputPortInformation(int port, vtkInformation* info); 00137 00139 00140 virtual int RequestInformation (vtkInformation *, 00141 vtkInformationVector **, 00142 vtkInformationVector *); 00143 // 00144 virtual int RequestData(vtkInformation *request, 00145 vtkInformationVector** inputVector, 00146 vtkInformationVector* outputVector); 00148 00149 //BTX 00150 TrailPointer GetTrail(vtkIdType i); 00151 void IncrementTrail( 00152 TrailPointer trail, vtkDataSet *input, vtkIdType i); 00153 //ETX 00154 // internal data variables 00155 int NumberOfTimeSteps; 00156 int MaskPoints; 00157 unsigned int MaxTrackLength; 00158 unsigned int LastTrackLength; 00159 int FirstTime; 00160 char *IdChannelArray; 00161 double MaxStepDistance[3]; 00162 double LatestTime; 00163 int KeepDeadTrails; 00164 int UsingSelection; 00165 // 00166 //BTX 00167 vtkSmartPointer<vtkCellArray> PolyLines; 00168 vtkSmartPointer<vtkCellArray> Vertices; 00169 vtkSmartPointer<vtkPoints> LineCoordinates; 00170 vtkSmartPointer<vtkPoints> VertexCoordinates; 00171 vtkSmartPointer<vtkFloatArray> TrailId; 00172 vtkSmartPointer<vtkTemporalPathLineFilterInternals> Internals; 00173 std::set<vtkIdType> SelectionIds; 00174 //ETX 00175 // 00176 private: 00177 vtkTemporalPathLineFilter(const vtkTemporalPathLineFilter&); // Not implemented. 00178 void operator=(const vtkTemporalPathLineFilter&); // Not implemented. 00179 }; 00180 00181 #endif