VTK  9.2.6
vtkBiomTableReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBiomTableReader.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 =========================================================================*/
28 #ifndef vtkBiomTableReader_h
29 #define vtkBiomTableReader_h
30 
31 #include "vtkIOInfovisModule.h" // For export macro
32 #include "vtkTableReader.h"
33 
34 class vtkTable;
35 class vtkVariant;
36 
37 class VTKIOINFOVIS_EXPORT vtkBiomTableReader : public vtkTableReader
38 {
39 public:
40  static vtkBiomTableReader* New();
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
45 
49  vtkTable* GetOutput(int idx);
50  void SetOutput(vtkTable* output);
52 
56  int ReadMeshSimple(VTK_FILEPATH const std::string& fname, vtkDataObject* output) override;
57 
58 protected:
60  ~vtkBiomTableReader() override;
61 
62  int FillOutputPortInformation(int, vtkInformation*) override;
63  void ParseShape();
64  void ParseDataType();
65  void ParseSparseness();
66  void InitializeData();
67  void FillData(vtkVariant v);
68  void ParseSparseData();
69  void ParseDenseData();
70  void InsertValue(int row, int col, const std::string& value);
71  void ParseId();
72  void ParseColumns();
73  void ParseRows();
74 
75 private:
76  std::string FileContents;
77  int NumberOfRows;
78  int NumberOfColumns;
79  int DataType;
80  bool Sparse;
81  vtkBiomTableReader(const vtkBiomTableReader&) = delete;
82  void operator=(const vtkBiomTableReader&) = delete;
83 };
84 
85 #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 atomic type representing the union of many types.
Definition: vtkVariant.h:69
int FillOutputPortInformation(int, vtkInformation *) override
Fill the output port information objects for this algorithm.
a simple class to control print indentation
Definition: vtkIndent.h:39
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:73
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:65