VTK  9.4.20250131
vtkNewickTreeReader.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
22#ifndef vtkNewickTreeReader_h
23#define vtkNewickTreeReader_h
24
25#include "vtkDataReader.h"
26#include "vtkIOInfovisModule.h" // For export macro
27
28VTK_ABI_NAMESPACE_BEGIN
29class vtkDoubleArray;
31class vtkStringArray;
32class vtkTree;
33
34class VTKIOINFOVIS_EXPORT vtkNewickTreeReader : public vtkDataReader
35{
36public:
39 void PrintSelf(ostream& os, vtkIndent indent) override;
40
42
46 vtkTree* GetOutput(int idx);
47 void SetOutput(vtkTree* output);
48 int ReadNewickTree(const char* buffer, vtkTree& tree);
50
54 int ReadMeshSimple(VTK_FILEPATH const std::string& fname, vtkDataObject* output) override;
55
56protected:
59
61 void CountNodes(const char* buffer, vtkIdType* numNodes);
63 vtkStringArray* names, vtkIdType parent);
64
65private:
67 void operator=(const vtkNewickTreeReader&) = delete;
68};
69
70VTK_ABI_NAMESPACE_END
71#endif
general representation of visualization data
helper superclass for objects that read vtk data files
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition vtkIndent.h:108
Store vtkAlgorithm input/output information.
An editable directed graph.
read vtkTree from Newick formatted file
void SetOutput(vtkTree *output)
Get the output of this reader.
int ReadNewickTree(const char *buffer, vtkTree &tree)
Get the output of this reader.
vtkTree * GetOutput(int idx)
Get the output of this reader.
int FillOutputPortInformation(int, vtkInformation *) override
Fill the output port information objects for this algorithm.
vtkIdType BuildTree(char *buffer, vtkMutableDirectedGraph *g, vtkDoubleArray *weights, vtkStringArray *names, vtkIdType parent)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkNewickTreeReader() override
void CountNodes(const char *buffer, vtkIdType *numNodes)
vtkTree * GetOutput()
Get the output of this reader.
int ReadMeshSimple(VTK_FILEPATH const std::string &fname, vtkDataObject *output) override
Actual reading happens here.
static vtkNewickTreeReader * New()
a vtkAbstractArray subclass for strings
A rooted tree data structure.
Definition vtkTree.h:155
int vtkIdType
Definition vtkType.h:315
#define VTK_FILEPATH