VTK  9.2.6
vtkNewickTreeWriter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkNewickTreeWriter.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=========================================================================*/
26#ifndef vtkNewickTreeWriter_h
27#define vtkNewickTreeWriter_h
28
29#include "vtkDataWriter.h"
30#include "vtkIOInfovisModule.h" // For export macro
31#include "vtkStdString.h" // For get/set ivars
32
33class vtkTree;
34
35class VTKIOINFOVIS_EXPORT vtkNewickTreeWriter : public vtkDataWriter
36{
37public:
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
43
47 vtkTree* GetInput(int port);
49
51
58 vtkGetMacro(EdgeWeightArrayName, vtkStdString);
59 vtkSetMacro(EdgeWeightArrayName, vtkStdString);
61
63
70 vtkGetMacro(NodeNameArrayName, vtkStdString);
71 vtkSetMacro(NodeNameArrayName, vtkStdString);
73
74protected:
76 ~vtkNewickTreeWriter() override = default;
77
78 void WriteData() override;
79
84 void WriteVertex(ostream* fp, vtkTree* const input, vtkIdType vertex);
85
86 int FillInputPortInformation(int port, vtkInformation* info) override;
87
90
93
94private:
96 void operator=(const vtkNewickTreeWriter&) = delete;
97};
98
99#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:40
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.
void WriteVertex(ostream *fp, vtkTree *const input, vtkIdType vertex)
Write one vertex.
vtkAbstractArray * EdgeWeightArray
Wrapper around std::string to keep symbols short.
A rooted tree data structure.
Definition vtkTree.h:61
int vtkIdType
Definition vtkType.h:332