ITK
4.2.0
Insight Segmentation and Registration Toolkit
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
ITK
Modules
Core
Common
include
itkTreeContainerBase.h
Go to the documentation of this file.
1
/*=========================================================================
2
*
3
* Copyright Insight Software Consortium
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0.txt
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*
17
*=========================================================================*/
18
#ifndef __itkTreeContainerBase_h
19
#define __itkTreeContainerBase_h
20
21
#include "
itkMacro.h
"
22
#include <iostream>
23
#include "
itkTreeNode.h
"
24
25
namespace
itk
26
{
33
template
<
class
TValueType >
34
class
TreeContainerBase
:
public
Object
35
{
36
public
:
37
38
typedef
Object
Superclass
;
39
typedef
TreeContainerBase
Self
;
40
typedef
SmartPointer< Self >
Pointer
;
41
typedef
SmartPointer< const Self >
ConstPointer
;
42
43
typedef
TValueType
ValueType
;
44
46
itkTypeMacro(
TreeContainerBase
,
Object
);
47
50
virtual
bool
SetRoot
(
const
TValueType element) = 0;
51
53
virtual
bool
SetRoot
(
TreeNode< TValueType >
*node) = 0;
54
56
virtual
bool
Contains
(
const
TValueType element) = 0;
57
59
virtual
int
Count
()
const
= 0;
60
62
virtual
bool
IsLeaf
(
const
TValueType element) = 0;
63
65
virtual
bool
IsRoot
(
const
TValueType element) = 0;
66
68
virtual
bool
Clear
() = 0;
69
71
virtual
const
TreeNode< TValueType >
*
GetRoot
()
const
= 0;
72
74
void
SetSubtree
(
bool
val) {
m_SubTree
= val; }
75
protected
:
76
77
TreeContainerBase
() :
m_SubTree
(false) {}
78
virtual
~TreeContainerBase
() {}
79
bool
m_SubTree
;
80
};
81
}
// namespace itk
82
83
#endif
84
Generated on Tue Jul 10 2012 23:46:24 for ITK by
1.8.1