29#ifndef vtkDataReader_h
30#define vtkDataReader_h
32#include "vtkIOLegacyModule.h"
94 vtkGetMacro(FileVersion,
int);
95 vtkGetMacro(FileMajorVersion,
int);
96 vtkGetMacro(FileMinorVersion,
int);
120 vtkGetStringMacro(InputString);
122 vtkGetMacro(InputStringLength,
int);
126 this->SetBinaryInputString(input.c_str(),
static_cast<int>(input.length()));
147 vtkGetStringMacro(Header);
165 vtkGetMacro(FileType,
int);
177 this->CharacterizeFile();
178 return this->NumberOfScalarsInFile;
182 this->CharacterizeFile();
183 return this->NumberOfVectorsInFile;
187 this->CharacterizeFile();
188 return this->NumberOfTensorsInFile;
192 this->CharacterizeFile();
193 return this->NumberOfNormalsInFile;
197 this->CharacterizeFile();
198 return this->NumberOfTCoordsInFile;
202 this->CharacterizeFile();
203 return this->NumberOfFieldDataInFile;
225 vtkSetStringMacro(ScalarsName);
226 vtkGetStringMacro(ScalarsName);
234 vtkSetStringMacro(VectorsName);
235 vtkGetStringMacro(VectorsName);
243 vtkSetStringMacro(TensorsName);
244 vtkGetStringMacro(TensorsName);
252 vtkSetStringMacro(NormalsName);
253 vtkGetStringMacro(NormalsName);
261 vtkSetStringMacro(TCoordsName);
262 vtkGetStringMacro(TCoordsName);
270 vtkSetStringMacro(LookupTableName);
271 vtkGetStringMacro(LookupTableName);
279 vtkSetStringMacro(FieldDataName);
280 vtkGetStringMacro(FieldDataName);
445 int Read(
unsigned long long* result);
454 size_t Peek(
char* str,
size_t n);
550 vtkGetStringMacro(ScalarLut);
605 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
VTK_FILEPATH const char * GetFileName() const
Specify file name of vtk data file to read.
int ReadVectorData(vtkDataSetAttributes *a, vtkIdType num)
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)
Internal function to read in a value.
int GetNumberOfVectorsInFile()
VTK_FILEPATH const char * GetFileName(int i) const
Specify file name of vtk data file to read.
const char * GetFieldDataNameInFile(int i)
What is the name of the ith attribute of a certain type in this file? This requires reading the file,...
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,...
int ReadString(char result[256])
Internal function to read in a string up to 256 characters.
void SetScalarLut(const char *lut)
char * LowerCase(char *str, const size_t len=256)
Helper method for reading in data.
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
Overridden to handle reading from a string.
int Read(unsigned short *)
Internal function to read in a value.
int ReadCells(vtkSmartPointer< vtkCellArray > &cellArray)
Read cells in a vtkCellArray, and update the smartpointer reference passed in.
int ReadHeader(VTK_FILEPATH const char *fname=nullptr)
Read the header of a vtk data file.
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.
int IsFileRectilinearGrid()
Is the file a valid vtk file of the passed dataset type ? The dataset type is passed as a lower case ...
vtkTypeBool ReadAllVectors
void SetInputString(const char *in)
Specify the InputString for use when reading from a character array.
vtkTypeBool ReadAllTensors
int Read(short *)
Internal function to read in a value.
int NumberOfTensorsInFile
vtkTimeStamp CharacteristicsTime
int ReadDataSetData(vtkDataSet *ds)
int ReadCoordinates(vtkRectilinearGrid *rg, int axes, int numCoords)
Read the coordinates for a rectilinear grid.
int Read(long *)
Internal function to read in a value.
int ReadArraysSimple(VTK_FILEPATH const std::string &, vtkDataObject *) override
Overridden with default implementation of doing nothing so that subclasses only override what is need...
char ** TensorsNameInFile
void InitializeCharacteristics()
int Read(unsigned long *)
Internal function to read in a value.
istream * GetIStream()
Return the istream being used to read in the data.
const char * GetNormalsNameInFile(int i)
What is the name of the ith attribute of a certain type in this file? This requires reading the file,...
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)
Specify the InputString for use when reading from a character array.
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)
Specify the InputString for use when reading from a character array.
int NumberOfVectorsInFile
int Read(float *)
Internal function to read in a value.
int GetNumberOfTensorsInFile()
vtkTypeBool ReadAllNormals
const char * GetTCoordsNameInFile(int i)
What is the name of the ith attribute of a certain type in this file? This requires reading the file,...
int ReadEdgeData(vtkGraph *g, vtkIdType numEdges)
Read the edge data of a vtk data file.
int ReadPointCoordinates(vtkGraph *g, vtkIdType numPts)
Read point coordinates.
int ReadArrays(int, int, int, int, vtkDataObject *) override
Overridden to handle reading from a string.
vtkAbstractArray * ReadArray(const char *dataType, vtkIdType numTuples, vtkIdType numComp)
Helper functions for reading data.
int Read(double *)
Internal function to read in a value.
int ReadScalarData(vtkDataSetAttributes *a, vtkIdType num)
vtkTypeBool ReadAllFields
std::string CurrentFileName
int Read(int *)
Internal function to read in a value.
std::locale CurrentLocale
int ReadCellData(vtkDataSet *ds, vtkIdType numCells)
Read the cell data of a vtk data file.
static vtkDataReader * New()
vtkTypeBool ReadAllColorScalars
void CloseVTKFile()
Close the vtk file.
int ReadPointsSimple(VTK_FILEPATH const std::string &, vtkDataObject *) override
Overridden with default implementation of doing nothing so that subclasses only override what is need...
vtkTypeBool ReadFromInputString
int IsFileStructuredGrid()
Is the file a valid vtk file of the passed dataset type ? The dataset type is passed as a lower case ...
int GetNumberOfNormalsInFile()
int NumberOfNormalsInFile
char ** ScalarsNameInFile
vtkFieldData * ReadFieldData(FieldType fieldType=FIELD_DATA)
Helper functions for reading data.
int NumberOfScalarsInFile
vtkTypeBool ReadAllTCoords
int OpenVTKFile(VTK_FILEPATH const char *fname=nullptr)
Open a vtk data file.
void SetFileName(VTK_FILEPATH const char *fname)
Specify file name of vtk data file to read.
int ReadPoints(int, int, int, int, vtkDataObject *) override
Overridden to handle reading from a string.
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
int Read(unsigned int *)
Internal function to read in a value.
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 ReadMeshSimple(VTK_FILEPATH const std::string &, vtkDataObject *) override
Overridden with default implementation of doing nothing so that subclasses only override what is need...
int ReadEdgeFlags(vtkDataSetAttributes *a, vtkIdType num)
int NumberOfFieldDataInFile
int IsFileStructuredPoints()
Is the file a valid vtk file of the passed dataset type ? The dataset type is passed as a lower case ...
vtkTypeBool ReadAllScalars
int GetNumberOfTCoordsInFile()
const char * GetVectorsNameInFile(int i)
What is the name of the ith attribute of a certain type in this file? This requires reading the file,...
int GetNumberOfFieldDataInFile()
int Read(unsigned char *)
Internal function to read in a value.
int ReadCellsLegacy(vtkIdType size, int *data, int skip1, int read2, int skip3)
Read a piece of the cells (for streaming compliance)
const char * GetTensorsNameInFile(int i)
What is the name of the ith attribute of a certain type in this file? This requires reading the file,...
char ** VectorsNameInFile
void SetInputString(const vtkStdString &input)
Specify the InputString for use when reading from a character array.
char ** TCoordsNameInFile
int ReadTensorData(vtkDataSetAttributes *a, vtkIdType num, vtkIdType numComp=9)
int ReadNormalData(vtkDataSetAttributes *a, vtkIdType num)
int ReadGlobalIds(vtkDataSetAttributes *a, vtkIdType num)
int IsFilePolyData()
Is the file a valid vtk file of the passed dataset type ? The dataset type is passed as a lower case ...
int NumberOfTCoordsInFile
int GetNumberOfScalarsInFile()
How many attributes of various types are in this file? This requires reading the file,...
int Read(long long *result)
Internal function to read in a value.
int FieldDataNameAllocSize
int ReadInformation(vtkInformation *info, vtkIdType numKeys)
Format is detailed here.
int IsFileUnstructuredGrid()
Is the file a valid vtk file of the passed dataset type ? The dataset type is passed as a lower case ...
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
concrete class for storing a set of points
a dataset that is topologically regular with variable spacing in the three coordinate directions
Superclass for algorithms that are not time or parallel aware.
VTK_FILEPATH 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