VTK
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(const std::string& fname,
57  vtkDataObject* output) override;
58 
59 protected:
61  ~vtkBiomTableReader() override;
62 
63  int FillOutputPortInformation(int, vtkInformation*) override;
64  void ParseShape();
65  void ParseDataType();
66  void ParseSparseness();
67  void InitializeData();
68  void FillData(vtkVariant v);
69  void ParseSparseData();
70  void ParseDenseData();
71  void InsertValue(int row, int col, const std::string& value);
72  void ParseId();
73  void ParseColumns();
74  void ParseRows();
75 
76 private:
77  std::string FileContents;
78  int NumberOfRows;
79  int NumberOfColumns;
80  int DataType;
81  bool Sparse;
82  vtkBiomTableReader(const vtkBiomTableReader&) = delete;
83  void operator=(const vtkBiomTableReader&) = delete;
84 };
85 
86 #endif
vtkTableReader::SetOutput
void SetOutput(vtkTable *output)
vtkTableReader
read vtkTable data file
Definition: vtkTableReader.h:42
vtkX3D::value
Definition: vtkX3D.h:220
vtkTableReader::ReadMeshSimple
int ReadMeshSimple(const std::string &fname, vtkDataObject *output) override
Actual reading happens here.
vtkTableReader::New
static vtkTableReader * New()
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
vtkBiomTableReader
read vtkTable from a .biom input file
Definition: vtkBiomTableReader.h:37
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkTableReader::GetOutput
vtkTable * GetOutput()
Get the output of this reader.
vtkVariant
A atomic type representing the union of many types.
Definition: vtkVariant.h:71
vtkTableReader.h
vtkTableReader::FillOutputPortInformation
int FillOutputPortInformation(int, vtkInformation *) override
Fill the output port information objects for this algorithm.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkTableReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkX3D::string
Definition: vtkX3D.h:490
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:64