MCPcopy Create free account
hub / github.com/Kitware/VTK / WriteData

Method WriteData

IO/Infovis/vtkNewickTreeWriter.cxx:26–49  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

24
25//------------------------------------------------------------------------------
26void vtkNewickTreeWriter::WriteData()
27{
28 vtkDebugMacro(<< "Writing vtk tree data...");
29
30 vtkTree* const input = this->GetInput();
31
32 this->EdgeWeightArray = input->GetEdgeData()->GetAbstractArray(this->EdgeWeightArrayName.c_str());
33
34 this->NodeNameArray = input->GetVertexData()->GetAbstractArray(this->NodeNameArrayName.c_str());
35
36 ostream* fp = this->OpenVTKFile();
37 if (!fp)
38 {
39 vtkErrorMacro("Failed to open output stream");
40 return;
41 }
42
43 this->WriteVertex(fp, input, input->GetRoot());
44
45 // the tree ends with a semi-colon
46 *fp << ";";
47
48 this->CloseVTKFile(fp);
49}
50
51//------------------------------------------------------------------------------
52void vtkNewickTreeWriter::WriteVertex(ostream* fp, vtkTree* input, vtkIdType vertex)

Callers

nothing calls this directly

Calls 9

GetInputMethod · 0.95
WriteVertexMethod · 0.95
GetAbstractArrayMethod · 0.80
GetEdgeDataMethod · 0.80
GetVertexDataMethod · 0.80
c_strMethod · 0.45
OpenVTKFileMethod · 0.45
GetRootMethod · 0.45
CloseVTKFileMethod · 0.45

Tested by

no test coverage detected