VTK  9.1.0
vtkDataReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDataReader.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 =========================================================================*/
29 #ifndef vtkDataReader_h
30 #define vtkDataReader_h
31 
32 #include "vtkIOLegacyModule.h" // For export macro
33 #include "vtkSimpleReader.h"
34 #include "vtkStdString.h" // For API using strings
35 
36 #include <vtkSmartPointer.h> // for smart pointer
37 
38 #include <locale> // For locale settings
39 
40 #define VTK_ASCII 1
41 #define VTK_BINARY 2
42 
43 class vtkAbstractArray;
44 class vtkCharArray;
45 class vtkCellArray;
46 class vtkDataSet;
48 class vtkFieldData;
49 class vtkGraph;
50 class vtkPointSet;
51 class vtkRectilinearGrid;
52 class vtkTable;
53 
54 class VTKIOLEGACY_EXPORT vtkDataReader : public vtkSimpleReader
55 {
56 public:
57  enum FieldType
58  {
61  FIELD_DATA
62  };
63 
64  static vtkDataReader* New();
66  void PrintSelf(ostream& os, vtkIndent indent) override;
67 
69 
74  void SetFileName(VTK_FILEPATH const char* fname);
75  VTK_FILEPATH const char* GetFileName() const;
76  VTK_FILEPATH const char* GetFileName(int i) const
77  {
78  return this->vtkSimpleReader::GetFileName(i);
79  }
81 
83 
94  vtkGetMacro(FileVersion, int);
95  vtkGetMacro(FileMajorVersion, int);
96  vtkGetMacro(FileMinorVersion, int);
98 
100 
104  int IsFileValid(const char* dstype);
105  int IsFileStructuredPoints() { return this->IsFileValid("structured_points"); }
106  int IsFilePolyData() { return this->IsFileValid("polydata"); }
107  int IsFileStructuredGrid() { return this->IsFileValid("structured_grid"); }
108  int IsFileUnstructuredGrid() { return this->IsFileValid("unstructured_grid"); }
109  int IsFileRectilinearGrid() { return this->IsFileValid("rectilinear_grid"); }
111 
113 
119  void SetInputString(const char* in);
120  vtkGetStringMacro(InputString);
121  void SetInputString(const char* in, int len);
122  vtkGetMacro(InputStringLength, int);
123  void SetBinaryInputString(const char*, int len);
124  void SetInputString(const vtkStdString& input)
125  {
126  this->SetBinaryInputString(input.c_str(), static_cast<int>(input.length()));
127  }
129 
131 
139  virtual void SetInputArray(vtkCharArray*);
140  vtkGetObjectMacro(InputArray, vtkCharArray);
142 
144 
147  vtkGetStringMacro(Header);
149 
151 
155  vtkSetMacro(ReadFromInputString, vtkTypeBool);
156  vtkGetMacro(ReadFromInputString, vtkTypeBool);
157  vtkBooleanMacro(ReadFromInputString, vtkTypeBool);
159 
161 
165  vtkGetMacro(FileType, int);
167 
176  {
177  this->CharacterizeFile();
178  return this->NumberOfScalarsInFile;
179  }
181  {
182  this->CharacterizeFile();
183  return this->NumberOfVectorsInFile;
184  }
186  {
187  this->CharacterizeFile();
188  return this->NumberOfTensorsInFile;
189  }
191  {
192  this->CharacterizeFile();
193  return this->NumberOfNormalsInFile;
194  }
196  {
197  this->CharacterizeFile();
198  return this->NumberOfTCoordsInFile;
199  }
201  {
202  this->CharacterizeFile();
203  return this->NumberOfFieldDataInFile;
204  }
205 
207 
212  const char* GetScalarsNameInFile(int i);
213  const char* GetVectorsNameInFile(int i);
214  const char* GetTensorsNameInFile(int i);
215  const char* GetNormalsNameInFile(int i);
216  const char* GetTCoordsNameInFile(int i);
217  const char* GetFieldDataNameInFile(int i);
219 
221 
225  vtkSetStringMacro(ScalarsName);
226  vtkGetStringMacro(ScalarsName);
228 
230 
234  vtkSetStringMacro(VectorsName);
235  vtkGetStringMacro(VectorsName);
237 
239 
243  vtkSetStringMacro(TensorsName);
244  vtkGetStringMacro(TensorsName);
246 
248 
252  vtkSetStringMacro(NormalsName);
253  vtkGetStringMacro(NormalsName);
255 
257 
261  vtkSetStringMacro(TCoordsName);
262  vtkGetStringMacro(TCoordsName);
264 
266 
270  vtkSetStringMacro(LookupTableName);
271  vtkGetStringMacro(LookupTableName);
273 
275 
279  vtkSetStringMacro(FieldDataName);
280  vtkGetStringMacro(FieldDataName);
282 
284 
287  vtkSetMacro(ReadAllScalars, vtkTypeBool);
288  vtkGetMacro(ReadAllScalars, vtkTypeBool);
289  vtkBooleanMacro(ReadAllScalars, vtkTypeBool);
291 
293 
296  vtkSetMacro(ReadAllVectors, vtkTypeBool);
297  vtkGetMacro(ReadAllVectors, vtkTypeBool);
298  vtkBooleanMacro(ReadAllVectors, vtkTypeBool);
300 
302 
305  vtkSetMacro(ReadAllNormals, vtkTypeBool);
306  vtkGetMacro(ReadAllNormals, vtkTypeBool);
307  vtkBooleanMacro(ReadAllNormals, vtkTypeBool);
309 
311 
314  vtkSetMacro(ReadAllTensors, vtkTypeBool);
315  vtkGetMacro(ReadAllTensors, vtkTypeBool);
316  vtkBooleanMacro(ReadAllTensors, vtkTypeBool);
318 
320 
323  vtkSetMacro(ReadAllColorScalars, vtkTypeBool);
324  vtkGetMacro(ReadAllColorScalars, vtkTypeBool);
325  vtkBooleanMacro(ReadAllColorScalars, vtkTypeBool);
327 
329 
332  vtkSetMacro(ReadAllTCoords, vtkTypeBool);
333  vtkGetMacro(ReadAllTCoords, vtkTypeBool);
334  vtkBooleanMacro(ReadAllTCoords, vtkTypeBool);
336 
338 
341  vtkSetMacro(ReadAllFields, vtkTypeBool);
342  vtkGetMacro(ReadAllFields, vtkTypeBool);
343  vtkBooleanMacro(ReadAllFields, vtkTypeBool);
345 
349  int OpenVTKFile(VTK_FILEPATH const char* fname = nullptr);
350 
354  int ReadHeader(VTK_FILEPATH const char* fname = nullptr);
355 
361  int ReadCellData(vtkDataSet* ds, vtkIdType numCells);
362 
369 
374 
379 
385  int ReadVertexData(vtkGraph* g, vtkIdType numVertices);
386 
392  int ReadEdgeData(vtkGraph* g, vtkIdType numEdges);
393 
397  int ReadRowData(vtkTable* t, vtkIdType numEdges);
398 
405 
411 
415  int ReadCellsLegacy(vtkIdType size, int* data, int skip1, int read2, int skip3);
416 
421  int ReadCoordinates(vtkRectilinearGrid* rg, int axes, int numCoords);
422 
424 
427  vtkAbstractArray* ReadArray(const char* dataType, vtkIdType numTuples, vtkIdType numComp);
428  vtkFieldData* ReadFieldData(FieldType fieldType = FIELD_DATA);
430 
432 
436  int Read(char*);
437  int Read(unsigned char*);
438  int Read(short*);
439  int Read(unsigned short*);
440  int Read(int*);
441  int Read(unsigned int*);
442  int Read(long*);
443  int Read(unsigned long*);
444  int Read(long long* result);
445  int Read(unsigned long long* result);
446  int Read(float*);
447  int Read(double*);
449 
454  size_t Peek(char* str, size_t n);
455 
459  void CloseVTKFile();
460 
465  int ReadLine(char result[256]);
466 
471  int ReadString(char result[256]);
472 
476  char* LowerCase(char* str, const size_t len = 256);
477 
481  istream* GetIStream() { return this->IS; }
482 
484 
488  int ReadTimeDependentMetaData(int timestep, vtkInformation* metadata) override;
489  int ReadMesh(int piece, int npieces, int nghosts, int timestep, vtkDataObject* output) override;
490  int ReadPoints(int /*piece*/, int /*npieces*/, int /*nghosts*/, int /*timestep*/,
491  vtkDataObject* /*output*/) override
492  {
493  return 1;
494  }
495  int ReadArrays(int /*piece*/, int /*npieces*/, int /*nghosts*/, int /*timestep*/,
496  vtkDataObject* /*output*/) override
497  {
498  return 1;
499  }
501 
503 
508  int ReadMeshSimple(VTK_FILEPATH const std::string& /*fname*/, vtkDataObject* /*output*/) override
509  {
510  return 1;
511  }
513  VTK_FILEPATH const std::string& /*fname*/, vtkDataObject* /*output*/) override
514  {
515  return 1;
516  }
518  VTK_FILEPATH const std::string& /*fname*/, vtkDataObject* /*output*/) override
519  {
520  return 1;
521  }
523 
524 protected:
526  ~vtkDataReader() override;
527 
532  int FileType;
533  istream* IS;
534 
535  char* ScalarsName;
536  char* VectorsName;
537  char* TensorsName;
538  char* TCoordsName;
539  char* NormalsName;
542  char* ScalarLut;
543 
545  char* InputString;
548 
549  void SetScalarLut(const char* lut);
550  vtkGetStringMacro(ScalarLut);
551 
552  char* Header;
553 
564 
569 
571 
572  // This supports getting additional information from vtk files
592 
600 
601  std::locale CurrentLocale;
602 
604  int CharacterizeFile(); // read entire file, storing important characteristics
605  void CheckFor(const char* name, char* line, int& num, char**& array, int& allocSize);
606 
608 
614  int DecodeString(char* resname, const char* name);
615 
616 private:
617  vtkDataReader(const vtkDataReader&) = delete;
618  void operator=(const vtkDataReader&) = delete;
619 
620  void ConvertGhostLevelsToGhostType(FieldType fieldType, vtkAbstractArray* data) const;
621 };
622 
623 #endif
vtkDataReader::NormalsNameInFile
char ** NormalsNameInFile
Definition: vtkDataReader.h:586
vtkDataReader::TensorsName
char * TensorsName
Definition: vtkDataReader.h:537
vtkDataReader::ReadPedigreeIds
int ReadPedigreeIds(vtkDataSetAttributes *a, vtkIdType num)
vtkStdString.h
vtkDataReader::GetScalarsNameInFile
const char * GetScalarsNameInFile(int i)
What is the name of the ith attribute of a certain type in this file? This requires reading the file,...
vtkDataReader::CharacteristicsTime
vtkTimeStamp CharacteristicsTime
Definition: vtkDataReader.h:591
vtkDataReader::GetFileName
VTK_FILEPATH const char * GetFileName() const
Specify file name of vtk data file to read.
vtkDataReader::ReadCellsLegacy
int ReadCellsLegacy(vtkIdType size, int *data)
Read a bunch of "cells".
vtkDataReader::GetNumberOfFieldDataInFile
int GetNumberOfFieldDataInFile()
Definition: vtkDataReader.h:200
vtkDataReader::ReadAllTensors
vtkTypeBool ReadAllTensors
Definition: vtkDataReader.h:596
vtkDataReader::GetFieldDataNameInFile
const char * GetFieldDataNameInFile(int i)
What is the name of the ith attribute of a certain type in this file? This requires reading the file,...
vtkDataReader::ReadCellsLegacy
int ReadCellsLegacy(vtkIdType size, int *data, int skip1, int read2, int skip3)
Read a piece of the cells (for streaming compliance)
vtkDataReader::ReadFieldData
vtkFieldData * ReadFieldData(FieldType fieldType=FIELD_DATA)
Helper functions for reading data.
vtkDataReader::IS
istream * IS
Definition: vtkDataReader.h:533
vtkDataReader::NumberOfVectorsInFile
int NumberOfVectorsInFile
Definition: vtkDataReader.h:576
VTK_FILEPATH
#define VTK_FILEPATH
Definition: vtkWrappingHints.h:46
vtkIdType
int vtkIdType
Definition: vtkType.h:332
vtkDataReader
helper superclass for objects that read vtk data files
Definition: vtkDataReader.h:55
vtkDataReader::CharacterizeFile
int CharacterizeFile()
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:170
vtkX3D::data
@ data
Definition: vtkX3D.h:321
vtkRectilinearGrid
a dataset that is topologically regular with variable spacing in the three coordinate directions
Definition: vtkRectilinearGrid.h:151
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:172
vtkDataReader::ReadCoScalarData
int ReadCoScalarData(vtkDataSetAttributes *a, vtkIdType num)
vtkDataReader::FieldType
FieldType
Definition: vtkDataReader.h:58
vtkDataReader::FileVersion
int FileVersion
Definition: vtkDataReader.h:529
vtkDataReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:52
vtkDataReader::Read
int Read(int *)
Internal function to read in a value.
vtkDataReader::GetNumberOfVectorsInFile
int GetNumberOfVectorsInFile()
Definition: vtkDataReader.h:180
vtkDataReader::VectorsName
char * VectorsName
Definition: vtkDataReader.h:536
vtkDataReader::NormalsName
char * NormalsName
Definition: vtkDataReader.h:539
vtkDataReader::GetNumberOfTensorsInFile
int GetNumberOfTensorsInFile()
Definition: vtkDataReader.h:185
vtkDataReader::TCoordsName
char * TCoordsName
Definition: vtkDataReader.h:538
vtkDataReader::ReadAllColorScalars
vtkTypeBool ReadAllColorScalars
Definition: vtkDataReader.h:597
vtkSmartPointer< vtkCellArray >
vtkDataReader::Header
char * Header
Definition: vtkDataReader.h:550
vtkDataReader::ReadGlobalIds
int ReadGlobalIds(vtkDataSetAttributes *a, vtkIdType num)
vtkDataReader::ReadVertexData
int ReadVertexData(vtkGraph *g, vtkIdType numVertices)
Read the vertex data of a vtk data file.
vtkDataReader::NumberOfFieldDataInFile
int NumberOfFieldDataInFile
Definition: vtkDataReader.h:588
vtkDataReader::CELL_DATA
@ CELL_DATA
Definition: vtkDataReader.h:60
vtkDataReader::ReadEdgeFlags
int ReadEdgeFlags(vtkDataSetAttributes *a, vtkIdType num)
vtkDataReader::ScalarLut
char * ScalarLut
Definition: vtkDataReader.h:542
vtkDataReader::ReadVectorData
int ReadVectorData(vtkDataSetAttributes *a, vtkIdType num)
vtkDataReader::Read
int Read(float *)
Internal function to read in a value.
vtkDataReader::LookupTableName
char * LookupTableName
Definition: vtkDataReader.h:540
vtkDataReader::vtkDataReader
vtkDataReader()
vtkDataReader::ReadNormalData
int ReadNormalData(vtkDataSetAttributes *a, vtkIdType num)
vtkDataReader::FileType
int FileType
Definition: vtkDataReader.h:532
vtkDataReader::InputStringPos
int InputStringPos
Definition: vtkDataReader.h:547
vtkDataReader::Read
int Read(unsigned long *)
Internal function to read in a value.
vtkDataReader::ReadPointCoordinates
int ReadPointCoordinates(vtkGraph *g, vtkIdType numPts)
Read point coordinates.
vtkDataReader::ReadPoints
int ReadPoints(int, int, int, int, vtkDataObject *) override
Overridden to handle reading from a string.
Definition: vtkDataReader.h:490
vtkDataReader::ReadPointCoordinates
int ReadPointCoordinates(vtkPointSet *ps, vtkIdType numPts)
Read point coordinates.
vtkDataReader::ReadFromInputString
vtkTypeBool ReadFromInputString
Definition: vtkDataReader.h:544
vtkFieldData
represent and manipulate fields of data
Definition: vtkFieldData.h:164
vtkDataReader::GetIStream
istream * GetIStream()
Return the istream being used to read in the data.
Definition: vtkDataReader.h:481
vtkDataReader::GetTensorsNameInFile
const char * GetTensorsNameInFile(int i)
What is the name of the ith attribute of a certain type in this file? This requires reading the file,...
vtkDataReader::SetBinaryInputString
void SetBinaryInputString(const char *, int len)
Specify the InputString for use when reading from a character array.
vtkDataReader::ReadCoordinates
int ReadCoordinates(vtkRectilinearGrid *rg, int axes, int numCoords)
Read the coordinates for a rectilinear grid.
vtkDataReader::Read
int Read(unsigned char *)
Internal function to read in a value.
vtkDataReader::CurrentFileName
std::string CurrentFileName
Definition: vtkDataReader.h:528
vtkCharArray
dynamic, self-adjusting array of char
Definition: vtkCharArray.h:68
vtkDataReader::GetNumberOfNormalsInFile
int GetNumberOfNormalsInFile()
Definition: vtkDataReader.h:190
vtkDataReader::ReadTensorData
int ReadTensorData(vtkDataSetAttributes *a, vtkIdType num, vtkIdType numComp=9)
vtkDataReader::Peek
size_t Peek(char *str, size_t n)
Read n character from the stream into str, then reset the stream position.
vtkDataReader::ReadAllScalars
vtkTypeBool ReadAllScalars
Definition: vtkDataReader.h:593
vtkDataReader::VectorsNameInFile
char ** VectorsNameInFile
Definition: vtkDataReader.h:577
vtkDataReader::ReadArrays
int ReadArrays(int, int, int, int, vtkDataObject *) override
Overridden to handle reading from a string.
Definition: vtkDataReader.h:495
vtkDataReader::DecodeString
int DecodeString(char *resname, const char *name)
Decode a string.
vtkDataReader::ReadInformation
int ReadInformation(vtkInformation *info, vtkIdType numKeys)
Format is detailed here.
vtkDataReader::GetNumberOfTCoordsInFile
int GetNumberOfTCoordsInFile()
Definition: vtkDataReader.h:195
vtkDataReader::SetFileName
void SetFileName(VTK_FILEPATH const char *fname)
Specify file name of vtk data file to read.
vtkDataReader::SetInputString
void SetInputString(const char *in, int len)
Specify the InputString for use when reading from a character array.
vtkDataReader::ScalarsName
char * ScalarsName
Definition: vtkDataReader.h:535
vtkDataReader::ScalarsNameInFile
char ** ScalarsNameInFile
Definition: vtkDataReader.h:574
vtkSimpleReader::GetFileName
VTK_FILEPATH const char * GetFileName(int i) const
Returns a particular filename stored by the reader.
vtkDataReader::CheckFor
void CheckFor(const char *name, char *line, int &num, char **&array, int &allocSize)
vtkDataReader::InitializeCharacteristics
void InitializeCharacteristics()
vtkDataReader::ReadCellData
int ReadCellData(vtkDataSet *ds, vtkIdType numCells)
Read the cell data of a vtk data file.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkDataReader::New
static vtkDataReader * New()
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:290
vtkSmartPointer.h
vtkSimpleReader
Superclass for algorithms that are not time or parallel aware.
Definition: vtkSimpleReader.h:32
vtkSimpleReader.h
vtkDataReader::CurrentLocale
std::locale CurrentLocale
Definition: vtkDataReader.h:601
vtkX3D::size
@ size
Definition: vtkX3D.h:259
vtkDataReader::Read
int Read(unsigned int *)
Internal function to read in a value.
vtkDataReader::GetNormalsNameInFile
const char * GetNormalsNameInFile(int i)
What is the name of the ith attribute of a certain type in this file? This requires reading the file,...
vtkDataReader::ReadPointData
int ReadPointData(vtkDataSet *ds, vtkIdType numPts)
Read the point data of a vtk data file.
vtkDataReader::ReadLine
int ReadLine(char result[256])
Internal function to read in a line up to 256 characters.
vtkDataReader::InputString
char * InputString
Definition: vtkDataReader.h:545
vtkDataReader::TensorsNameInFile
char ** TensorsNameInFile
Definition: vtkDataReader.h:580
vtkDataReader::ScalarsNameAllocSize
int ScalarsNameAllocSize
Definition: vtkDataReader.h:575
vtkDataReader::IsFileValid
int IsFileValid(const char *dstype)
Is the file a valid vtk file of the passed dataset type ? The dataset type is passed as a lower case ...
vtkDataReader::InputStringLength
int InputStringLength
Definition: vtkDataReader.h:546
vtkDataReader::ReadArray
vtkAbstractArray * ReadArray(const char *dataType, vtkIdType numTuples, vtkIdType numComp)
Helper functions for reading data.
vtkX3D::name
@ name
Definition: vtkX3D.h:225
vtkDataReader::POINT_DATA
@ POINT_DATA
Definition: vtkDataReader.h:59
vtkDataReader::ReadDataSetData
int ReadDataSetData(vtkDataSet *ds)
vtkDataReader::IsFilePolyData
int IsFilePolyData()
Is the file a valid vtk file of the passed dataset type ? The dataset type is passed as a lower case ...
Definition: vtkDataReader.h:106
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:76
vtkDataReader::OpenVTKFile
int OpenVTKFile(VTK_FILEPATH const char *fname=nullptr)
Open a vtk data file.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkDataReader::GetFileName
VTK_FILEPATH const char * GetFileName(int i) const
Specify file name of vtk data file to read.
Definition: vtkDataReader.h:76
vtkDataReader::IsFileUnstructuredGrid
int IsFileUnstructuredGrid()
Is the file a valid vtk file of the passed dataset type ? The dataset type is passed as a lower case ...
Definition: vtkDataReader.h:108
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkX3D::string
@ string
Definition: vtkX3D.h:496
vtkDataReader::CloseVTKFile
void CloseVTKFile()
Close the vtk file.
vtkDataReader::TCoordsNameAllocSize
int TCoordsNameAllocSize
Definition: vtkDataReader.h:584
vtkDataReader::ReadMesh
int ReadMesh(int piece, int npieces, int nghosts, int timestep, vtkDataObject *output) override
Overridden to handle reading from a string.
vtkDataReader::ReadPointsSimple
int ReadPointsSimple(VTK_FILEPATH const std::string &, vtkDataObject *) override
Overridden with default implementation of doing nothing so that subclasses only override what is need...
Definition: vtkDataReader.h:512
vtkDataReader::SetScalarLut
void SetScalarLut(const char *lut)
vtkDataReader::ReadLutData
int ReadLutData(vtkDataSetAttributes *a)
vtkDataReader::ReadAllTCoords
vtkTypeBool ReadAllTCoords
Definition: vtkDataReader.h:598
IS
#define IS
Definition: vtkVRMLImporter_Yacc.h:562
vtkDataReader::InputArray
vtkCharArray * InputArray
Definition: vtkDataReader.h:607
vtkDataReader::FieldDataNameAllocSize
int FieldDataNameAllocSize
Definition: vtkDataReader.h:590
vtkDataReader::Read
int Read(double *)
Internal function to read in a value.
vtkDataReader::ReadTimeDependentMetaData
int ReadTimeDependentMetaData(int timestep, vtkInformation *metadata) override
Overridden to handle reading from a string.
vtkPointSet
concrete class for storing a set of points
Definition: vtkPointSet.h:106
vtkDataReader::VectorsNameAllocSize
int VectorsNameAllocSize
Definition: vtkDataReader.h:578
vtkDataReader::ReadString
int ReadString(char result[256])
Internal function to read in a string up to 256 characters.
vtkDataReader::GetTCoordsNameInFile
const char * GetTCoordsNameInFile(int i)
What is the name of the ith attribute of a certain type in this file? This requires reading the file,...
vtkDataReader::ReadAllFields
vtkTypeBool ReadAllFields
Definition: vtkDataReader.h:599
vtkDataReader::IsFileStructuredPoints
int IsFileStructuredPoints()
Is the file a valid vtk file of the passed dataset type ? The dataset type is passed as a lower case ...
Definition: vtkDataReader.h:105
vtkDataReader::IsFileStructuredGrid
int IsFileStructuredGrid()
Is the file a valid vtk file of the passed dataset type ? The dataset type is passed as a lower case ...
Definition: vtkDataReader.h:107
vtkDataReader::NumberOfScalarsInFile
int NumberOfScalarsInFile
Definition: vtkDataReader.h:573
vtkDataReader::ReadTCoordsData
int ReadTCoordsData(vtkDataSetAttributes *a, vtkIdType num)
vtkDataReader::FileMajorVersion
int FileMajorVersion
Definition: vtkDataReader.h:530
vtkDataReader::SetInputString
void SetInputString(const vtkStdString &input)
Specify the InputString for use when reading from a character array.
Definition: vtkDataReader.h:124
vtkDataReader::TensorsNameAllocSize
int TensorsNameAllocSize
Definition: vtkDataReader.h:581
vtkDataReader::ReadAllVectors
vtkTypeBool ReadAllVectors
Definition: vtkDataReader.h:594
vtkDataReader::FileMinorVersion
int FileMinorVersion
Definition: vtkDataReader.h:531
vtkDataReader::IsFileRectilinearGrid
int IsFileRectilinearGrid()
Is the file a valid vtk file of the passed dataset type ? The dataset type is passed as a lower case ...
Definition: vtkDataReader.h:109
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:105
vtkGraph
Base class for graph data types.
Definition: vtkGraph.h:339
vtkDataReader::ReadMeshSimple
int ReadMeshSimple(VTK_FILEPATH const std::string &, vtkDataObject *) override
Overridden with default implementation of doing nothing so that subclasses only override what is need...
Definition: vtkDataReader.h:508
vtkDataReader::Read
int Read(short *)
Internal function to read in a value.
vtkDataReader::Read
int Read(char *)
Internal function to read in a value.
vtkDataReader::ReadArraysSimple
int ReadArraysSimple(VTK_FILEPATH const std::string &, vtkDataObject *) override
Overridden with default implementation of doing nothing so that subclasses only override what is need...
Definition: vtkDataReader.h:517
vtkDataReader::FieldDataNameInFile
char ** FieldDataNameInFile
Definition: vtkDataReader.h:589
vtkDataReader::ReadAllNormals
vtkTypeBool ReadAllNormals
Definition: vtkDataReader.h:595
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:169
vtkDataReader::ReadEdgeData
int ReadEdgeData(vtkGraph *g, vtkIdType numEdges)
Read the edge data of a vtk data file.
vtkDataReader::NumberOfTensorsInFile
int NumberOfTensorsInFile
Definition: vtkDataReader.h:579
vtkDataReader::GetVectorsNameInFile
const char * GetVectorsNameInFile(int i)
What is the name of the ith attribute of a certain type in this file? This requires reading the file,...
vtkDataReader::Read
int Read(unsigned short *)
Internal function to read in a value.
vtkDataReader::GetNumberOfScalarsInFile
int GetNumberOfScalarsInFile()
How many attributes of various types are in this file? This requires reading the file,...
Definition: vtkDataReader.h:175
vtkDataReader::Read
int Read(long *)
Internal function to read in a value.
vtkDataReader::Read
int Read(unsigned long long *result)
Internal function to read in a value.
vtkDataReader::LowerCase
char * LowerCase(char *str, const size_t len=256)
Helper method for reading in data.
vtkDataReader::TCoordsNameInFile
char ** TCoordsNameInFile
Definition: vtkDataReader.h:583
vtkDataReader::ReadScalarData
int ReadScalarData(vtkDataSetAttributes *a, vtkIdType num)
vtkDataReader::SetInputArray
virtual void SetInputArray(vtkCharArray *)
Specify the vtkCharArray to be used when reading from a string.
vtkDataReader::SetInputString
void SetInputString(const char *in)
Specify the InputString for use when reading from a character array.
vtkDataReader::ReadRowData
int ReadRowData(vtkTable *t, vtkIdType numEdges)
Read the row data of a vtk data file.
vtkDataReader::ReadHeader
int ReadHeader(VTK_FILEPATH const char *fname=nullptr)
Read the header of a vtk data file.
vtkDataReader::NumberOfNormalsInFile
int NumberOfNormalsInFile
Definition: vtkDataReader.h:585
vtkDataReader::ReadCells
int ReadCells(vtkSmartPointer< vtkCellArray > &cellArray)
Read cells in a vtkCellArray, and update the smartpointer reference passed in.
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkDataReader::Read
int Read(long long *result)
Internal function to read in a value.
vtkDataReader::NormalsNameAllocSize
int NormalsNameAllocSize
Definition: vtkDataReader.h:587
vtkDataReader::FieldDataName
char * FieldDataName
Definition: vtkDataReader.h:541
vtkDataReader::~vtkDataReader
~vtkDataReader() override
vtkDataReader::NumberOfTCoordsInFile
int NumberOfTCoordsInFile
Definition: vtkDataReader.h:582