VTK
vtkTecplotReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTecplotReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
16 /*****************************************************************************
17 *
18 * Copyright (c) 2000 - 2009, Lawrence Livermore National Security, LLC
19 * Produced at the Lawrence Livermore National Laboratory
20 * LLNL-CODE-400124
21 * All rights reserved.
22 *
23 * This file was adapted from the ASCII Tecplot reader of VisIt. For details,
24 * see https://visit.llnl.gov/. The full copyright notice is contained in the
25 * file COPYRIGHT located at the root of the VisIt distribution or at
26 * http://www.llnl.gov/visit/copyright.html.
27 *
28 *****************************************************************************/
29 
78 #ifndef vtkTecplotReader_h
79 #define vtkTecplotReader_h
80 
81 #include "vtkIOGeometryModule.h" // For export macro
83 
84 //BTX
85 #include <vector> // STL Header; Required for vector
86 #include <string> // STL Header; Required for string
87 //ETX
88 
89 class vtkPoints;
90 class vtkCellData;
91 class vtkPointData;
92 class vtkCallbackCommand;
96 class vtkTecplotReaderInternal;
97 
99 {
100 public:
101  static vtkTecplotReader * New();
103  void PrintSelf( ostream & os, vtkIndent indent );
104 
106 
107  vtkGetMacro( NumberOfVariables, int );
109 
111  void SetFileName( const char * fileName );
112 
114  const char * GetDataTitle();
115 
117  int GetNumberOfBlocks();
118 
121  const char * GetBlockName( int blockIdx );
122 
125  int GetNumberOfDataAttributes();
126 
129  const char * GetDataAttributeName( int attrIndx );
130 
134  int IsDataAttributeCellBased( const char * attrName );
135 
139  int IsDataAttributeCellBased( int attrIndx );
140 
142  int GetNumberOfDataArrays();
143 
146  const char * GetDataArrayName( int arrayIdx );
147 
150  int GetDataArrayStatus( const char * arayName );
151 
154  void SetDataArrayStatus( const char * arayName, int bChecked );
155 
156 protected:
158  ~vtkTecplotReader();
159 
160  virtual int FillOutputPortInformation( int port, vtkInformation * info );
161  virtual int RequestInformation( vtkInformation * request,
162  vtkInformationVector ** inputVector,
163  vtkInformationVector * outputVector );
164  virtual int RequestData
166 
168 
169  static void SelectionModifiedCallback
170  ( vtkObject *, unsigned long, void * tpReader, void * );
172 
177  void Init();
178 
180  void GetDataArraysList();
181 
184  void ReadFile( vtkMultiBlockDataSet * multZone);
185 
187 
192  void GetArraysFromBlockPackingZone( int numNodes, int numCells,
193  vtkPoints * theNodes, vtkPointData * nodeData, vtkCellData * cellData );
195 
197 
203  void GetArraysFromPointPackingZone
204  ( int numNodes, vtkPoints * theNodes, vtkPointData * nodeData );
206 
208 
213  void GetStructuredGridFromBlockPackingZone( int iDimSize, int jDimSize,
214  int kDimSize, int zoneIndx, const char * zoneName,
215  vtkMultiBlockDataSet * multZone );
217 
219 
224  void GetStructuredGridFromPointPackingZone( int iDimSize, int jDimSize,
225  int kDimSize, int zoneIndx, const char * zoneName,
226  vtkMultiBlockDataSet * multZone );
228 
230 
235  void GetUnstructuredGridFromBlockPackingZone( int numNodes, int numCells,
236  const char * cellType, int zoneIndx, const char * zoneName,
237  vtkMultiBlockDataSet * multZone );
239 
241 
246  void GetUnstructuredGridFromPointPackingZone( int numNodes, int numCells,
247  const char * cellType,int zoneIndx, const char * zoneName,
248  vtkMultiBlockDataSet * multZone );
250 
252 
254  void GetUnstructuredGridCells( int numberCells, const char * cellTypeStr,
255  vtkUnstructuredGrid * unstrctGrid );
257 
259  char * FileName;
262  vtkTecplotReaderInternal * Internal;
263 
264  //BTX
266  std::vector< int > CellBased;
267  std::vector< std::string > ZoneNames;
268  std::vector< std::string > Variables;
269  //ETX
270 
271 private:
272 
273  vtkTecplotReader( const vtkTecplotReader & ); // Not implemented.
274  void operator = ( const vtkTecplotReader & ); // Not implemented.
275 };
276 
277 #endif
vtkCallbackCommand * SelectionObserver
abstract base class for most VTK objects
Definition: vtkObject.h:61
represent and manipulate point attribute data
Definition: vtkPointData.h:36
Store vtkAlgorithm input/output information.
vtkDataArraySelection * DataArraySelection
represent and manipulate cell attribute data
Definition: vtkCellData.h:37
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
std::vector< int > CellBased
#define VTKIOGEOMETRY_EXPORT
static vtkMultiBlockDataSetAlgorithm * New()
virtual int FillOutputPortInformation(int port, vtkInformation *info)
supports function callbacks
a simple class to control print indentation
Definition: vtkIndent.h:38
Store on/off settings for data arrays for a vtkSource.
dataset represents arbitrary combinations of all possible cell types
vtkTecplotReaderInternal * Internal
std::vector< std::string > ZoneNames
CellTypeInDataSet cellType(vtkDataSet *input)
std::string DataTitle
Composite dataset that organizes datasets into blocks.
void PrintSelf(ostream &os, vtkIndent indent)
Store zero or more vtkInformation instances.
A concrete class to read an ASCII Tecplot file.
represent and manipulate 3D points
Definition: vtkPoints.h:38
std::vector< std::string > Variables
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)