29 #ifndef vtkDataReader_h
30 #define vtkDataReader_h
32 #include "vtkIOLegacyModule.h"
100 vtkGetStringMacro(InputString);
102 vtkGetMacro(InputStringLength,
int);
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;
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);
416 vtkGetMacro(FileMajorVersion,
int);
417 vtkGetMacro(FileMinorVersion,
int);
434 int Read(
unsigned long long* result);
443 size_t Peek(
char* str,
size_t n);
531 vtkGetStringMacro(ScalarLut);
588 void CheckFor(
const char*
name,
char* line,
int& num,
char**& array,
int& allocSize);
Abstract superclass for all arrays.
object to represent cell connectivity
dynamic, self-adjusting array of char
general representation of visualization data
helper superclass for objects that read vtk data files
int ReadVectorData(vtkDataSetAttributes *a, vtkIdType num)
vtkTypeBool ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
int Read(char *)
Internal function to read in a value.
int ReadRowData(vtkTable *t, vtkIdType numEdges)
Read the row data of a vtk data file.
int Read(unsigned long long *result)
int GetNumberOfVectorsInFile()
int ReadString(char result[256])
Internal function to read in a string up to 256 characters.
void SetScalarLut(const char *lut)
const char * GetFileName(int i) const
virtual void SetInputArray(vtkCharArray *)
Specify the vtkCharArray to be used when reading from a string.
int ReadPointCoordinates(vtkPointSet *ps, vtkIdType numPts)
Read point coordinates.
char ** NormalsNameInFile
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...
int ReadMeshSimple(const std::string &, vtkDataObject *) override
Overridden with default implementation of doing nothing so that subclasses only override what is need...
int Read(unsigned short *)
int ReadCells(vtkSmartPointer< vtkCellArray > &cellArray)
Read cells in a vtkCellArray, and update the smartpointer reference passed in.
void CheckFor(const char *name, char *line, int &num, char **&array, int &allocSize)
int ReadCoScalarData(vtkDataSetAttributes *a, vtkIdType num)
int ReadTimeDependentMetaData(int timestep, vtkInformation *metadata) override
Overridden to handle reading from a string.
const char * GetFileName() const
int IsFileRectilinearGrid()
const char * GetTCoordsNameInFile(int i)
vtkTypeBool ReadAllVectors
void SetInputString(const char *in)
Specify the InputString for use when reading from a character array.
vtkTypeBool ReadAllTensors
int NumberOfTensorsInFile
vtkTimeStamp CharacteristicsTime
int ReadDataSetData(vtkDataSet *ds)
int ReadCoordinates(vtkRectilinearGrid *rg, int axes, int numCoords)
Read the coordinates for a rectilinear grid.
const char * GetScalarsNameInFile(int i)
What is the name of the ith attribute of a certain type in this file? This requires reading the file,...
char ** TensorsNameInFile
void InitializeCharacteristics()
int Read(unsigned long *)
int ReadArraysSimple(const std::string &, vtkDataObject *) override
A method that needs to be override by the subclass to provide data arrays.
vtkFieldData * ReadFieldData(FieldType fieldType=FIELD_DATA)
int DecodeString(char *resname, const char *name)
Decode a string.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetBinaryInputString(const char *, int len)
int OpenVTKFile(const char *fname=nullptr)
Open a vtk data file.
int ReadPointData(vtkDataSet *ds, vtkIdType numPts)
Read the point data of a vtk data file.
int ReadCellsLegacy(vtkIdType size, int *data)
Read a bunch of "cells".
void SetInputString(const char *in, int len)
int NumberOfVectorsInFile
int GetNumberOfTensorsInFile()
vtkTypeBool ReadAllNormals
int ReadEdgeData(vtkGraph *g, vtkIdType numEdges)
Read the edge data of a vtk data file.
char * LowerCase(char *str, const size_t len=256)
Helper method for reading in data.
int ReadPointCoordinates(vtkGraph *g, vtkIdType numPts)
Read point coordinates.
int ReadArrays(int, int, int, int, vtkDataObject *) override
Read all the arrays (point, cell, field etc.).
const char * GetTensorsNameInFile(int i)
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
int ReadScalarData(vtkDataSetAttributes *a, vtkIdType num)
vtkTypeBool ReadAllFields
std::string CurrentFileName
std::locale CurrentLocale
int ReadCellData(vtkDataSet *ds, vtkIdType numCells)
Read the cell data of a vtk data file.
vtkAbstractArray * ReadArray(const char *dataType, vtkIdType numTuples, vtkIdType numComp)
Helper functions for reading data.
vtkTypeBool ReadAllColorScalars
void CloseVTKFile()
Close the vtk file.
vtkTypeBool ReadFromInputString
int IsFileStructuredGrid()
int GetNumberOfNormalsInFile()
int NumberOfNormalsInFile
char ** ScalarsNameInFile
int NumberOfScalarsInFile
vtkTypeBool ReadAllTCoords
int ReadPoints(int, int, int, int, vtkDataObject *) override
Read the points.
int ReadLine(char result[256])
Internal function to read in a line up to 256 characters.
int ReadLutData(vtkDataSetAttributes *a)
int ReadVertexData(vtkGraph *g, vtkIdType numVertices)
Read the vertex data of a vtk data file.
size_t Peek(char *str, size_t n)
Read n character from the stream into str, then reset the stream position.
char ** FieldDataNameInFile
const char * GetVectorsNameInFile(int i)
int IsFileValid(const char *dstype)
Is the file a valid vtk file of the passed dataset type ? The dataset type is passed as a lower case ...
~vtkDataReader() override
int ReadPointsSimple(const std::string &, vtkDataObject *) override
A method that needs to be override by the subclass to provide the point coordinates.
static vtkDataReader * New()
int ReadEdgeFlags(vtkDataSetAttributes *a, vtkIdType num)
int NumberOfFieldDataInFile
void SetFileName(const char *fname)
Specify file name of vtk data file to read.
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
int IsFileStructuredPoints()
vtkTypeBool ReadAllScalars
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
int GetNumberOfTCoordsInFile()
int GetNumberOfFieldDataInFile()
int Read(unsigned char *)
int ReadCellsLegacy(vtkIdType size, int *data, int skip1, int read2, int skip3)
Read a piece of the cells (for streaming compliance)
const char * GetFieldDataNameInFile(int i)
char ** VectorsNameInFile
void SetInputString(const vtkStdString &input)
const char * GetNormalsNameInFile(int i)
char ** TCoordsNameInFile
int ReadTensorData(vtkDataSetAttributes *a, vtkIdType num, vtkIdType numComp=9)
int ReadNormalData(vtkDataSetAttributes *a, vtkIdType num)
int ReadGlobalIds(vtkDataSetAttributes *a, vtkIdType num)
int ReadHeader(const char *fname=nullptr)
Read the header of a vtk data file.
istream * GetIStream()
Return the istream being used to read in the data.
int NumberOfTCoordsInFile
int GetNumberOfScalarsInFile()
How many attributes of various types are in this file? This requires reading the file,...
int Read(long long *result)
int FieldDataNameAllocSize
int ReadInformation(vtkInformation *info, vtkIdType numKeys)
Format is detailed here.
int IsFileUnstructuredGrid()
int ReadPedigreeIds(vtkDataSetAttributes *a, vtkIdType num)
int ReadTCoordsData(vtkDataSetAttributes *a, vtkIdType num)
vtkCharArray * InputArray
represent and manipulate attribute data in a dataset
abstract class to specify dataset behavior
represent and manipulate fields of data
Base class for graph data types.
a simple class to control print indentation
abstract class for specifying dataset behavior
a dataset that is topologically regular with variable spacing in the three coordinate directions
Superclass for algorithms that are not time or parallel aware.
const char * GetFileName(int i) const
Returns a particular filename stored by the reader.
Wrapper around std::string to keep symbols short.
A table, which contains similar-typed columns of data.
record modification and/or execution time