25 #ifndef vtkPhastaReader_h 26 #define vtkPhastaReader_h 28 #include "vtkPVVTKExtensionsDefaultModule.h" 29 #include "vtkUnstructuredGridAlgorithm.h" 31 class vtkUnstructuredGrid;
33 class vtkDataSetAttributes;
34 class vtkInformationVector;
36 struct vtkPhastaReaderInternal;
38 class VTKPVVTKEXTENSIONSDEFAULT_EXPORT
vtkPhastaReader :
public vtkUnstructuredGridAlgorithm
43 void PrintSelf(ostream& os, vtkIndent indent);
49 vtkSetStringMacro(GeometryFileName);
50 vtkGetStringMacro(GeometryFileName);
57 vtkSetStringMacro(FieldFileName);
58 vtkGetStringMacro(FieldFileName);
65 void ClearFieldInfo();
66 void SetFieldInfo(
const char* paraviewFieldTag,
const char* phastaFieldTag,
int index,
67 int numOfComps,
int dataDependency,
const char* dataType);
70 void SetCachedGrid(vtkUnstructuredGrid*);
71 vtkGetObjectMacro(CachedGrid, vtkUnstructuredGrid);
77 virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
78 vtkInformationVector* outputVector);
81 char* GeomFileName,
int& firstVertexNo, vtkPoints* points,
int& noOfNodes,
int& noOfCells);
83 char* fieldFileName,
int firstVertexNo, vtkDataSetAttributes* field,
int& noOfNodes);
85 char* fieldFileName,
int firstVertexNo, vtkUnstructuredGrid* output,
int& noOfDatas);
88 char* GeometryFileName;
90 vtkUnstructuredGrid* CachedGrid;
92 int NumberOfVariables;
94 static char* StringStripper(
const char istring[]);
95 static int cscompare(
const char teststring[],
const char targetstring[]);
96 static void isBinary(
const char iotype[]);
97 static size_t typeSize(
const char typestring[]);
98 static int readHeader(FILE* fileObject,
const char phrase[],
int* params,
int expect);
99 static void SwapArrayByteOrder(
void* array,
int nbytes,
int nItems);
100 static void openfile(
const char filename[],
const char mode[],
int* fileDescriptor);
101 static void closefile(
int* fileDescriptor,
const char mode[]);
102 static void readheader(
int* fileDescriptor,
const char keyphrase[],
void* valueArray,
int* nItems,
103 const char datatype[],
const char iotype[]);
104 static void readdatablock(
int* fileDescriptor,
const char keyphrase[],
void* valueArray,
105 int* nItems,
const char datatype[],
const char iotype[]);
108 vtkPhastaReaderInternal* Internal;
Reader for RPI's PHASTA software.