VTK  9.1.0
vtkGenericDataObjectReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGenericDataObjectReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
54 #ifndef vtkGenericDataObjectReader_h
55 #define vtkGenericDataObjectReader_h
56 
57 #include "vtkDataReader.h"
58 #include "vtkIOLegacyModule.h" // For export macro
59 
60 class vtkDataObject;
61 class vtkGraph;
62 class vtkMolecule;
63 class vtkPolyData;
64 class vtkRectilinearGrid;
65 class vtkStructuredGrid;
67 class vtkTable;
68 class vtkTree;
70 
71 class VTKIOLEGACY_EXPORT vtkGenericDataObjectReader : public vtkDataReader
72 {
73 public:
76  void PrintSelf(ostream& os, vtkIndent indent) override;
77 
79 
85 
87 
104 
109  virtual int ReadOutputType();
110 
114  int ReadMetaDataSimple(VTK_FILEPATH const std::string& fname, vtkInformation* metadata) override;
115 
119  int ReadMeshSimple(VTK_FILEPATH const std::string& fname, vtkDataObject* output) override;
120 
121 protected:
124 
125  vtkDataObject* CreateOutput(vtkDataObject* currentOutput) override;
126 
128 
129 private:
131  void operator=(const vtkGenericDataObjectReader&) = delete;
132 
133  template <typename ReaderT, typename DataT>
134  void ReadData(const char* fname, const char* dataClass, vtkDataObject* output);
135 
136  vtkSetStringMacro(Header);
137 };
138 
139 #endif
vtkGenericDataObjectReader::~vtkGenericDataObjectReader
~vtkGenericDataObjectReader() override
vtkGenericDataObjectReader::GetTreeOutput
vtkTree * GetTreeOutput()
Get the output as various concrete types.
vtkStructuredPoints
A subclass of ImageData.
Definition: vtkStructuredPoints.h:125
vtkGenericDataObjectReader
class to read any type of vtk data object
Definition: vtkGenericDataObjectReader.h:72
vtkGenericDataObjectReader::GetStructuredPointsOutput
vtkStructuredPoints * GetStructuredPointsOutput()
Get the output as various concrete types.
vtkGenericDataObjectReader::GetMoleculeOutput
vtkMolecule * GetMoleculeOutput()
Get the output as various concrete types.
VTK_FILEPATH
#define VTK_FILEPATH
Definition: vtkWrappingHints.h:46
vtkDataReader
helper superclass for objects that read vtk data files
Definition: vtkDataReader.h:55
vtkGenericDataObjectReader::GetPolyDataOutput
vtkPolyData * GetPolyDataOutput()
Get the output as various concrete types.
vtkRectilinearGrid
a dataset that is topologically regular with variable spacing in the three coordinate directions
Definition: vtkRectilinearGrid.h:151
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:172
vtkGenericDataObjectReader::GetOutput
vtkDataObject * GetOutput(int idx)
Get the output of this filter.
vtkStructuredGrid
topologically regular array of data
Definition: vtkStructuredGrid.h:167
vtkGenericDataObjectReader::GetUnstructuredGridOutput
vtkUnstructuredGrid * GetUnstructuredGridOutput()
Get the output as various concrete types.
vtkGenericDataObjectReader::ReadMeshSimple
int ReadMeshSimple(VTK_FILEPATH const std::string &fname, vtkDataObject *output) override
Actual reading happens here.
vtkGenericDataObjectReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGenericDataObjectReader::GetTableOutput
vtkTable * GetTableOutput()
Get the output as various concrete types.
vtkTree
A rooted tree data structure.
Definition: vtkTree.h:164
vtkDataReader.h
vtkGenericDataObjectReader::GetRectilinearGridOutput
vtkRectilinearGrid * GetRectilinearGridOutput()
Get the output as various concrete types.
vtkGenericDataObjectReader::GetGraphOutput
vtkGraph * GetGraphOutput()
Get the output as various concrete types.
vtkGenericDataObjectReader::New
static vtkGenericDataObjectReader * New()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkGenericDataObjectReader::CreateOutput
vtkDataObject * CreateOutput(vtkDataObject *currentOutput) override
This can be overridden by a subclass to create an output that is determined by the file being read.
vtkMolecule
class describing a molecule
Definition: vtkMolecule.h:111
vtkGenericDataObjectReader::GetStructuredGridOutput
vtkStructuredGrid * GetStructuredGridOutput()
Get the output as various concrete types.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkGenericDataObjectReader::ReadOutputType
virtual int ReadOutputType()
This method can be used to find out the type of output expected without needing to read the whole fil...
vtkX3D::string
@ string
Definition: vtkX3D.h:496
vtkGenericDataObjectReader::ReadMetaDataSimple
int ReadMetaDataSimple(VTK_FILEPATH const std::string &fname, vtkInformation *metadata) override
Read metadata from file.
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
vtkGenericDataObjectReader::FillOutputPortInformation
int FillOutputPortInformation(int, vtkInformation *) override
Fill the output port information objects for this algorithm.
vtkGenericDataObjectReader::GetOutput
vtkDataObject * GetOutput()
Get the output of this filter.
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:204
vtkGraph
Base class for graph data types.
Definition: vtkGraph.h:339
vtkGenericDataObjectReader::vtkGenericDataObjectReader
vtkGenericDataObjectReader()
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:169