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 
82 
83 //BTX
84 #include <vtkstd/vector> // STL Header; Required for vector
85 #include <vtkstd/string> // STL Header; Required for string
86 //ETX
87 
88 class vtkPoints;
89 class vtkCellData;
90 class vtkPointData;
91 class vtkCallbackCommand;
95 class vtkTecplotReaderInternal;
96 
98 {
99 public:
100  static vtkTecplotReader * New();
102  void PrintSelf( ostream & os, vtkIndent indent );
103 
105 
106  vtkGetMacro( NumberOfVariables, int );
108 
110  void SetFileName( const char * fileName );
111 
113  const char * GetDataTitle();
114 
116  int GetNumberOfBlocks();
117 
120  const char * GetBlockName( int blockIdx );
121 
124  int GetNumberOfDataAttributes();
125 
128  const char * GetDataAttributeName( int attrIndx );
129 
133  int IsDataAttributeCellBased( const char * attrName );
134 
138  int IsDataAttributeCellBased( int attrIndx );
139 
141  int GetNumberOfDataArrays();
142 
145  const char * GetDataArrayName( int arrayIdx );
146 
149  int GetDataArrayStatus( const char * arayName );
150 
153  void SetDataArrayStatus( const char * arayName, int bChecked );
154 
155 protected:
157  ~vtkTecplotReader();
158 
159  virtual int FillOutputPortInformation( int port, vtkInformation * info );
160  virtual int RequestInformation( vtkInformation * request,
161  vtkInformationVector ** inputVector,
162  vtkInformationVector * outputVector );
163  virtual int RequestData
165 
167 
168  static void SelectionModifiedCallback
169  ( vtkObject *, unsigned long, void * tpReader, void * );
171 
176  void Init();
177 
179  void GetDataArraysList();
180 
183  void ReadFile( vtkMultiBlockDataSet * multZone);
184 
186 
191  void GetArraysFromBlockPackingZone( int numNodes, int numCells,
192  vtkPoints * theNodes, vtkPointData * nodeData, vtkCellData * cellData );
194 
196 
202  void GetArraysFromPointPackingZone
203  ( int numNodes, vtkPoints * theNodes, vtkPointData * nodeData );
205 
207 
212  void GetStructuredGridFromBlockPackingZone( int iDimSize, int jDimSize,
213  int kDimSize, int zoneIndx, const char * zoneName,
214  vtkMultiBlockDataSet * multZone );
216 
218 
223  void GetStructuredGridFromPointPackingZone( int iDimSize, int jDimSize,
224  int kDimSize, int zoneIndx, const char * zoneName,
225  vtkMultiBlockDataSet * multZone );
227 
229 
234  void GetUnstructuredGridFromBlockPackingZone( int numNodes, int numCells,
235  const char * cellType, int zoneIndx, const char * zoneName,
236  vtkMultiBlockDataSet * multZone );
238 
240 
245  void GetUnstructuredGridFromPointPackingZone( int numNodes, int numCells,
246  const char * cellType,int zoneIndx, const char * zoneName,
247  vtkMultiBlockDataSet * multZone );
249 
251 
253  void GetUnstructuredGridCells( int numberCells, const char * cellTypeStr,
254  vtkUnstructuredGrid * unstrctGrid );
256 
258  char * FileName;
261  vtkTecplotReaderInternal * Internal;
262 
263  //BTX
265  vtkstd::vector< int > CellBased;
266  vtkstd::vector< vtkstd::string > ZoneNames;
267  vtkstd::vector< vtkstd::string > Variables;
268  //ETX
269 
270 private:
271 
272  vtkTecplotReader( const vtkTecplotReader & ); // Not implemented.
273  void operator = ( const vtkTecplotReader & ); // Not implemented.
274 };
275 
276 #endif
vtkCallbackCommand * SelectionObserver
abstract base class for most VTK objects
Definition: vtkObject.h:60
represent and manipulate point attribute data
Definition: vtkPointData.h:35
Store vtkAlgorithm input/output information.
vtkDataArraySelection * DataArraySelection
vtkstd::string DataTitle
represent and manipulate cell attribute data
Definition: vtkCellData.h:36
vtkstd::vector< vtkstd::string > ZoneNames
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
static vtkMultiBlockDataSetAlgorithm * New()
virtual int FillOutputPortInformation(int port, vtkInformation *info)
supports function callbacks
a simple class to control print indentation
Definition: vtkIndent.h:37
Store on/off settings for data arrays for a vtkSource.
dataset represents arbitrary combinations of all possible cell types
vtkTecplotReaderInternal * Internal
Composite dataset that organizes datasets into blocks.
void PrintSelf(ostream &os, vtkIndent indent)
Store zero or more vtkInformation instances.
#define VTK_IO_EXPORT
vtkstd::vector< int > CellBased
A concrete class to read an ASCII Tecplot file.
vtkstd::vector< vtkstd::string > Variables
represent and manipulate 3D points
Definition: vtkPoints.h:38
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)