17 #ifndef vtkDataReader_h
18 #define vtkDataReader_h
20 #include "vtkIOLegacyModule.h"
31 VTK_ABI_NAMESPACE_BEGIN
83 vtkGetMacro(FileVersion,
int);
84 vtkGetMacro(FileMajorVersion,
int);
85 vtkGetMacro(FileMinorVersion,
int);
93 int IsFileValid(
const char* dstype);
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);
115 this->SetBinaryInputString(input.c_str(),
static_cast<int>(input.length()));
136 vtkGetStringMacro(Header);
154 vtkGetMacro(FileType,
int);
166 this->CharacterizeFile();
167 return this->NumberOfScalarsInFile;
171 this->CharacterizeFile();
172 return this->NumberOfVectorsInFile;
176 this->CharacterizeFile();
177 return this->NumberOfTensorsInFile;
181 this->CharacterizeFile();
182 return this->NumberOfNormalsInFile;
186 this->CharacterizeFile();
187 return this->NumberOfTCoordsInFile;
191 this->CharacterizeFile();
192 return this->NumberOfFieldDataInFile;
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);
214 vtkSetStringMacro(ScalarsName);
215 vtkGetStringMacro(ScalarsName);
223 vtkSetStringMacro(VectorsName);
224 vtkGetStringMacro(VectorsName);
232 vtkSetStringMacro(TensorsName);
233 vtkGetStringMacro(TensorsName);
241 vtkSetStringMacro(NormalsName);
242 vtkGetStringMacro(NormalsName);
250 vtkSetStringMacro(TCoordsName);
251 vtkGetStringMacro(TCoordsName);
259 vtkSetStringMacro(LookupTableName);
260 vtkGetStringMacro(LookupTableName);
268 vtkSetStringMacro(FieldDataName);
269 vtkGetStringMacro(FieldDataName);
338 int OpenVTKFile(
VTK_FILEPATH const char* fname =
nullptr);
343 int ReadHeader(
VTK_FILEPATH const char* fname =
nullptr);
417 vtkFieldData* ReadFieldData(FieldType fieldType = FIELD_DATA);
426 int Read(
unsigned char*);
428 int Read(
unsigned short*);
430 int Read(
unsigned int*);
432 int Read(
unsigned long*);
433 int Read(
long long* result);
434 int Read(
unsigned long long* result);
443 size_t Peek(
char* str,
size_t n);
454 int ReadLine(
char result[256]);
460 int ReadString(
char (&result)[256]);
465 char* LowerCase(
char* str,
size_t len = 256);
538 void SetScalarLut(
const char* lut);
539 vtkGetStringMacro(ScalarLut);
593 void InitializeCharacteristics();
594 int CharacterizeFile();
595 void CheckFor(
const char*
name,
char* line,
int& num,
char**& array,
int& allocSize);
604 int DecodeString(
char* resname,
const char*
name);
613 VTK_ABI_NAMESPACE_END
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