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(
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
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.
std::locale CurrentLocale
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
const char * GetFileName(int i) const
Specify file name of vtk data file to read.
const char * GetFileName(int i) const
Returns a particular filename stored by the reader.
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...
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