VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Filtering
vtkTree.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkTree.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
=========================================================================*/
15
/*-------------------------------------------------------------------------
16
Copyright 2008 Sandia Corporation.
17
Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18
the U.S. Government retains certain rights in this software.
19
-------------------------------------------------------------------------*/
51
#ifndef __vtkTree_h
52
#define __vtkTree_h
53
54
#include "
vtkDirectedAcyclicGraph.h
"
55
56
class
vtkIdTypeArray
;
57
58
class
VTK_FILTERING_EXPORT
vtkTree
:
public
vtkDirectedAcyclicGraph
59
{
60
public
:
61
static
vtkTree
*
New
();
62
vtkTypeMacro(
vtkTree
,
vtkDirectedAcyclicGraph
);
63
void
PrintSelf
(ostream& os,
vtkIndent
indent);
64
66
virtual
int
GetDataObjectType
() {
return
VTK_TREE
;}
67
69
70
vtkGetMacro(Root,
vtkIdType
);
72
74
75
vtkIdType
GetNumberOfChildren
(
vtkIdType
v)
76
{
return
this->GetOutDegree(v); }
78
80
vtkIdType
GetChild(
vtkIdType
v,
vtkIdType
i);
81
83
85
void
GetChildren
(
vtkIdType
v,
vtkAdjacentVertexIterator
*it)
86
{ this->GetAdjacentVertices(v, it); }
88
90
vtkIdType
GetParent(
vtkIdType
v);
91
92
//BTX
94
95
vtkEdgeType GetParentEdge(
vtkIdType
v);
96
//ETX
98
102
vtkIdType
GetLevel(
vtkIdType
v);
103
105
bool
IsLeaf(
vtkIdType
vertex);
106
107
//BTX
109
110
static
vtkTree
*
GetData
(
vtkInformation
*info);
111
static
vtkTree
*
GetData
(
vtkInformationVector
*v,
int
i=0);
112
//ETX
114
118
virtual
void
ReorderChildren(
vtkIdType
parent,
vtkIdTypeArray
*children);
119
120
protected
:
121
vtkTree
();
122
~
vtkTree
();
123
125
virtual
bool
IsStructureValid
(vtkGraph *g);
126
128
vtkIdType
Root
;
129
130
private
:
131
vtkTree
(
const
vtkTree
&);
// Not implemented.
132
void
operator=(
const
vtkTree
&);
// Not implemented.
133
};
134
135
#endif
Generated on Sun Sep 15 2013 03:44:23 for VTK by
1.8.4