VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkNewickTreeWriter.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00025 #ifndef vtkNewickTreeWriter_h 00026 #define vtkNewickTreeWriter_h 00027 00028 #include "vtkIOInfovisModule.h" // For export macro 00029 #include "vtkDataWriter.h" 00030 #include "vtkStdString.h" // For get/set ivars 00031 00032 class vtkTree; 00033 00034 class VTKIOINFOVIS_EXPORT vtkNewickTreeWriter : public vtkDataWriter 00035 { 00036 public: 00037 static vtkNewickTreeWriter *New(); 00038 vtkTypeMacro(vtkNewickTreeWriter,vtkDataWriter); 00039 void PrintSelf(ostream& os, vtkIndent indent); 00040 00042 00043 vtkTree* GetInput(); 00044 vtkTree* GetInput(int port); 00046 00048 00052 vtkGetMacro(EdgeWeightArrayName, vtkStdString); 00053 vtkSetMacro(EdgeWeightArrayName, vtkStdString); 00055 00057 00061 vtkGetMacro(NodeNameArrayName, vtkStdString); 00062 vtkSetMacro(NodeNameArrayName, vtkStdString); 00064 00065 protected: 00066 vtkNewickTreeWriter(); 00067 ~vtkNewickTreeWriter() {} 00068 00069 void WriteData(); 00070 00073 void WriteVertex(ostream *fp, vtkTree* const input, vtkIdType vertex); 00074 00075 virtual int FillInputPortInformation(int port, vtkInformation *info); 00076 00077 vtkStdString EdgeWeightArrayName; 00078 vtkStdString NodeNameArrayName; 00079 00080 vtkAbstractArray *EdgeWeightArray; 00081 vtkAbstractArray *NodeNameArray; 00082 00083 private: 00084 vtkNewickTreeWriter(const vtkNewickTreeWriter&); // Not implemented. 00085 void operator=(const vtkNewickTreeWriter&); // Not implemented. 00086 }; 00087 00088 #endif