16 #ifndef vtkXMLReader_h
17 #define vtkXMLReader_h
20 #include "vtkIOXMLModule.h"
28 VTK_ABI_NAMESPACE_BEGIN
61 vtkSetFilePathMacro(FileName);
62 vtkGetFilePathMacro(FileName);
81 void SetInputString(
const char* in);
82 void SetInputString(
const char* in,
int len);
83 void SetBinaryInputString(
const char*,
int len);
86 this->SetBinaryInputString(input.c_str(),
static_cast<int>(input.length()));
108 vtkSetMacro(ReadFromInputStream,
bool);
109 vtkGetMacro(ReadFromInputStream,
bool);
110 vtkBooleanMacro(ReadFromInputStream,
bool);
159 int GetNumberOfPointArrays();
160 int GetNumberOfCellArrays();
161 int GetNumberOfColumnArrays();
168 int GetNumberOfTimeDataArrays()
const;
169 const char* GetTimeDataArray(
int idx)
const;
180 vtkGetStringMacro(ActiveTimeDataArrayName);
181 vtkSetStringMacro(ActiveTimeDataArrayName);
189 const char* GetPointArrayName(
int index);
190 const char* GetCellArrayName(
int index);
191 const char* GetColumnArrayName(
int index);
199 int GetPointArrayStatus(
const char*
name);
200 int GetCellArrayStatus(
const char*
name);
201 void SetPointArrayStatus(
const char*
name,
int status);
202 void SetCellArrayStatus(
const char*
name,
int status);
203 int GetColumnArrayStatus(
const char*
name);
204 void SetColumnArrayStatus(
const char*
name,
int status);
215 vtkSetMacro(TimeStep,
int);
216 vtkGetMacro(TimeStep,
int);
219 vtkGetMacro(NumberOfTimeSteps,
int);
224 vtkGetVector2Macro(TimeStepRange,
int);
225 vtkSetVector2Macro(TimeStepRange,
int);
243 vtkGetObjectMacro(ReaderErrorObserver,
vtkCommand);
252 vtkGetObjectMacro(ParserErrorObserver,
vtkCommand);
270 virtual int ReadXMLInformation();
271 virtual void ReadXMLData();
277 virtual const char* GetDataSetName() = 0;
282 virtual int CanReadFileVersion(
int major,
int minor);
287 virtual void SetupEmptyOutput() = 0;
297 virtual void SetupOutputData();
340 virtual int OpenStream();
341 virtual void CloseStream();
342 virtual int OpenVTKFile();
343 virtual void CloseVTKFile();
344 virtual int OpenVTKString();
345 virtual void CloseVTKString();
346 virtual void CreateXMLParser();
347 virtual void DestroyXMLParser();
348 void SetupCompressor(
const char*
type);
349 int CanReadFileVersionString(
const char*
version);
357 virtual int CanReadFileWithDataType(
const char* dsname);
362 vtkGetMacro(FileMajorVersion,
int);
367 vtkGetMacro(FileMinorVersion,
int);
373 int IntersectExtents(
374 VTK_FUTURE_CONST
int extent1[6], VTK_FUTURE_CONST
int extent2[6],
int result[6]);
375 void ComputePointDimensions(VTK_FUTURE_CONST
int extent[6],
int* dimensions);
376 void ComputePointIncrements(VTK_FUTURE_CONST
int extent[6],
vtkIdType* increments);
377 void ComputeCellDimensions(VTK_FUTURE_CONST
int extent[6],
int* dimensions);
378 void ComputeCellIncrements(VTK_FUTURE_CONST
int extent[6],
vtkIdType* increments);
380 VTK_FUTURE_CONST
int extent[6],
vtkIdType* increments,
int i,
int j,
int k);
382 char** CreateStringArray(
int numStrings);
383 void DestroyStringArray(
int numStrings,
char** strings);
405 FieldType
type = OTHER);
426 static void SelectionModifiedCallback(
427 vtkObject* caller,
unsigned long eid,
void* clientdata,
void* calldata);
498 virtual void GetProgressRange(
float*
range);
499 virtual void SetProgressRange(
const float range[2],
int curStep,
int numSteps);
500 virtual void SetProgressRange(
const float range[2],
int curStep,
const float* fractions);
501 virtual void UpdateProgressDiscrete(
float progress);
502 float ProgressRange[2];
527 void SetNumberOfTimeSteps(
int num);
532 int TimeStepRange[2];
540 static int IsTimeStepInArray(
int timestep,
int* timesteps,
int length);
554 void ReadFieldData();
562 bool ReadFromInputStream =
false;
567 std::istringstream* StringStream;
570 std::unique_ptr<std::streambuf> Streambuf;
571 std::unique_ptr<std::istream> StreamBuffer;
573 int TimeStepWasReadOnce;
575 int FileMajorVersion;
576 int FileMinorVersion;
588 VTK_ABI_NAMESPACE_END
virtual void SqueezeOutputArrays(vtkDataObject *)
Give concrete classes an option to squeeze any output arrays at the end of RequestData.
abstract base class for most VTK objects
Abstract class used for custom streams.
Represents an XML element and those nested inside.
vtkTypeUInt32 vtkMTimeType
abstract class to specify dataset behavior
Abstract superclass for all arrays.
record modification and/or execution time
vtkXMLDataElement * FieldDataElement
vtkCallbackCommand * SelectionObserver
a vtkAbstractArray subclass for strings
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkCharArray * InputArray
char * ActiveTimeDataArrayName
Name of the field-data array used to determine the time for the dataset being read.
virtual int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
virtual vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
dynamic, self-adjusting array of char
vtkSmartPointer< vtkDataArray > TimeDataArray
Populated in ReadXMLInformation from the field data for the array chosen using ActiveTimeDataArrayNam...
superclass for callback/observer methods
supports function callbacks
Superclass for all sources, filters, and sinks in VTK.
a simple class to control print indentation
vtkDataArraySelection * PointDataArraySelection
vtkDataArraySelection * CellDataArraySelection
Store on/off settings for data arrays, etc.
abstract superclass for arrays of numeric data
virtual vtkMTimeType GetMTime()
Return this object's modified time.
represent and manipulate attribute data in a dataset
vtkStringArray * TimeDataStringArray
vtkTypeBool ReadFromInputString
virtual void CopyOutputInformation(vtkInformation *outInfo, int port)
virtual void ConvertGhostLevelsToGhostType(FieldType, vtkAbstractArray *, vtkIdType, vtkIdType)
void SetInputString(const std::string &input)
Enable reading from an InputString instead of the default, a file.
vtkDataArraySelection * ColumnArraySelection
Used by vtkXMLReader to parse VTK XML files.
vtkXMLDataParser * GetXMLParser()
Returns the internal XML parser.
virtual void SetupOutputInformation(vtkInformation *outInfo)
Setup the output's information.
general representation of visualization data
vtkSmartPointer< vtkDataArray > CreateArray(const Ioss::Field &field)
Create an array for the given field.
vtkXMLDataParser * XMLParser
Superclass for VTK's XML format readers.