46 #ifndef vtkXMLReader_h
47 #define vtkXMLReader_h
50 #include "vtkIOXMLModule.h"
55 VTK_ABI_NAMESPACE_BEGIN
152 vtkGetStringMacro(ActiveTimeDataArrayName);
153 vtkSetStringMacro(ActiveTimeDataArrayName);
187 vtkSetMacro(TimeStep,
int);
188 vtkGetMacro(TimeStep,
int);
191 vtkGetMacro(NumberOfTimeSteps,
int);
196 vtkGetVector2Macro(TimeStepRange,
int);
197 vtkSetVector2Macro(TimeStepRange,
int);
299 vtkGetMacro(FileMajorVersion,
int);
302 vtkGetMacro(FileMinorVersion,
int);
336 vtkObject* caller,
unsigned long eid,
void* clientdata,
void* calldata);
405 float ProgressRange[2];
435 int TimeStepRange[2];
460 std::istringstream* StringStream;
461 int TimeStepWasReadOnce;
463 int FileMajorVersion;
464 int FileMinorVersion;
477 VTK_ABI_NAMESPACE_END
Abstract superclass for all arrays.
Superclass for all sources, filters, and sinks in VTK.
supports function callbacks
superclass for callback/observer methods
Store on/off settings for data arrays, etc.
abstract superclass for arrays of numeric data
general representation of visualization data
represent and manipulate attribute data in a dataset
abstract class to specify dataset behavior
a simple class to control print indentation
abstract base class for most VTK objects
a vtkAbstractArray subclass for strings
record modification and/or execution time
Represents an XML element and those nested inside.
Used by vtkXMLReader to parse VTK XML files.
Superclass for VTK's XML format readers.
vtkXMLDataElement * FieldDataElement
vtkCallbackCommand * SelectionObserver
virtual void SetProgressRange(const float range[2], int curStep, int numSteps)
virtual void ConvertGhostLevelsToGhostType(FieldType, vtkAbstractArray *, vtkIdType, vtkIdType)
int GetColumnArrayStatus(const char *name)
Get/Set whether the point, cell, column or time array with the given name is to be read.
virtual int CanReadFileVersion(int major, int minor)
virtual void GetProgressRange(float *range)
virtual void DestroyXMLParser()
int CellDataArrayIsEnabled(vtkXMLDataElement *eCDA)
void SetColumnArrayStatus(const char *name, int status)
Get/Set whether the point, cell, column or time array with the given name is to be read.
virtual int ReadArrayValues(vtkXMLDataElement *da, vtkIdType arrayIndex, vtkAbstractArray *array, vtkIdType startIndex, vtkIdType numValues, FieldType type=OTHER)
vtkDataSet * GetOutputAsDataSet(int index)
Get the output as a vtkDataSet pointer.
void SetReaderErrorObserver(vtkCommand *)
Set/get the ErrorObserver for the internal reader This is useful for applications that want to catch ...
vtkXMLDataParser * GetXMLParser()
Returns the internal XML parser.
vtkDataArraySelection * CellDataArraySelection
virtual void SetupOutputData()
void ComputeCellIncrements(int *extent, vtkIdType *increments)
int CreateInformationKey(vtkXMLDataElement *eInfoKey, vtkInformation *info)
void SetDataArraySelections(vtkXMLDataElement *eDSA, vtkDataArraySelection *sel)
void SetParserErrorObserver(vtkCommand *)
Set/get the ErrorObserver for the internal xml parser This is useful for applications that want to ca...
virtual void SetupEmptyOutput()=0
int GetNumberOfTimeDataArrays() const
Getters for time data array candidates.
virtual void SqueezeOutputArrays(vtkDataObject *)
vtkDataSet * GetOutputAsDataSet()
Get the output as a vtkDataSet pointer.
int GetNumberOfPointArrays()
Get the number of point, cell or column arrays available in the input.
virtual void CreateXMLParser()
vtkSmartPointer< vtkDataArray > TimeDataArray
Populated in ReadXMLInformation from the field data for the array chosen using ActiveTimeDataArrayNam...
vtkAbstractArray * CreateArray(vtkXMLDataElement *da)
virtual void CloseStream()
int CanReadFileVersionString(const char *version)
virtual void SetupOutputInformation(vtkInformation *vtkNotUsed(outInfo))
vtkIdType GetStartTuple(int *extent, vtkIdType *increments, int i, int j, int k)
virtual const char * GetDataSetName()=0
vtkTypeBool ReadFromInputString
void SetupCompressor(const char *type)
vtkDataArraySelection * ColumnArraySelection
vtkXMLDataParser * XMLParser
void SetInputString(const std::string &s)
Enable reading from an InputString instead of the default, a file.
void ComputePointIncrements(int *extent, vtkIdType *increments)
virtual int ReadXMLInformation()
int GetNumberOfColumnArrays()
Get the number of point, cell or column arrays available in the input.
void ReadAttributeIndices(vtkXMLDataElement *eDSA, vtkDataSetAttributes *dsa)
int PointDataArrayIsEnabled(vtkXMLDataElement *ePDA)
virtual void CloseVTKFile()
virtual int OpenVTKFile()
void ComputeCellDimensions(int *extent, int *dimensions)
virtual int CanReadFile(VTK_FILEPATH const char *name)
Test whether the file (type) with the given name can be read by this reader.
void SetNumberOfTimeSteps(int num)
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
static void SelectionModifiedCallback(vtkObject *caller, unsigned long eid, void *clientdata, void *calldata)
static int IsTimeStepInArray(int timestep, int *timesteps, int length)
char ** CreateStringArray(int numStrings)
virtual int RequestDataObject(vtkInformation *vtkNotUsed(request), vtkInformationVector **vtkNotUsed(inputVector), vtkInformationVector *vtkNotUsed(outputVector))
void ComputePointDimensions(int *extent, int *dimensions)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int GetNumberOfCellArrays()
Get the number of point, cell or column arrays available in the input.
void MarkIdTypeArrays(vtkXMLDataElement *da)
XML files have not consistently saved out adequate meta-data in past to correctly create vtkIdTypeArr...
virtual int CanReadFileWithDataType(const char *dsname)
This method is used by CanReadFile() to check if the reader can read an XML with the primary element ...
const char * GetCellArrayName(int index)
Get the name of the point, cell, column or time array with the given index in the input.
int IntersectExtents(int *extent1, int *extent2, int *result)
char * ActiveTimeDataArrayName
Name of the field-data array used to determine the time for the dataset being read.
virtual int ReadVTKFile(vtkXMLDataElement *eVTKFile)
virtual int OpenVTKString()
virtual int ReadPrimaryElement(vtkXMLDataElement *ePrimary)
vtkGetFilePathMacro(FileName)
Get/Set the name of the input file.
const char * GetPointArrayName(int index)
Get the name of the point, cell, column or time array with the given index in the input.
const char * GetTimeDataArray(int idx) const
Getters for time data array candidates.
int GetLocalDataType(vtkXMLDataElement *da, int datatype)
If the IdType argument is present in the provided XMLDataElement and the provided dataType has the sa...
bool ReadInformation(vtkXMLDataElement *infoRoot, vtkInformation *info)
vtkInformation * GetCurrentOutputInformation()
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
int GetCellArrayStatus(const char *name)
Get/Set whether the point, cell, column or time array with the given name is to be read.
vtkSetFilePathMacro(FileName)
Get/Set the name of the input file.
int GetPointArrayStatus(const char *name)
Get/Set whether the point, cell, column or time array with the given name is to be read.
const char * GetColumnArrayName(int index)
Get the name of the point, cell, column or time array with the given index in the input.
virtual void UpdateProgressDiscrete(float progress)
vtkDataObject * GetCurrentOutput()
virtual void ReadXMLData()
vtkStringArray * TimeDataStringArray
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
virtual void SetProgressRange(const float range[2], int curStep, const float *fractions)
void DestroyStringArray(int numStrings, char **strings)
void SetCellArrayStatus(const char *name, int status)
Get/Set whether the point, cell, column or time array with the given name is to be read.
virtual void CloseVTKString()
void SetPointArrayStatus(const char *name, int status)
Get/Set whether the point, cell, column or time array with the given name is to be read.
vtkDataArraySelection * PointDataArraySelection
virtual void CopyOutputInformation(vtkInformation *vtkNotUsed(outInfo), int vtkNotUsed(port))
int SetFieldDataInfo(vtkXMLDataElement *eDSA, int association, vtkIdType numTuples, vtkInformationVector *(&infoVector))