00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
#ifndef VTK_INPUT_SOURCE_H_
00017
# define VTK_INPUT_SOURCE_H_
00018
# include "vtkExtensionsIOConfigure.h"
00019
00020
# include "vtkSource.h"
00021
00022
class vtkDataSet;
00023
class vtkPolyData;
00024
class vtkRectilinearGrid;
00025
class vtkStructuredGrid;
00026
class vtkStructuredPoints;
00027
class vtkUnstructuredGrid;
00028
00029
VTK_EXTENSIONS_IO_NAMESPACE_BEGIN
00030
00031
class vtkInputSourceInternal;
00032
00041 class VTK_EXTENSIONS_IO_EXPORT vtkInputSource
00042 :
public vtkSource
00043 {
00044
public:
00045
static vtkInputSource*
New (
void);
00046 vtkTypeRevisionMacro (vtkInputSource,
vtkSource);
00047
void PrintSelf (ostream&,
vtkIndent);
00048
00051
int GetFileType (
void)
const;
00052
void SetFileType (
int type);
00060
const char* GetFileName (
void)
const;
00061
void SetFileName (
const char* name);
00069
const char* GetFilePrefix (
void)
const;
00070
void SetFilePrefix (
const char* prefix);
00075
const char* GetFilePattern (
void)
const;
00076
void SetFilePattern (
const char* pattern);
00081
int GetFileDimensionality (
void)
const;
00082
void SetFileDimensionality (
int dimensionality = 2);
00087
int GetFileIndexCount (
void)
const;
00088
void SetFileIndexCount (
int count = 1);
00096
int GetFileIndexOffset (
void)
const;
00097
void SetFileIndexOffset (
int offset = 0);
00106
int GetFileIndexSpacing (
void)
const;
00107
void SetFileIndexSpacing (
int spacing = 1);
00111
bool CanReadFile (
const char* fileName);
00112
00114
bool CanReadFile (
int index);
00115
00117
bool CanReadFiles (
void);
00118
00124
vtkDataSet* GetOutput (
void);
00125
vtkDataSet* GetOutput (
int index);
00129
vtkPolyData* GetPolyDataOutput (
void);
00130
00132
vtkStructuredPoints* GetStructuredPointsOutput (
void);
00133
00135
vtkStructuredGrid* GetStructuredGridOutput (
void);
00136
00138
vtkUnstructuredGrid* GetUnstructuredGridOutput (
void);
00139
00141
vtkRectilinearGrid* GetRectilinearGridOutput (
void);
00142
00146
void Update (
void);
00147
00152
int ReadOutputType (
void);
00153
00156
static const char* GetDataObjectTypeAsString (
int type);
00157
const char* ReadOutputTypeAsString (
void);
00160
vtkSource* GetReader (
void);
00161 vtkSetObjectMacro(Reader,
vtkSource);
00162
00163
protected:
00164 vtkInputSource (
void);
00165 ~vtkInputSource();
00166
00167
void SetOutput (
vtkDataObject*);
00168
void Execute (
void);
00169
00170 vtkSource* Reader;
00171
00172
private:
00173 vtkInputSourceInternal* Internal;
00174
00175
private:
00176 vtkInputSource (
const vtkInputSource&);
00177
void operator= (
const vtkInputSource&);
00178 };
00179
00180
00181
00182
inline const char*
00183 vtkInputSource::GetDataObjectTypeAsString (
int aType)
00184 {
00185
switch (aType)
00186 {
00187
case VTK_POLY_DATA:
return "VTK_POLY_DATA";
00188
case VTK_STRUCTURED_POINTS:
return "VTK_STRUCTURED_POINTS";
00189
case VTK_STRUCTURED_GRID:
return "VTK_STRUCTURED_GRID";
00190
case VTK_RECTILINEAR_GRID:
return "VTK_RECTILINEAR_GRID";
00191
case VTK_UNSTRUCTURED_GRID:
return "VTK_UNSTRUCTURED_GRID";
00192
case VTK_PIECEWISE_FUNCTION:
return "VTK_PIECEWISE_FUNCTION";
00193
case VTK_IMAGE_DATA:
return "VTK_IMAGE_DATA";
00194
case VTK_DATA_OBJECT:
return "VTK_DATA_OBJECT";
00195
case VTK_DATA_SET:
return "VTK_DATA_SET";
00196
case VTK_POINT_SET:
return "VTK_POINT_SET";
00197
case -1:
return "(unknown)";
00198
default:
return "(invalid)";
00199 }
00200 }
00201
00202
inline const char*
00203 vtkInputSource::ReadOutputTypeAsString (
void)
00204 {
00205
return vtkInputSource::GetDataObjectTypeAsString(this->ReadOutputType());
00206 }
00207
00208
VTK_EXTENSIONS_IO_NAMESPACE_END
00209
00210
#endif
00211
00212
00213
00214