| 248 | } |
| 249 | |
| 250 | int vtkGenericDataObjectReader::ReadMeshSimple(const std::string& fname, vtkDataObject* output) |
| 251 | { |
| 252 | |
| 253 | vtkDebugMacro(<< "Reading vtk dataset..."); |
| 254 | |
| 255 | switch (this->ReadOutputType()) |
| 256 | { |
| 257 | case VTK_CELL_GRID: |
| 258 | { |
| 259 | this->ReadData<vtkLegacyCellGridReader, vtkCellGrid>(fname.c_str(), "vtkCellGrid", output); |
| 260 | return 1; |
| 261 | } |
| 262 | case VTK_MOLECULE: |
| 263 | { |
| 264 | this->ReadData<vtkGraphReader, vtkMolecule>(fname.c_str(), "vtkMolecule", output); |
| 265 | return 1; |
| 266 | } |
| 267 | case VTK_DIRECTED_GRAPH: |
| 268 | { |
| 269 | this->ReadData<vtkGraphReader, vtkDirectedGraph>(fname.c_str(), "vtkDirectedGraph", output); |
| 270 | return 1; |
| 271 | } |
| 272 | case VTK_UNDIRECTED_GRAPH: |
| 273 | { |
| 274 | this->ReadData<vtkGraphReader, vtkUndirectedGraph>( |
| 275 | fname.c_str(), "vtkUndirectedGraph", output); |
| 276 | return 1; |
| 277 | } |
| 278 | case VTK_IMAGE_DATA: |
| 279 | { |
| 280 | this->ReadData<vtkStructuredPointsReader, vtkImageData>( |
| 281 | fname.c_str(), "vtkImageData", output); |
| 282 | return 1; |
| 283 | } |
| 284 | case VTK_POLY_DATA: |
| 285 | { |
| 286 | this->ReadData<vtkPolyDataReader, vtkPolyData>(fname.c_str(), "vtkPolyData", output); |
| 287 | return 1; |
| 288 | } |
| 289 | case VTK_RECTILINEAR_GRID: |
| 290 | { |
| 291 | this->ReadData<vtkRectilinearGridReader, vtkRectilinearGrid>( |
| 292 | fname.c_str(), "vtkRectilinearGrid", output); |
| 293 | return 1; |
| 294 | } |
| 295 | case VTK_STATISTICAL_MODEL: |
| 296 | { |
| 297 | this->ReadData<vtkLegacyStatisticalModelReader, vtkStatisticalModel>( |
| 298 | fname.c_str(), "vtkStatisticalModel", output); |
| 299 | return 1; |
| 300 | } |
| 301 | case VTK_STRUCTURED_GRID: |
| 302 | { |
| 303 | this->ReadData<vtkStructuredGridReader, vtkStructuredGrid>( |
| 304 | fname.c_str(), "vtkStructuredGrid", output); |
| 305 | return 1; |
| 306 | } |
| 307 | case VTK_STRUCTURED_POINTS: |
nothing calls this directly
no test coverage detected