VTK: IO/Infovis/vtkNewickTreeWriter.h Source File

| VTK 9.3.1

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
21 VTK_ABI_NAMESPACE_BEGIN
22 class vtkTree;
23
24 class VTKIOINFOVIS_EXPORT vtkNewickTreeWriter : public vtkDataWriter
25 {
26 public:
27 static vtkNewickTreeWriter* New();
28 vtkTypeMacro(vtkNewickTreeWriter, vtkDataWriter);
29 void PrintSelf(ostream& os, vtkIndent indent) override;
30
32
35 vtkTree* GetInput();
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
63 protected:
64 vtkNewickTreeWriter();
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
77 vtkStdString EdgeWeightArrayName;
78 vtkStdString NodeNameArrayName;
79
80 vtkAbstractArray* EdgeWeightArray;
81 vtkAbstractArray* NodeNameArray;
82
83 private:
84 vtkNewickTreeWriter(const vtkNewickTreeWriter&) = delete;
85 void operator=(const vtkNewickTreeWriter&) = delete;
86 };
87
88 VTK_ABI_NAMESPACE_END
89 #endif
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:76
vtkDataWriter
helper class for objects that write VTK data files
Definition: vtkDataWriter.h:37
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkNewickTreeWriter
write vtkTree data to Newick format.
Definition: vtkNewickTreeWriter.h:25
vtkNewickTreeWriter::New
static vtkNewickTreeWriter * New()
vtkNewickTreeWriter::NodeNameArray
vtkAbstractArray * NodeNameArray
Definition: vtkNewickTreeWriter.h:81
vtkNewickTreeWriter::~vtkNewickTreeWriter
~vtkNewickTreeWriter() override=default
vtkNewickTreeWriter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkNewickTreeWriter::GetInput
vtkTree * GetInput()
Get the input to this writer.
vtkNewickTreeWriter::WriteData
void WriteData() override
vtkNewickTreeWriter::EdgeWeightArrayName
vtkStdString EdgeWeightArrayName
Definition: vtkNewickTreeWriter.h:77
vtkNewickTreeWriter::NodeNameArrayName
vtkStdString NodeNameArrayName
Definition: vtkNewickTreeWriter.h:78
vtkNewickTreeWriter::vtkNewickTreeWriter
vtkNewickTreeWriter()
vtkNewickTreeWriter::GetInput
vtkTree * GetInput(int port)
Get the input to this writer.
vtkNewickTreeWriter::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkNewickTreeWriter::EdgeWeightArray
vtkAbstractArray * EdgeWeightArray
Definition: vtkNewickTreeWriter.h:80
vtkNewickTreeWriter::WriteVertex
void WriteVertex(ostream *fp, vtkTree *input, vtkIdType vertex)
Write one vertex.
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:38
vtkTree
A rooted tree data structure.
Definition: vtkTree.h:55
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkDataWriter.h
vtkStdString.h
vtkIdType
int vtkIdType
Definition: vtkType.h:315