24 #ifndef vtkXMLReader_h 25 #define vtkXMLReader_h 27 #include "vtkIOXMLModule.h" 61 vtkSetStringMacro(FileName);
62 vtkGetStringMacro(FileName);
82 virtual int CanReadFile(
const char*
name);
106 int GetNumberOfPointArrays();
107 int GetNumberOfCellArrays();
108 int GetNumberOfColumnArrays();
116 const char* GetPointArrayName(
int index);
117 const char* GetCellArrayName(
int index);
118 const char* GetColumnArrayName(
int index);
126 int GetPointArrayStatus(
const char* name);
127 int GetCellArrayStatus(
const char* name);
128 void SetPointArrayStatus(
const char* name,
int status);
129 void SetCellArrayStatus(
const char* name,
int status);
130 int GetColumnArrayStatus(
const char* name);
131 void SetColumnArrayStatus(
const char* name,
int status);
137 int vtkNotUsed(
port)) {}
143 vtkSetMacro(TimeStep,
int);
144 vtkGetMacro(TimeStep,
int);
147 vtkGetMacro(NumberOfTimeSteps,
int);
152 vtkGetVector2Macro(TimeStepRange,
int);
153 vtkSetVector2Macro(TimeStepRange,
int);
162 return this->XMLParser;
175 vtkGetObjectMacro(ReaderErrorObserver,
vtkCommand);
184 vtkGetObjectMacro(ParserErrorObserver,
vtkCommand);
194 virtual int ReadXMLInformation();
195 virtual void ReadXMLData();
198 virtual const char* GetDataSetName()=0;
201 virtual int CanReadFileVersion(
int major,
int minor);
204 virtual void SetupEmptyOutput()=0;
210 virtual void SetupOutputData();
233 virtual int OpenStream();
234 virtual void CloseStream();
235 virtual int OpenVTKFile();
236 virtual void CloseVTKFile();
237 virtual int OpenVTKString();
238 virtual void CloseVTKString();
239 virtual void CreateXMLParser();
240 virtual void DestroyXMLParser();
241 void SetupCompressor(
const char*
type);
242 int CanReadFileVersionString(
const char*
version);
249 virtual int CanReadFileWithDataType(
const char* dsname);
252 vtkGetMacro(FileMajorVersion,
int);
255 vtkGetMacro(FileMinorVersion,
int);
258 int IntersectExtents(
int* extent1,
int* extent2,
int* result);
259 int Min(
int a,
int b);
260 int Max(
int a,
int b);
261 void ComputePointDimensions(
int*
extent,
int* dimensions);
262 void ComputePointIncrements(
int* extent,
vtkIdType* increments);
263 void ComputeCellDimensions(
int* extent,
int* dimensions);
264 void ComputeCellIncrements(
int* extent,
vtkIdType* increments);
266 int i,
int j,
int k);
269 char** CreateStringArray(
int numStrings);
270 void DestroyStringArray(
int numStrings,
char** strings);
276 virtual int ReadArrayValues(
292 static void SelectionModifiedCallback(
vtkObject* caller,
unsigned long eid,
293 void* clientdata,
void* calldata);
334 virtual void GetProgressRange(
float*
range);
335 virtual void SetProgressRange(
const float range[2],
int curStep,
int numSteps);
336 virtual void SetProgressRange(
const float range[2],
int curStep,
const float* fractions);
337 virtual void UpdateProgressDiscrete(
float progress);
338 float ProgressRange[2];
364 void SetNumberOfTimeSteps(
int num);
369 int TimeStepRange[2];
377 static int IsTimeStepInArray(
int timestep,
int* timesteps,
int length);
389 void ReadFieldData();
393 ifstream* FileStream;
395 std::istringstream* StringStream;
396 int TimeStepWasReadOnce;
398 int FileMajorVersion;
399 int FileMinorVersion;
virtual void SqueezeOutputArrays(vtkDataObject *)
abstract base class for most VTK objects
Represents an XML element and those nested inside.
abstract class to specify dataset behavior
Abstract superclass for all arrays.
record modification and/or execution time
vtkXMLDataElement * FieldDataElement
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
vtkCallbackCommand * SelectionObserver
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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 for a vtkSource.
virtual void SetupOutputInformation(vtkInformation *vtkNotUsed(outInfo))
represent and manipulate attribute data in a dataset
vtkTypeBool ReadFromInputString
virtual void ConvertGhostLevelsToGhostType(FieldType, vtkAbstractArray *, vtkIdType, vtkIdType)
virtual void CopyOutputInformation(vtkInformation *vtkNotUsed(outInfo), int vtkNotUsed(port))
vtkDataArraySelection * ColumnArraySelection
Used by vtkXMLReader to parse VTK XML files.
virtual int RequestDataObject(vtkInformation *vtkNotUsed(request), vtkInformationVector **vtkNotUsed(inputVector), vtkInformationVector *vtkNotUsed(outputVector))
vtkXMLDataParser * GetXMLParser()
Returns the internal XML parser.
general representation of visualization data
vtkXMLDataParser * XMLParser
Superclass for VTK's XML format readers.
void SetInputString(const std::string &s)
Enable reading from an InputString instead of the default, a file.