29 #ifndef vtkDataReader_h 30 #define vtkDataReader_h 32 #include "vtkIOLegacyModule.h" 74 void SetFileName(
const char* fname);
84 int IsFileValid(
const char* dstype);
99 void SetInputString(
const char* in);
100 vtkGetStringMacro(InputString);
101 void SetInputString(
const char* in,
int len);
102 vtkGetMacro(InputStringLength,
int);
103 void SetBinaryInputString(
const char*,
int len);
106 this->SetBinaryInputString(input.c_str(),
static_cast<int>(input.length()));
127 vtkGetStringMacro(Header);
145 vtkGetMacro(FileType,
int);
157 this->CharacterizeFile();
158 return this->NumberOfScalarsInFile;
162 this->CharacterizeFile();
163 return this->NumberOfVectorsInFile;
167 this->CharacterizeFile();
168 return this->NumberOfTensorsInFile;
172 this->CharacterizeFile();
173 return this->NumberOfNormalsInFile;
177 this->CharacterizeFile();
178 return this->NumberOfTCoordsInFile;
182 this->CharacterizeFile();
183 return this->NumberOfFieldDataInFile;
192 const char* GetScalarsNameInFile(
int i);
193 const char* GetVectorsNameInFile(
int i);
194 const char* GetTensorsNameInFile(
int i);
195 const char* GetNormalsNameInFile(
int i);
196 const char* GetTCoordsNameInFile(
int i);
197 const char* GetFieldDataNameInFile(
int i);
205 vtkSetStringMacro(ScalarsName);
206 vtkGetStringMacro(ScalarsName);
214 vtkSetStringMacro(VectorsName);
215 vtkGetStringMacro(VectorsName);
223 vtkSetStringMacro(TensorsName);
224 vtkGetStringMacro(TensorsName);
232 vtkSetStringMacro(NormalsName);
233 vtkGetStringMacro(NormalsName);
241 vtkSetStringMacro(TCoordsName);
242 vtkGetStringMacro(TCoordsName);
250 vtkSetStringMacro(LookupTableName);
251 vtkGetStringMacro(LookupTableName);
259 vtkSetStringMacro(FieldDataName);
260 vtkGetStringMacro(FieldDataName);
329 int OpenVTKFile(
const char* fname =
nullptr);
334 int ReadHeader(
const char* fname =
nullptr);
408 vtkFieldData* ReadFieldData(FieldType fieldType = FIELD_DATA);
416 vtkGetMacro(FileMajorVersion,
int);
417 vtkGetMacro(FileMinorVersion,
int);
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,
const size_t len = 256);
530 void SetScalarLut(
const char* lut);
531 vtkGetStringMacro(ScalarLut);
586 void InitializeCharacteristics();
587 int CharacterizeFile();
588 void CheckFor(
const char*
name,
char* line,
int& num,
char**& array,
int& allocSize);
597 int DecodeString(
char* resname,
const char*
name);
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
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...
virtual vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
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()
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()
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