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