Go to the documentation of this file.
29 #ifndef vtkDataReader_h
30 #define vtkDataReader_h
32 #include "vtkIOLegacyModule.h"
71 void SetFileName(
const char* fname);
84 int IsFileValid(
const char *dstype);
86 return this->IsFileValid(
"structured_points");};
88 return this->IsFileValid(
"polydata");};
90 return this->IsFileValid(
"structured_grid");};
92 return this->IsFileValid(
"unstructured_grid");};
94 return this->IsFileValid(
"rectilinear_grid");};
104 void SetInputString(
const char *in);
105 vtkGetStringMacro(InputString);
106 void SetInputString(
const char *in,
int len);
107 vtkGetMacro(InputStringLength,
int);
108 void SetBinaryInputString(
const char *,
int len);
110 { this->SetBinaryInputString(input.c_str(), static_cast<int>(input.length())); }
130 vtkGetStringMacro(Header);
148 vtkGetMacro(FileType,
int);
159 {this->CharacterizeFile();
return this->NumberOfScalarsInFile;}
161 {this->CharacterizeFile();
return this->NumberOfVectorsInFile;}
163 {this->CharacterizeFile();
return this->NumberOfTensorsInFile;}
165 {this->CharacterizeFile();
return this->NumberOfNormalsInFile;}
167 {this->CharacterizeFile();
return this->NumberOfTCoordsInFile;}
169 {this->CharacterizeFile();
return this->NumberOfFieldDataInFile;}
177 const char *GetScalarsNameInFile(
int i);
178 const char *GetVectorsNameInFile(
int i);
179 const char *GetTensorsNameInFile(
int i);
180 const char *GetNormalsNameInFile(
int i);
181 const char *GetTCoordsNameInFile(
int i);
182 const char *GetFieldDataNameInFile(
int i);
190 vtkSetStringMacro(ScalarsName);
191 vtkGetStringMacro(ScalarsName);
199 vtkSetStringMacro(VectorsName);
200 vtkGetStringMacro(VectorsName);
208 vtkSetStringMacro(TensorsName);
209 vtkGetStringMacro(TensorsName);
217 vtkSetStringMacro(NormalsName);
218 vtkGetStringMacro(NormalsName);
226 vtkSetStringMacro(TCoordsName);
227 vtkGetStringMacro(TCoordsName);
235 vtkSetStringMacro(LookupTableName);
236 vtkGetStringMacro(LookupTableName);
244 vtkSetStringMacro(FieldDataName);
245 vtkGetStringMacro(FieldDataName);
314 int OpenVTKFile(
const char* fname =
nullptr);
319 int ReadHeader(
const char* fname =
nullptr);
385 vtkFieldData *ReadFieldData(FieldType fieldType = FIELD_DATA);
393 vtkGetMacro(FileMajorVersion,
int);
394 vtkGetMacro(FileMinorVersion,
int);
403 int Read(
unsigned char *);
405 int Read(
unsigned short *);
407 int Read(
unsigned int *);
409 int Read(
unsigned long *);
410 int Read(
long long *result);
411 int Read(
unsigned long long *result);
420 size_t Peek(
char *str,
size_t n);
432 int ReadLine(
char result[256]);
438 int ReadString(
char result[256]);
443 char *LowerCase(
char *str,
const size_t len=256);
458 int piece,
int npieces,
int nghosts,
int timestep,
461 int ,
int ,
int ,
int ,
464 int ,
int ,
int ,
int ,
505 void SetScalarLut(
const char* lut);
506 vtkGetStringMacro(ScalarLut);
561 void InitializeCharacteristics();
562 int CharacterizeFile();
563 void CheckFor(
const char*
name,
char *line,
int &num,
char** &array,
573 int DecodeString(
char *resname,
const char*
name);
591 void ConvertGhostLevelsToGhostType(
char ** NormalsNameInFile
vtkTimeStamp CharacteristicsTime
int GetNumberOfFieldDataInFile()
vtkTypeBool ReadAllTensors
int NumberOfVectorsInFile
helper superclass for objects that read vtk data files
represent and manipulate attribute data in a dataset
a dataset that is topologically regular with variable spacing in the three coordinate directions
A table, which contains similar-typed columns of data.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
record modification and/or execution time
int GetNumberOfVectorsInFile()
int GetNumberOfTensorsInFile()
vtkTypeBool ReadAllColorScalars
int NumberOfFieldDataInFile
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
int ReadArraysSimple(const std::string &, vtkDataObject *) override
A method that needs to be override by the subclass to provide data arrays.
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
int ReadPoints(int, int, int, int, vtkDataObject *) override
Read the points.
const char * GetFileName(int i) const
Returns a particular filename stored by the reader.
vtkTypeBool ReadFromInputString
represent and manipulate fields of data
istream * GetIStream()
Return the istream being used to read in the data.
std::string CurrentFileName
dynamic, self-adjusting array of char
int ReadTimeDependentMetaData(int timestep, vtkInformation *metadata) override
This is the superclass API overridden by this class to provide time support internally.
int GetNumberOfNormalsInFile()
vtkTypeBool ReadAllScalars
char ** VectorsNameInFile
int ReadArrays(int, int, int, int, vtkDataObject *) override
Read all the arrays (point, cell, field etc.).
int GetNumberOfTCoordsInFile()
char ** ScalarsNameInFile
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Superclass for algorithms that are not time or parallel aware.
std::locale CurrentLocale
char ** TensorsNameInFile
abstract class to specify dataset behavior
const char * GetFileName(int i) const
Abstract superclass for all arrays.
int IsFileUnstructuredGrid()
static vtkAlgorithm * New()
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
vtkTypeBool ReadAllTCoords
vtkCharArray * InputArray
int FieldDataNameAllocSize
int ReadMesh(int piece, int npieces, int nghosts, int timestep, vtkDataObject *output) override
Read the mesh (connectivity) for a given set of data partitioning, number of ghost levels and time st...
abstract class for specifying dataset behavior
vtkTypeBool ReadAllFields
int IsFileStructuredPoints()
int IsFileStructuredGrid()
int NumberOfScalarsInFile
void SetInputString(const vtkStdString &input)
vtkTypeBool ReadAllVectors
int IsFileRectilinearGrid()
Wrapper around std::string to keep symbols short.
Base class for graph data types.
int ReadMeshSimple(const std::string &, vtkDataObject *) override
Overridden with default implementation of doing nothing so that subclasses only override what is need...
char ** FieldDataNameInFile
vtkTypeBool ReadAllNormals
general representation of visualization data
int NumberOfTensorsInFile
int ReadPointsSimple(const std::string &, vtkDataObject *) override
A method that needs to be override by the subclass to provide the point coordinates.
int GetNumberOfScalarsInFile()
How many attributes of various types are in this file? This requires reading the file,...
char ** TCoordsNameInFile
int NumberOfNormalsInFile
int NumberOfTCoordsInFile