VTK: IO/Legacy/vtkDataReader.h Source File

| VTK 9.3.1

vtkDataReader.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
17 #ifndef vtkDataReader_h
18 #define vtkDataReader_h
19
20 #include "vtkIOLegacyModule.h" // For export macro
21 #include "vtkSimpleReader.h"
22 #include "vtkStdString.h" // For API using strings
23
24 #include <vtkSmartPointer.h> // for smart pointer
25
26 #include <locale> // For locale settings
27
28 #define VTK_ASCII 1
29 #define VTK_BINARY 2
30
31 VTK_ABI_NAMESPACE_BEGIN
32 class vtkAbstractArray;
33 class vtkCharArray;
34 class vtkCellArray;
35 class vtkDataSet;
36 class vtkDataSetAttributes;
37 class vtkFieldData;
38 class vtkGraph;
39 class vtkPointSet;
40 class vtkRectilinearGrid;
41 class vtkTable;
42
43 class VTKIOLEGACY_EXPORT vtkDataReader : public vtkSimpleReader
44 {
45 public:
46 enum FieldType
47 {
48 POINT_DATA,
49 CELL_DATA,
50 FIELD_DATA
51 };
52
53 static vtkDataReader* New();
54 vtkTypeMacro(vtkDataReader, vtkSimpleReader);
55 void PrintSelf(ostream& os, vtkIndent indent) override;
56
58
63 void SetFileName(VTK_FILEPATH const char* fname);
64 VTK_FILEPATH const char* GetFileName() const;
65 VTK_FILEPATH const char* GetFileName(int i) const
66 {
67 return this->vtkSimpleReader::GetFileName(i);
68 }
70
72
83 vtkGetMacro(FileVersion, int);
84 vtkGetMacro(FileMajorVersion, int);
85 vtkGetMacro(FileMinorVersion, int);
87
89
93 int IsFileValid(const char* dstype);
94 int IsFileStructuredPoints() { return this->IsFileValid("structured_points"); }
95 int IsFilePolyData() { return this->IsFileValid("polydata"); }
96 int IsFileStructuredGrid() { return this->IsFileValid("structured_grid"); }
97 int IsFileUnstructuredGrid() { return this->IsFileValid("unstructured_grid"); }
98 int IsFileRectilinearGrid() { return this->IsFileValid("rectilinear_grid"); }
100
102
108 void SetInputString(const char* in);
109 vtkGetStringMacro(InputString);
110 void SetInputString(const char* in, int len);
111 vtkGetMacro(InputStringLength, int);
112 void SetBinaryInputString(const char*, int len);
113 void SetInputString(const vtkStdString& input)
114 {
115 this->SetBinaryInputString(input.c_str(), static_cast<int>(input.length()));
116 }
118
120
128 virtual void SetInputArray(vtkCharArray*);
129 vtkGetObjectMacro(InputArray, vtkCharArray);
131
133
136 vtkGetStringMacro(Header);
138
140
144 vtkSetMacro(ReadFromInputString, vtkTypeBool);
145 vtkGetMacro(ReadFromInputString, vtkTypeBool);
146 vtkBooleanMacro(ReadFromInputString, vtkTypeBool);
148
150
154 vtkGetMacro(FileType, int);
156
164 int GetNumberOfScalarsInFile()
165 {
166 this->CharacterizeFile();
167 return this->NumberOfScalarsInFile;
168 }
169 int GetNumberOfVectorsInFile()
170 {
171 this->CharacterizeFile();
172 return this->NumberOfVectorsInFile;
173 }
174 int GetNumberOfTensorsInFile()
175 {
176 this->CharacterizeFile();
177 return this->NumberOfTensorsInFile;
178 }
179 int GetNumberOfNormalsInFile()
180 {
181 this->CharacterizeFile();
182 return this->NumberOfNormalsInFile;
183 }
184 int GetNumberOfTCoordsInFile()
185 {
186 this->CharacterizeFile();
187 return this->NumberOfTCoordsInFile;
188 }
189 int GetNumberOfFieldDataInFile()
190 {
191 this->CharacterizeFile();
192 return this->NumberOfFieldDataInFile;
193 }
194
196
201 const char* GetScalarsNameInFile(int i);
202 const char* GetVectorsNameInFile(int i);
203 const char* GetTensorsNameInFile(int i);
204 const char* GetNormalsNameInFile(int i);
205 const char* GetTCoordsNameInFile(int i);
206 const char* GetFieldDataNameInFile(int i);
208
210
214 vtkSetStringMacro(ScalarsName);
215 vtkGetStringMacro(ScalarsName);
217
219
223 vtkSetStringMacro(VectorsName);
224 vtkGetStringMacro(VectorsName);
226
228
232 vtkSetStringMacro(TensorsName);
233 vtkGetStringMacro(TensorsName);
235
237
241 vtkSetStringMacro(NormalsName);
242 vtkGetStringMacro(NormalsName);
244
246
250 vtkSetStringMacro(TCoordsName);
251 vtkGetStringMacro(TCoordsName);
253
255
259 vtkSetStringMacro(LookupTableName);
260 vtkGetStringMacro(LookupTableName);
262
264
268 vtkSetStringMacro(FieldDataName);
269 vtkGetStringMacro(FieldDataName);
271
273
276 vtkSetMacro(ReadAllScalars, vtkTypeBool);
277 vtkGetMacro(ReadAllScalars, vtkTypeBool);
278 vtkBooleanMacro(ReadAllScalars, vtkTypeBool);
280
282
285 vtkSetMacro(ReadAllVectors, vtkTypeBool);
286 vtkGetMacro(ReadAllVectors, vtkTypeBool);
287 vtkBooleanMacro(ReadAllVectors, vtkTypeBool);
289
291
294 vtkSetMacro(ReadAllNormals, vtkTypeBool);
295 vtkGetMacro(ReadAllNormals, vtkTypeBool);
296 vtkBooleanMacro(ReadAllNormals, vtkTypeBool);
298
300
303 vtkSetMacro(ReadAllTensors, vtkTypeBool);
304 vtkGetMacro(ReadAllTensors, vtkTypeBool);
305 vtkBooleanMacro(ReadAllTensors, vtkTypeBool);
307
309
312 vtkSetMacro(ReadAllColorScalars, vtkTypeBool);
313 vtkGetMacro(ReadAllColorScalars, vtkTypeBool);
314 vtkBooleanMacro(ReadAllColorScalars, vtkTypeBool);
316
318
321 vtkSetMacro(ReadAllTCoords, vtkTypeBool);
322 vtkGetMacro(ReadAllTCoords, vtkTypeBool);
323 vtkBooleanMacro(ReadAllTCoords, vtkTypeBool);
325
327
330 vtkSetMacro(ReadAllFields, vtkTypeBool);
331 vtkGetMacro(ReadAllFields, vtkTypeBool);
332 vtkBooleanMacro(ReadAllFields, vtkTypeBool);
334
338 int OpenVTKFile(VTK_FILEPATH const char* fname = nullptr);
339
343 int ReadHeader(VTK_FILEPATH const char* fname = nullptr);
344
350 int ReadCellData(vtkDataSet* ds, vtkIdType numCells);
351
357 int ReadPointData(vtkDataSet* ds, vtkIdType numPts);
358
362 int ReadPointCoordinates(vtkPointSet* ps, vtkIdType numPts);
363
367 int ReadPointCoordinates(vtkGraph* g, vtkIdType numPts);
368
374 int ReadVertexData(vtkGraph* g, vtkIdType numVertices);
375
381 int ReadEdgeData(vtkGraph* g, vtkIdType numEdges);
382
386 int ReadRowData(vtkTable* t, vtkIdType numEdges);
387
393 int ReadCells(vtkSmartPointer<vtkCellArray>& cellArray);
394
399 int ReadCellsLegacy(vtkIdType size, int* data);
400
404 int ReadCellsLegacy(vtkIdType size, int* data, int skip1, int read2, int skip3);
405
410 int ReadCoordinates(vtkRectilinearGrid* rg, int axes, int numCoords);
411
413
416 vtkAbstractArray* ReadArray(const char* dataType, vtkIdType numTuples, vtkIdType numComp);
417 vtkFieldData* ReadFieldData(FieldType fieldType = FIELD_DATA);
419
421
425 int Read(char*);
426 int Read(unsigned char*);
427 int Read(short*);
428 int Read(unsigned short*);
429 int Read(int*);
430 int Read(unsigned int*);
431 int Read(long*);
432 int Read(unsigned long*);
433 int Read(long long* result);
434 int Read(unsigned long long* result);
435 int Read(float*);
436 int Read(double*);
438
443 size_t Peek(char* str, size_t n);
444
448 void CloseVTKFile();
449
454 int ReadLine(char result[256]);
455
460 int ReadString(char (&result)[256]);
461
465 char* LowerCase(char* str, size_t len = 256);
466
470 istream* GetIStream() { return this->IS; }
471
473
477 int ReadTimeDependentMetaData(int timestep, vtkInformation* metadata) override;
478 int ReadMesh(int piece, int npieces, int nghosts, int timestep, vtkDataObject* output) override;
479 int ReadPoints(int /*piece*/, int /*npieces*/, int /*nghosts*/, int /*timestep*/,
480 vtkDataObject* /*output*/) override
481 {
482 return 1;
483 }
484 int ReadArrays(int /*piece*/, int /*npieces*/, int /*nghosts*/, int /*timestep*/,
485 vtkDataObject* /*output*/) override
486 {
487 return 1;
488 }
490
492
497 int ReadMeshSimple(VTK_FILEPATH const std::string& /*fname*/, vtkDataObject* /*output*/) override
498 {
499 return 1;
500 }
501 int ReadPointsSimple(
502 VTK_FILEPATH const std::string& /*fname*/, vtkDataObject* /*output*/) override
503 {
504 return 1;
505 }
506 int ReadArraysSimple(
507 VTK_FILEPATH const std::string& /*fname*/, vtkDataObject* /*output*/) override
508 {
509 return 1;
510 }
512
513 protected:
514 vtkDataReader();
515 ~vtkDataReader() override;
516
517 std::string CurrentFileName;
518 int FileVersion;
519 int FileMajorVersion;
520 int FileMinorVersion;
521 int FileType;
522 istream* IS;
523
524 char* ScalarsName;
525 char* VectorsName;
526 char* TensorsName;
527 char* TCoordsName;
528 char* NormalsName;
529 char* LookupTableName;
530 char* FieldDataName;
531 char* ScalarLut;
532
533 vtkTypeBool ReadFromInputString;
534 char* InputString;
535 int InputStringLength;
536 int InputStringPos;
537
538 void SetScalarLut(const char* lut);
539 vtkGetStringMacro(ScalarLut);
540
541 char* Header;
542
543 int ReadScalarData(vtkDataSetAttributes* a, vtkIdType num);
544 int ReadVectorData(vtkDataSetAttributes* a, vtkIdType num);
545 int ReadNormalData(vtkDataSetAttributes* a, vtkIdType num);
546 int ReadTensorData(vtkDataSetAttributes* a, vtkIdType num, vtkIdType numComp = 9);
547 int ReadCoScalarData(vtkDataSetAttributes* a, vtkIdType num);
548 int ReadLutData(vtkDataSetAttributes* a);
549 int ReadTCoordsData(vtkDataSetAttributes* a, vtkIdType num);
550 int ReadGlobalIds(vtkDataSetAttributes* a, vtkIdType num);
551 int ReadPedigreeIds(vtkDataSetAttributes* a, vtkIdType num);
552 int ReadEdgeFlags(vtkDataSetAttributes* a, vtkIdType num);
553
558 int ReadInformation(vtkInformation* info, vtkIdType numKeys);
559
560 int ReadDataSetData(vtkDataSet* ds);
561
562 // This supports getting additional information from vtk files
563 int NumberOfScalarsInFile;
564 char** ScalarsNameInFile;
565 int ScalarsNameAllocSize;
566 int NumberOfVectorsInFile;
567 char** VectorsNameInFile;
568 int VectorsNameAllocSize;
569 int NumberOfTensorsInFile;
570 char** TensorsNameInFile;
571 int TensorsNameAllocSize;
572 int NumberOfTCoordsInFile;
573 char** TCoordsNameInFile;
574 int TCoordsNameAllocSize;
575 int NumberOfNormalsInFile;
576 char** NormalsNameInFile;
577 int NormalsNameAllocSize;
578 int NumberOfFieldDataInFile;
579 char** FieldDataNameInFile;
580 int FieldDataNameAllocSize;
581 vtkTimeStamp CharacteristicsTime;
582
583 vtkTypeBool ReadAllScalars;
584 vtkTypeBool ReadAllVectors;
585 vtkTypeBool ReadAllNormals;
586 vtkTypeBool ReadAllTensors;
587 vtkTypeBool ReadAllColorScalars;
588 vtkTypeBool ReadAllTCoords;
589 vtkTypeBool ReadAllFields;
590
591 std::locale CurrentLocale;
592
593 void InitializeCharacteristics();
594 int CharacterizeFile(); // read entire file, storing important characteristics
595 void CheckFor(const char* name, char* line, int& num, char**& array, int& allocSize);
596
597 vtkCharArray* InputArray;
598
604 int DecodeString(char* resname, const char* name);
605
606 private:
607 vtkDataReader(const vtkDataReader&) = delete;
608 void operator=(const vtkDataReader&) = delete;
609
610 void ConvertGhostLevelsToGhostType(FieldType fieldType, vtkAbstractArray* data) const;
611 };
612
613 VTK_ABI_NAMESPACE_END
614 #endif
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:76
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:185
vtkCharArray
dynamic, self-adjusting array of char
Definition: vtkCharArray.h:50
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:64
vtkDataReader
helper superclass for objects that read vtk data files
Definition: vtkDataReader.h:44
vtkDataReader::InputString
char * InputString
Definition: vtkDataReader.h:534
vtkDataReader::ReadVectorData
int ReadVectorData(vtkDataSetAttributes *a, vtkIdType num)
vtkDataReader::Header
char * Header
Definition: vtkDataReader.h:539
vtkDataReader::Read
int Read(char *)
Internal function to read in a value.
vtkDataReader::ReadRowData
int ReadRowData(vtkTable *t, vtkIdType numEdges)
Read the row data of a vtk data file.
vtkDataReader::Read
int Read(unsigned long long *result)
Internal function to read in a value.
vtkDataReader::GetNumberOfVectorsInFile
int GetNumberOfVectorsInFile()
Definition: vtkDataReader.h:169
vtkDataReader::SetScalarLut
void SetScalarLut(const char *lut)
vtkDataReader::SetInputArray
virtual void SetInputArray(vtkCharArray *)
Specify the vtkCharArray to be used when reading from a string.
vtkDataReader::ReadPointCoordinates
int ReadPointCoordinates(vtkPointSet *ps, vtkIdType numPts)
Read point coordinates.
vtkDataReader::NormalsNameInFile
char ** NormalsNameInFile
Definition: vtkDataReader.h:576
vtkDataReader::GetFileName
VTK_FILEPATH const char * GetFileName() const
Specify file name of vtk data file to read.
vtkDataReader::ReadMesh
int ReadMesh(int piece, int npieces, int nghosts, int timestep, vtkDataObject *output) override
Overridden to handle reading from a string.
vtkDataReader::Read
int Read(unsigned short *)
Internal function to read in a value.
vtkDataReader::ReadCells
int ReadCells(vtkSmartPointer< vtkCellArray > &cellArray)
Read cells in a vtkCellArray, and update the smartpointer reference passed in.
vtkDataReader::ReadHeader
int ReadHeader(VTK_FILEPATH const char *fname=nullptr)
Read the header of a vtk data file.
vtkDataReader::CheckFor
void CheckFor(const char *name, char *line, int &num, char **&array, int &allocSize)
vtkDataReader::ReadCoScalarData
int ReadCoScalarData(vtkDataSetAttributes *a, vtkIdType num)
vtkDataReader::TCoordsNameAllocSize
int TCoordsNameAllocSize
Definition: vtkDataReader.h:574
vtkDataReader::ScalarsNameAllocSize
int ScalarsNameAllocSize
Definition: vtkDataReader.h:565
vtkDataReader::ReadTimeDependentMetaData
int ReadTimeDependentMetaData(int timestep, vtkInformation *metadata) override
Overridden to handle reading from a string.
vtkDataReader::VectorsName
char * VectorsName
Definition: vtkDataReader.h:525
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:98
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::ReadAllVectors
vtkTypeBool ReadAllVectors
Definition: vtkDataReader.h:584
vtkDataReader::SetInputString
void SetInputString(const char *in)
Specify the InputString for use when reading from a character array.
vtkDataReader::ReadAllTensors
vtkTypeBool ReadAllTensors
Definition: vtkDataReader.h:586
vtkDataReader::Read
int Read(short *)
Internal function to read in a value.
vtkDataReader::NumberOfTensorsInFile
int NumberOfTensorsInFile
Definition: vtkDataReader.h:569
vtkDataReader::CharacteristicsTime
vtkTimeStamp CharacteristicsTime
Definition: vtkDataReader.h:581
vtkDataReader::ReadDataSetData
int ReadDataSetData(vtkDataSet *ds)
vtkDataReader::ReadCoordinates
int ReadCoordinates(vtkRectilinearGrid *rg, int axes, int numCoords)
Read the coordinates for a rectilinear grid.
vtkDataReader::Read
int Read(long *)
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:506
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::FileMajorVersion
int FileMajorVersion
Definition: vtkDataReader.h:519
vtkDataReader::TensorsNameInFile
char ** TensorsNameInFile
Definition: vtkDataReader.h:570
vtkDataReader::TCoordsName
char * TCoordsName
Definition: vtkDataReader.h:527
vtkDataReader::InitializeCharacteristics
void InitializeCharacteristics()
vtkDataReader::Read
int Read(unsigned long *)
Internal function to read in a value.
vtkDataReader::ReadFieldData
vtkFieldData * ReadFieldData(FieldType fieldType=FIELD_DATA)
Helper functions for reading data.
vtkDataReader::DecodeString
int DecodeString(char *resname, const char *name)
Decode a string.
vtkDataReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDataReader::SetBinaryInputString
void SetBinaryInputString(const char *, int len)
Specify the InputString for use when reading from a character array.
vtkDataReader::ReadPointData
int ReadPointData(vtkDataSet *ds, vtkIdType numPts)
Read the point data of a vtk data file.
vtkDataReader::ReadCellsLegacy
int ReadCellsLegacy(vtkIdType size, int *data)
Read a bunch of "cells".
vtkDataReader::SetInputString
void SetInputString(const char *in, int len)
Specify the InputString for use when reading from a character array.
vtkDataReader::NumberOfVectorsInFile
int NumberOfVectorsInFile
Definition: vtkDataReader.h:566
vtkDataReader::Read
int Read(float *)
Internal function to read in a value.
vtkDataReader::NormalsName
char * NormalsName
Definition: vtkDataReader.h:528
vtkDataReader::GetNumberOfTensorsInFile
int GetNumberOfTensorsInFile()
Definition: vtkDataReader.h:174
vtkDataReader::ReadAllNormals
vtkTypeBool ReadAllNormals
Definition: vtkDataReader.h:585
vtkDataReader::CharacterizeFile
int CharacterizeFile()
vtkDataReader::ReadEdgeData
int ReadEdgeData(vtkGraph *g, vtkIdType numEdges)
Read the edge data of a vtk data file.
vtkDataReader::ReadPointCoordinates
int ReadPointCoordinates(vtkGraph *g, vtkIdType numPts)
Read point coordinates.
vtkDataReader::FieldType
FieldType
Definition: vtkDataReader.h:47
vtkDataReader::POINT_DATA
@ POINT_DATA
Definition: vtkDataReader.h:48
vtkDataReader::CELL_DATA
@ CELL_DATA
Definition: vtkDataReader.h:49
vtkDataReader::ReadArrays
int ReadArrays(int, int, int, int, vtkDataObject *) override
Overridden to handle reading from a string.
Definition: vtkDataReader.h:484
vtkDataReader::Read
int Read(double *)
Internal function to read in a value.
vtkDataReader::InputStringPos
int InputStringPos
Definition: vtkDataReader.h:536
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::NormalsNameAllocSize
int NormalsNameAllocSize
Definition: vtkDataReader.h:577
vtkDataReader::FileMinorVersion
int FileMinorVersion
Definition: vtkDataReader.h:520
vtkDataReader::ReadScalarData
int ReadScalarData(vtkDataSetAttributes *a, vtkIdType num)
vtkDataReader::ReadAllFields
vtkTypeBool ReadAllFields
Definition: vtkDataReader.h:589
vtkDataReader::GetFileName
VTK_FILEPATH const char * GetFileName(int i) const
Specify file name of vtk data file to read.
Definition: vtkDataReader.h:65
vtkDataReader::CurrentFileName
std::string CurrentFileName
Definition: vtkDataReader.h:517
vtkDataReader::LowerCase
char * LowerCase(char *str, size_t len=256)
Helper method for reading in data.
vtkDataReader::Read
int Read(int *)
Internal function to read in a value.
vtkDataReader::CurrentLocale
std::locale CurrentLocale
Definition: vtkDataReader.h:591
vtkDataReader::ReadCellData
int ReadCellData(vtkDataSet *ds, vtkIdType numCells)
Read the cell data of a vtk data file.
vtkDataReader::LookupTableName
char * LookupTableName
Definition: vtkDataReader.h:529
vtkDataReader::ReadArray
vtkAbstractArray * ReadArray(const char *dataType, vtkIdType numTuples, vtkIdType numComp)
Helper functions for reading data.
vtkDataReader::ReadAllColorScalars
vtkTypeBool ReadAllColorScalars
Definition: vtkDataReader.h:587
vtkDataReader::CloseVTKFile
void CloseVTKFile()
Close the vtk file.
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:501
vtkDataReader::TensorsName
char * TensorsName
Definition: vtkDataReader.h:526
vtkDataReader::ReadFromInputString
vtkTypeBool ReadFromInputString
Definition: vtkDataReader.h:533
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:96
vtkDataReader::GetNumberOfNormalsInFile
int GetNumberOfNormalsInFile()
Definition: vtkDataReader.h:179
vtkDataReader::NumberOfNormalsInFile
int NumberOfNormalsInFile
Definition: vtkDataReader.h:575
vtkDataReader::ScalarsNameInFile
char ** ScalarsNameInFile
Definition: vtkDataReader.h:564
vtkDataReader::TensorsNameAllocSize
int TensorsNameAllocSize
Definition: vtkDataReader.h:571
vtkDataReader::ReadString
int ReadString(char(&result)[256])
Internal function to read in a string up to 256 characters.
vtkDataReader::InputStringLength
int InputStringLength
Definition: vtkDataReader.h:535
vtkDataReader::FieldDataName
char * FieldDataName
Definition: vtkDataReader.h:530
vtkDataReader::NumberOfScalarsInFile
int NumberOfScalarsInFile
Definition: vtkDataReader.h:563
vtkDataReader::ReadAllTCoords
vtkTypeBool ReadAllTCoords
Definition: vtkDataReader.h:588
vtkDataReader::OpenVTKFile
int OpenVTKFile(VTK_FILEPATH const char *fname=nullptr)
Open a vtk data file.
vtkDataReader::SetFileName
void SetFileName(VTK_FILEPATH const char *fname)
Specify file name of vtk data file to read.
vtkDataReader::FileType
int FileType
Definition: vtkDataReader.h:521
vtkDataReader::ReadPoints
int ReadPoints(int, int, int, int, vtkDataObject *) override
Overridden to handle reading from a string.
Definition: vtkDataReader.h:479
vtkDataReader::ReadLine
int ReadLine(char result[256])
Internal function to read in a line up to 256 characters.
vtkDataReader::ReadLutData
int ReadLutData(vtkDataSetAttributes *a)
vtkDataReader::ReadVertexData
int ReadVertexData(vtkGraph *g, vtkIdType numVertices)
Read the vertex data of a vtk data file.
vtkDataReader::Peek
size_t Peek(char *str, size_t n)
Read n character from the stream into str, then reset the stream position.
vtkDataReader::FieldDataNameInFile
char ** FieldDataNameInFile
Definition: vtkDataReader.h:579
vtkDataReader::vtkDataReader
vtkDataReader()
vtkDataReader::Read
int Read(unsigned int *)
Internal function to read in a value.
vtkDataReader::VectorsNameAllocSize
int VectorsNameAllocSize
Definition: vtkDataReader.h:568
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::IS
istream * IS
Definition: vtkDataReader.h:522
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::~vtkDataReader
~vtkDataReader() override
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:497
vtkDataReader::ScalarsName
char * ScalarsName
Definition: vtkDataReader.h:524
vtkDataReader::New
static vtkDataReader * New()
vtkDataReader::ReadEdgeFlags
int ReadEdgeFlags(vtkDataSetAttributes *a, vtkIdType num)
vtkDataReader::NumberOfFieldDataInFile
int NumberOfFieldDataInFile
Definition: vtkDataReader.h:578
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:94
vtkDataReader::ReadAllScalars
vtkTypeBool ReadAllScalars
Definition: vtkDataReader.h:583
vtkDataReader::GetNumberOfTCoordsInFile
int GetNumberOfTCoordsInFile()
Definition: vtkDataReader.h:184
vtkDataReader::GetNumberOfFieldDataInFile
int GetNumberOfFieldDataInFile()
Definition: vtkDataReader.h:189
vtkDataReader::Read
int Read(unsigned char *)
Internal function to read in a value.
vtkDataReader::ReadCellsLegacy
int ReadCellsLegacy(vtkIdType size, int *data, int skip1, int read2, int skip3)
Read a piece of the cells (for streaming compliance)
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::VectorsNameInFile
char ** VectorsNameInFile
Definition: vtkDataReader.h:567
vtkDataReader::SetInputString
void SetInputString(const vtkStdString &input)
Specify the InputString for use when reading from a character array.
Definition: vtkDataReader.h:113
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::TCoordsNameInFile
char ** TCoordsNameInFile
Definition: vtkDataReader.h:573
vtkDataReader::FileVersion
int FileVersion
Definition: vtkDataReader.h:518
vtkDataReader::ReadTensorData
int ReadTensorData(vtkDataSetAttributes *a, vtkIdType num, vtkIdType numComp=9)
vtkDataReader::ReadNormalData
int ReadNormalData(vtkDataSetAttributes *a, vtkIdType num)
vtkDataReader::ReadGlobalIds
int ReadGlobalIds(vtkDataSetAttributes *a, vtkIdType num)
vtkDataReader::GetIStream
istream * GetIStream()
Return the istream being used to read in the data.
Definition: vtkDataReader.h:470
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:95
vtkDataReader::NumberOfTCoordsInFile
int NumberOfTCoordsInFile
Definition: vtkDataReader.h:572
vtkDataReader::GetNumberOfScalarsInFile
int GetNumberOfScalarsInFile()
How many attributes of various types are in this file? This requires reading the file,...
Definition: vtkDataReader.h:164
vtkDataReader::Read
int Read(long long *result)
Internal function to read in a value.
vtkDataReader::FieldDataNameAllocSize
int FieldDataNameAllocSize
Definition: vtkDataReader.h:580
vtkDataReader::ReadInformation
int ReadInformation(vtkInformation *info, vtkIdType numKeys)
Format is detailed at https://docs.vtk.org/en/latest/design_documents/IOLegacyInformationFormat....
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:97
vtkDataReader::ReadPedigreeIds
int ReadPedigreeIds(vtkDataSetAttributes *a, vtkIdType num)
vtkDataReader::ReadTCoordsData
int ReadTCoordsData(vtkDataSetAttributes *a, vtkIdType num)
vtkDataReader::InputArray
vtkCharArray * InputArray
Definition: vtkDataReader.h:597
vtkDataReader::ScalarLut
char * ScalarLut
Definition: vtkDataReader.h:531
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:65
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkFieldData
represent and manipulate fields of data
Definition: vtkFieldData.h:61
vtkGraph
Base class for graph data types.
Definition: vtkGraph.h:290
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkPointSet
concrete class for storing a set of points
Definition: vtkPointSet.h:68
vtkRectilinearGrid
a dataset that is topologically regular with variable spacing in the three coordinate directions
Definition: vtkRectilinearGrid.h:56
vtkSimpleReader
Superclass for algorithms that are not time or parallel aware.
Definition: vtkSimpleReader.h:21
vtkSimpleReader::GetFileName
VTK_FILEPATH const char * GetFileName(int i) const
Returns a particular filename stored by the reader.
vtkSmartPointer< vtkCellArray >
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:38
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:34
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::name
@ name
Definition: vtkX3D.h:219
vtkX3D::size
@ size
Definition: vtkX3D.h:253
vtkX3D::data
@ data
Definition: vtkX3D.h:315
vtkX3D::string
@ string
Definition: vtkX3D.h:490
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkSimpleReader.h
vtkSmartPointer.h
vtkStdString.h
vtkIdType
int vtkIdType
Definition: vtkType.h:315
IS
#define IS
Definition: vtkVRMLImporter_Yacc.h:554
VTK_FILEPATH
#define VTK_FILEPATH
Definition: vtkWrappingHints.h:34