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
SpatialObjects
include
itkSceneSpatialObject.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 __itkSceneSpatialObject_h
19
#define __itkSceneSpatialObject_h
20
21
#include "
itkSpatialObject.h
"
22
23
#include <list>
24
25
namespace
itk
26
{
37
template
<
unsigned
int
TSpaceDimension = 3 >
38
class
ITK_EXPORT
SceneSpatialObject
:
39
public
Object
40
{
41
public
:
42
43
typedef
SceneSpatialObject< TSpaceDimension >
Self
;
44
typedef
Object
Superclass
;
45
typedef
Superclass::Pointer
SuperclassPointer
;
46
typedef
SmartPointer< Self >
Pointer
;
47
typedef
SmartPointer< const Self >
ConstPointer
;
48
49
typedef
SpatialObject< TSpaceDimension >
ObjectType
;
50
typedef
SpatialObject< TSpaceDimension >
SpatialObjectType
;
51
typedef
typename
SpatialObjectType::Pointer
SpatialObjectPointer
;
52
53
typedef
std::list< SpatialObjectPointer >
ObjectListType
;
54
55
itkStaticConstMacro(MaximumDepth,
unsigned
int
, 9999999);
56
58
itkNewMacro(
Self
);
59
itkTypeMacro(
SceneSpatialObject
,
Object
);
61
63
void
AddSpatialObject(
SpatialObject< TSpaceDimension >
*pointer);
64
69
void
RemoveSpatialObject(
SpatialObject< TSpaceDimension >
*
object
);
70
74
ObjectListType
* GetObjects(
unsigned
int
depth = MaximumDepth,
75
char
*name =
NULL
);
76
79
unsigned
int
GetNumberOfObjects(
unsigned
int
depth = MaximumDepth,
80
char
*name =
NULL
);
81
84
void
SetObjects(
ObjectListType
& children);
85
88
unsigned
long
GetMTime(
void
)
const
;
89
91
void
SetParentId
(
int
parentid) { m_ParentId = parentid; }
92
int
GetParentId
(
void
) {
return
m_ParentId; }
94
96
SpatialObject< TSpaceDimension >
* GetObjectById(
int
Id);
97
98
bool
FixHierarchy(
void
);
99
100
bool
CheckIdValidity(
void
);
101
102
void
FixIdValidity(
void
);
103
104
int
GetNextAvailableId();
105
107
void
Clear();
108
109
protected
:
110
SceneSpatialObject
(
const
Self &);
//purposely not implemented
111
void
operator=(
const
Self &);
//purposely not implemented
112
115
ObjectListType
m_Objects
;
116
118
SceneSpatialObject
();
119
121
virtual
~
SceneSpatialObject
();
122
124
virtual
void
PrintSelf(std::ostream & os,
Indent
indent)
const
;
125
127
int
m_ParentId
;
128
};
129
}
// end of namespace itk
130
131
#ifndef ITK_MANUAL_INSTANTIATION
132
#include "itkSceneSpatialObject.hxx"
133
#endif
134
135
#endif // __SceneSpatialObject_h
136
Generated on Tue Jul 10 2012 23:43:17 for ITK by
1.8.1