29 #ifndef vtkDataReader_h 30 #define vtkDataReader_h 32 #include "vtkIOLegacyModule.h" 69 void SetFileName(
const char* fname);
82 int IsFileValid(
const char *dstype);
84 return this->IsFileValid(
"structured_points");};
86 return this->IsFileValid(
"polydata");};
88 return this->IsFileValid(
"structured_grid");};
90 return this->IsFileValid(
"unstructured_grid");};
92 return this->IsFileValid(
"rectilinear_grid");};
102 void SetInputString(
const char *in);
103 vtkGetStringMacro(InputString);
104 void SetInputString(
const char *in,
int len);
105 vtkGetMacro(InputStringLength,
int);
106 void SetBinaryInputString(
const char *,
int len);
108 { this->SetBinaryInputString(input.c_str(),
static_cast<int>(input.length())); }
128 vtkGetStringMacro(Header);
146 vtkGetMacro(FileType,
int);
157 {this->CharacterizeFile();
return this->NumberOfScalarsInFile;}
159 {this->CharacterizeFile();
return this->NumberOfVectorsInFile;}
161 {this->CharacterizeFile();
return this->NumberOfTensorsInFile;}
163 {this->CharacterizeFile();
return this->NumberOfNormalsInFile;}
165 {this->CharacterizeFile();
return this->NumberOfTCoordsInFile;}
167 {this->CharacterizeFile();
return this->NumberOfFieldDataInFile;}
175 const char *GetScalarsNameInFile(
int i);
176 const char *GetVectorsNameInFile(
int i);
177 const char *GetTensorsNameInFile(
int i);
178 const char *GetNormalsNameInFile(
int i);
179 const char *GetTCoordsNameInFile(
int i);
180 const char *GetFieldDataNameInFile(
int i);
188 vtkSetStringMacro(ScalarsName);
189 vtkGetStringMacro(ScalarsName);
197 vtkSetStringMacro(VectorsName);
198 vtkGetStringMacro(VectorsName);
206 vtkSetStringMacro(TensorsName);
207 vtkGetStringMacro(TensorsName);
215 vtkSetStringMacro(NormalsName);
216 vtkGetStringMacro(NormalsName);
224 vtkSetStringMacro(TCoordsName);
225 vtkGetStringMacro(TCoordsName);
233 vtkSetStringMacro(LookupTableName);
234 vtkGetStringMacro(LookupTableName);
242 vtkSetStringMacro(FieldDataName);
243 vtkGetStringMacro(FieldDataName);
312 int OpenVTKFile(
const char* fname =
nullptr);
317 int ReadHeader(
const char* fname =
nullptr);
370 int ReadCells(
vtkIdType size,
int *data,
int skip1,
int read2,
int skip3);
391 vtkGetMacro(FileMajorVersion,
int);
392 vtkGetMacro(FileMinorVersion,
int);
401 int Read(
unsigned char *);
403 int Read(
unsigned short *);
405 int Read(
unsigned int *);
407 int Read(
unsigned long *);
408 int Read(
long long *result);
409 int Read(
unsigned long long *result);
418 size_t Peek(
char *str,
size_t n);
430 int ReadLine(
char result[256]);
436 int ReadString(
char result[256]);
441 char *LowerCase(
char *str,
const size_t len=256);
456 int piece,
int npieces,
int nghosts,
int timestep,
459 int ,
int ,
int ,
int ,
462 int ,
int ,
int ,
int ,
503 void SetScalarLut(
const char* lut);
504 vtkGetStringMacro(ScalarLut);
557 void InitializeCharacteristics();
558 int CharacterizeFile();
559 void CheckFor(
const char*
name,
char *line,
int &num,
char** &array,
569 int DecodeString(
char *resname,
const char*
name);
587 void ConvertGhostLevelsToGhostType(
vtkTypeBool ReadAllTensors
Wrapper around std::string to keep symbols short.
vtkTypeBool ReadFromInputString
const char * GetFileName(int i) const
Returns a particular filename stored by the reader.
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
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
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
int NumberOfFieldDataInFile
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
int GetNumberOfTCoordsInFile()
int ReadTimeDependentMetaData(int timestep, vtkInformation *metadata) override
This is the superclass API overridden by this class to provide time support internally.
int GetNumberOfNormalsInFile()
abstract class for specifying dataset behavior
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()
int ReadMeshSimple(const std::string &, vtkDataObject *) override
Overridden with default implementation of doing nothing so that subclasses only override what is need...
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 ReadPoints(int, int, int, int, vtkDataObject *) override
Overridden to handle reading from a string.
represent and manipulate attribute data in a dataset
int NumberOfNormalsInFile
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
int GetNumberOfVectorsInFile()
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()
int ReadArraysSimple(const std::string &, vtkDataObject *) override
Overridden with default implementation of doing nothing so that subclasses only override what is need...
const char * GetFileName(int i) const
Specify file name of vtk data file to read.
int ReadPointsSimple(const std::string &, vtkDataObject *) override
Overridden with default implementation of doing nothing so that subclasses only override what is need...
char ** NormalsNameInFile
vtkTypeBool ReadAllTCoords
vtkCharArray * InputArray
char ** TCoordsNameInFile
int FieldDataNameAllocSize
general representation of visualization data
int GetNumberOfTensorsInFile()
int NumberOfTCoordsInFile
represent and manipulate fields of data
int NumberOfVectorsInFile