VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
vtkPhyloXMLTreeReader Class Reference

read vtkTree from PhyloXML formatted file More...

#include <vtkPhyloXMLTreeReader.h>

Inheritance diagram for vtkPhyloXMLTreeReader:
Inheritance graph
[legend]
Collaboration diagram for vtkPhyloXMLTreeReader:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkXMLReader Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkPhyloXMLTreeReaderNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
vtkTreeGetOutput ()
vtkTreeGetOutput (int idx)

Static Public Member Functions

static vtkPhyloXMLTreeReaderNew ()
static int IsTypeOf (const char *type)
static vtkPhyloXMLTreeReaderSafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkPhyloXMLTreeReader ()
 ~vtkPhyloXMLTreeReader ()
virtual void ReadXMLData ()
void PropagateBranchColor (vtkTree *tree)
void CountNodes (vtkXMLDataElement *element)
std::string GetTrimmedString (const char *input)
std::string GetStringBeforeColon (const char *input)
std::string GetStringAfterColon (const char *input)
virtual int FillOutputPortInformation (int, vtkInformation *)
virtual const char * GetDataSetName ()
void SetOutput (vtkTree *output)
virtual void SetupEmptyOutput ()
void ReadXMLElement (vtkXMLDataElement *element, vtkMutableDirectedGraph *g, vtkIdType vertex)
vtkIdType ReadCladeElement (vtkXMLDataElement *element, vtkMutableDirectedGraph *g, vtkIdType parent)
void ReadNameElement (vtkXMLDataElement *element, vtkMutableDirectedGraph *g, vtkIdType vertex)
void ReadDescriptionElement (vtkXMLDataElement *element, vtkMutableDirectedGraph *g)
void ReadPropertyElement (vtkXMLDataElement *element, vtkMutableDirectedGraph *g, vtkIdType vertex)
void ReadBranchLengthElement (vtkXMLDataElement *element, vtkMutableDirectedGraph *g, vtkIdType vertex)
void ReadConfidenceElement (vtkXMLDataElement *element, vtkMutableDirectedGraph *g, vtkIdType vertex)
void ReadColorElement (vtkXMLDataElement *element, vtkMutableDirectedGraph *g, vtkIdType vertex)

Detailed Description

read vtkTree from PhyloXML formatted file

vtkPhyloXMLTreeReader is a source object that reads PhyloXML tree format files. The output of this reader is a single vtkTree data object.

Warning:
This reader does not implement the entire PhyloXML specification. It currently only supports the following tags: phylogeny, name, description, confidence, property, clade, branch_length, color, red, green, and blue. This reader also only supports a single phylogeny per file.
See also:
vtkTree vtkXMLReader vtkPhyloXMLTreeWriter
Tests:
vtkPhyloXMLTreeReader (Tests)

Definition at line 49 of file vtkPhyloXMLTreeReader.h.


Member Typedef Documentation

Reimplemented from vtkXMLReader.

Definition at line 53 of file vtkPhyloXMLTreeReader.h.


Constructor & Destructor Documentation


Member Function Documentation

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkAlgorithm.

static int vtkPhyloXMLTreeReader::IsTypeOf ( const char *  name) [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkXMLReader.

virtual int vtkPhyloXMLTreeReader::IsA ( const char *  name) [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkXMLReader.

Reimplemented from vtkXMLReader.

virtual vtkObjectBase* vtkPhyloXMLTreeReader::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkXMLReader.

Reimplemented from vtkXMLReader.

void vtkPhyloXMLTreeReader::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkXMLReader.

Get the output of this reader.

Get the output of this reader.

virtual void vtkPhyloXMLTreeReader::ReadXMLData ( ) [protected, virtual]

Read the input PhyloXML and populate our output vtkTree.

Reimplemented from vtkXMLReader.

Read one particular XML element. This method calls the more specific methods (ReadCladeElement, ReadNameElement, etc) based on what type of tag it encounters.

Read a clade element. This method does not parse the subelements of the clade. Instead, this task is handled by other methods of this class. This method returns the vtkIdType of the newly created vertex in our output vtkTree.

Read a name and assign it to the specified vertex, or the whole tree if vertex is -1.

Read the description for the tree.

Read a property and assign it to our output vtkTree's VertexData for the specified vertex. If this property has not been encountered yet, this method creates a new array and adds it to the VertexData.

Read & store the branch length for this clade. Branch length is defined as the edge weight from this vertex to its parent. Note that this value can also be specified as an attribute of the clade element.

Read confidence value and store it for the specified vertex, or the whole tree is vertex is -1.

Read RGB color value for this vertex. Note that this color is also applied to all children of this vertex until a new value is specified.

Assign the parent's branch color to child vertices where none is otherwise specified.

void vtkPhyloXMLTreeReader::CountNodes ( vtkXMLDataElement element) [protected]

Count the number of vertices in the tree.

std::string vtkPhyloXMLTreeReader::GetTrimmedString ( const char *  input) [protected]

Return a copy of the input string with all leading & trailing whitespace removed.

std::string vtkPhyloXMLTreeReader::GetStringBeforeColon ( const char *  input) [protected]

Return the portion of the input string that occurs before the first colon (:).

std::string vtkPhyloXMLTreeReader::GetStringAfterColon ( const char *  input) [protected]

Return the portion of the input string that occurs after the first colon (:).

virtual int vtkPhyloXMLTreeReader::FillOutputPortInformation ( int  port,
vtkInformation info 
) [protected, virtual]

Fill the output port information objects for this algorithm. This is invoked by the first call to GetOutputPortInformation for each port so subclasses can specify what they can handle.

Reimplemented from vtkAlgorithm.

virtual const char* vtkPhyloXMLTreeReader::GetDataSetName ( ) [protected, virtual]

Implements vtkXMLReader.

void vtkPhyloXMLTreeReader::SetOutput ( vtkTree output) [protected]
virtual void vtkPhyloXMLTreeReader::SetupEmptyOutput ( ) [protected, virtual]

Implements vtkXMLReader.


The documentation for this class was generated from the following file: