VTK  9.3.1
vtkBiomTableReader.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
16 #ifndef vtkBiomTableReader_h
17 #define vtkBiomTableReader_h
18 
19 #include "vtkIOInfovisModule.h" // For export macro
20 #include "vtkTableReader.h"
21 
22 VTK_ABI_NAMESPACE_BEGIN
23 class vtkTable;
24 class vtkVariant;
25 
26 class VTKIOINFOVIS_EXPORT vtkBiomTableReader : public vtkTableReader
27 {
28 public:
29  static vtkBiomTableReader* New();
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
34 
38  vtkTable* GetOutput(int idx);
39  void SetOutput(vtkTable* output);
41 
45  int ReadMeshSimple(VTK_FILEPATH const std::string& fname, vtkDataObject* output) override;
46 
47 protected:
49  ~vtkBiomTableReader() override;
50 
51  int FillOutputPortInformation(int, vtkInformation*) override;
52  void ParseShape();
53  void ParseDataType();
54  void ParseSparseness();
55  void InitializeData();
56  void FillData(vtkVariant v);
57  void ParseSparseData();
58  void ParseDenseData();
59  void InsertValue(int row, int col, const std::string& value);
60  void ParseId();
61  void ParseColumns();
62  void ParseRows();
63 
64 private:
65  std::string FileContents;
66  int NumberOfRows;
67  int NumberOfColumns;
68  int DataType;
69  bool Sparse;
70  vtkBiomTableReader(const vtkBiomTableReader&) = delete;
71  void operator=(const vtkBiomTableReader&) = delete;
72 };
73 
74 VTK_ABI_NAMESPACE_END
75 #endif
read vtkTable from a .biom input file
static vtkTableReader * New()
Store vtkAlgorithm input/output information.
vtkTable * GetOutput()
Get the output of this reader.
A type representing the union of many types.
Definition: vtkVariant.h:52
int FillOutputPortInformation(int, vtkInformation *) override
Fill the output port information objects for this algorithm.
a simple class to control print indentation
Definition: vtkIndent.h:28
int ReadMeshSimple(VTK_FILEPATH const std::string &fname, vtkDataObject *output) override
Actual reading happens here.
read vtkTable data file
#define VTK_FILEPATH
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:58
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetOutput(vtkTable *output)
Get the output of this reader.
general representation of visualization data
Definition: vtkDataObject.h:54