VTK  9.4.20250402
vtkNewickTreeWriter.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
14#ifndef vtkNewickTreeWriter_h
15#define vtkNewickTreeWriter_h
16
17#include "vtkDataWriter.h"
18#include "vtkIOInfovisModule.h" // For export macro
19#include "vtkStdString.h" // For get/set ivars
20
21VTK_ABI_NAMESPACE_BEGIN
22class vtkTree;
23
24class VTKIOINFOVIS_EXPORT vtkNewickTreeWriter : public vtkDataWriter
25{
26public:
29 void PrintSelf(ostream& os, vtkIndent indent) override;
30
32
36 vtkTree* GetInput(int port);
38
40
47 vtkGetMacro(EdgeWeightArrayName, vtkStdString);
48 vtkSetMacro(EdgeWeightArrayName, vtkStdString);
50
52
59 vtkGetMacro(NodeNameArrayName, vtkStdString);
60 vtkSetMacro(NodeNameArrayName, vtkStdString);
62
63protected:
65 ~vtkNewickTreeWriter() override = default;
66
67 void WriteData() override;
68
73 void WriteVertex(ostream* fp, vtkTree* input, vtkIdType vertex);
74
75 int FillInputPortInformation(int port, vtkInformation* info) override;
76
79
82
83private:
85 void operator=(const vtkNewickTreeWriter&) = delete;
86};
87
88VTK_ABI_NAMESPACE_END
89#endif
Abstract superclass for all arrays.
helper class for objects that write VTK data files
a simple class to control print indentation
Definition vtkIndent.h:108
Store vtkAlgorithm input/output information.
write vtkTree data to Newick format.
vtkAbstractArray * NodeNameArray
~vtkNewickTreeWriter() override=default
vtkTree * GetInput(int port)
Get the input to this writer.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for type information and printing.
void WriteData() override
vtkStdString EdgeWeightArrayName
vtkTree * GetInput()
Get the input to this writer.
static vtkNewickTreeWriter * New()
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkAbstractArray * EdgeWeightArray
void WriteVertex(ostream *fp, vtkTree *input, vtkIdType vertex)
Write one vertex.
Wrapper around std::string to keep symbols short.
A rooted tree data structure.
Definition vtkTree.h:155
int vtkIdType
Definition vtkType.h:332