29 #ifndef vtkDataReader_h
30 #define vtkDataReader_h
32 #include "vtkIOLegacyModule.h"
94 vtkGetMacro(FileVersion,
int);
95 vtkGetMacro(FileMajorVersion,
int);
96 vtkGetMacro(FileMinorVersion,
int);
104 int IsFileValid(
const char* dstype);
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);
126 this->SetBinaryInputString(input.c_str(),
static_cast<int>(input.length()));
147 vtkGetStringMacro(Header);
165 vtkGetMacro(FileType,
int);
177 this->CharacterizeFile();
178 return this->NumberOfScalarsInFile;
182 this->CharacterizeFile();
183 return this->NumberOfVectorsInFile;
187 this->CharacterizeFile();
188 return this->NumberOfTensorsInFile;
192 this->CharacterizeFile();
193 return this->NumberOfNormalsInFile;
197 this->CharacterizeFile();
198 return this->NumberOfTCoordsInFile;
202 this->CharacterizeFile();
203 return this->NumberOfFieldDataInFile;
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);
225 vtkSetStringMacro(ScalarsName);
226 vtkGetStringMacro(ScalarsName);
234 vtkSetStringMacro(VectorsName);
235 vtkGetStringMacro(VectorsName);
243 vtkSetStringMacro(TensorsName);
244 vtkGetStringMacro(TensorsName);
252 vtkSetStringMacro(NormalsName);
253 vtkGetStringMacro(NormalsName);
261 vtkSetStringMacro(TCoordsName);
262 vtkGetStringMacro(TCoordsName);
270 vtkSetStringMacro(LookupTableName);
271 vtkGetStringMacro(LookupTableName);
279 vtkSetStringMacro(FieldDataName);
280 vtkGetStringMacro(FieldDataName);
349 int OpenVTKFile(
VTK_FILEPATH const char* fname =
nullptr);
354 int ReadHeader(
VTK_FILEPATH const char* fname =
nullptr);
428 vtkFieldData* ReadFieldData(FieldType fieldType = FIELD_DATA);
437 int Read(
unsigned char*);
439 int Read(
unsigned short*);
441 int Read(
unsigned int*);
443 int Read(
unsigned long*);
444 int Read(
long long* result);
445 int Read(
unsigned long long* result);
454 size_t Peek(
char* str,
size_t n);
465 int ReadLine(
char result[256]);
471 int ReadString(
char result[256]);
476 char* LowerCase(
char* str,
const size_t len = 256);
549 void SetScalarLut(
const char* lut);
550 vtkGetStringMacro(ScalarLut);
603 void InitializeCharacteristics();
604 int CharacterizeFile();
605 void CheckFor(
const char*
name,
char* line,
int& num,
char**& array,
int& allocSize);
614 int DecodeString(
char* resname,
const char*
name);
int ReadMeshSimple(VTK_FILEPATH const std::string &, vtkDataObject *) override
Overridden with default implementation of doing nothing so that subclasses only override what is need...
vtkTypeBool ReadAllTensors
Wrapper around std::string to keep symbols short.
vtkTypeBool ReadFromInputString
int GetNumberOfScalarsInFile()
How many attributes of various types are in this file? This requires reading the file, so the filename must be set prior to invoking this operation.
a dataset that is topologically regular with variable spacing in the three coordinate directions ...
int NumberOfScalarsInFile
VTK_FILEPATH const char * GetFileName(int i) const
Returns a particular filename stored by the reader.
vtkTypeBool ReadAllFields
abstract class to specify dataset behavior
Abstract superclass for all arrays.
void SetInputString(const vtkStdString &input)
Specify the InputString for use when reading from a character array.
int IsFilePolyData()
Is the file a valid vtk file of the passed dataset type ? The dataset type is passed as a lower case ...
char ** ScalarsNameInFile
int IsFileRectilinearGrid()
Is the file a valid vtk file of the passed dataset type ? The dataset type is passed as a lower case ...
record modification and/or execution time
int NumberOfTensorsInFile
int NumberOfFieldDataInFile
int GetNumberOfTCoordsInFile()
int ReadTimeDependentMetaData(int timestep, vtkInformation *metadata) override
This is the superclass API overridden by this class to provide time support internally.
std::locale CurrentLocale
int GetNumberOfNormalsInFile()
concrete class for storing a set of points
vtkTypeBool ReadAllScalars
int IsFileStructuredGrid()
Is the file a valid vtk file of the passed dataset type ? The dataset type is passed as a lower case ...
vtkTimeStamp CharacteristicsTime
char ** TensorsNameInFile
int GetNumberOfFieldDataInFile()
Base class for graph data types.
dynamic, self-adjusting array of char
std::string CurrentFileName
helper superclass for objects that read vtk data files
int ReadArrays(int, int, int, int, vtkDataObject *) override
Overridden to handle reading from a string.
a simple class to control print indentation
istream * GetIStream()
Return the istream being used to read in the data.
Superclass for algorithms that are not time or parallel aware.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
char ** FieldDataNameInFile
int ReadPointsSimple(VTK_FILEPATH const std::string &, vtkDataObject *) override
Overridden with default implementation of doing nothing so that subclasses only override what is need...
int ReadPoints(int, int, int, int, vtkDataObject *) override
Overridden to handle reading from a string.
represent and manipulate attribute data in a dataset
int NumberOfNormalsInFile
VTK_FILEPATH const char * GetFileName(int i) const
Specify file name of vtk data file to read.
int GetNumberOfVectorsInFile()
object to represent cell connectivity
A table, which contains similar-typed columns of data.
vtkTypeBool ReadAllColorScalars
int IsFileUnstructuredGrid()
Is the file a valid vtk file of the passed dataset type ? The dataset type is passed as a lower case ...
char ** VectorsNameInFile
vtkTypeBool ReadAllNormals
int IsFileStructuredPoints()
Is the file a valid vtk file of the passed dataset type ? The dataset type is passed as a lower case ...
int ReadMesh(int piece, int npieces, int nghosts, int timestep, vtkDataObject *output) override
This is the superclass API overridden by this class to provide time support internally.
vtkTypeBool ReadAllVectors
static vtkAlgorithm * New()
char ** NormalsNameInFile
vtkTypeBool ReadAllTCoords
vtkCharArray * InputArray
char ** TCoordsNameInFile
int FieldDataNameAllocSize
general representation of visualization data
int GetNumberOfTensorsInFile()
int ReadArraysSimple(VTK_FILEPATH const std::string &, vtkDataObject *) override
Overridden with default implementation of doing nothing so that subclasses only override what is need...
int NumberOfTCoordsInFile
represent and manipulate fields of data
int NumberOfVectorsInFile