Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

vtkInputSource.h

Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- 00002 * 00003 * $Id: vtkInputSource.h,v 1.3 2004/08/10 07:37:23 xpxqx Exp $ 00004 * 00005 * Copyright (c) 2004 Sean McInerney 00006 * All rights reserved. 00007 * 00008 * See Copyright.txt or http://vtkextensions.sourceforge.net/Copyright.html 00009 * for details. 00010 * 00011 * This software is distributed WITHOUT ANY WARRANTY; without even 00012 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 * PURPOSE. See the above copyright notice for more information. 00014 * 00015 */ 00016 #ifndef VTK_INPUT_SOURCE_H_ 00017 # define VTK_INPUT_SOURCE_H_ 00018 # include "vtkExtensionsIOConfigure.h" // vtkExtensions configuration 00019 // VTK Common 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&); // Not implemented. 00177 void operator= (const vtkInputSource&); // Not implemented. 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 } // switch (aType) 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 /* VTK_INPUT_SOURCE_H_ */ 00211 /* 00212 * End of $Id: vtkInputSource.h,v 1.3 2004/08/10 07:37:23 xpxqx Exp $. 00213 * 00214 */

Generated on Tue Aug 10 03:37:40 2004 for vtkExtensions by doxygen 1.3.7