ITK
4.3.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
ModifiedTimeType
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
101
bool
FixHierarchy(
void
);
102
103
bool
CheckIdValidity(
void
);
104
105
void
FixIdValidity(
void
);
106
107
int
GetNextAvailableId();
108
110
void
Clear();
111
112
protected
:
113
SceneSpatialObject
(
const
Self &);
//purposely not implemented
114
void
operator=(
const
Self &);
//purposely not implemented
115
118
ObjectListType
m_Objects
;
119
121
SceneSpatialObject
();
122
124
virtual
~
SceneSpatialObject
();
125
127
virtual
void
PrintSelf(std::ostream & os,
Indent
indent)
const
;
128
130
int
m_ParentId
;
131
};
132
}
// end of namespace itk
133
134
#ifndef ITK_MANUAL_INSTANTIATION
135
#include "itkSceneSpatialObject.hxx"
136
#endif
137
138
#endif // __SceneSpatialObject_h
139
Generated on Sun Dec 9 2012 01:25:56 for ITK by
1.8.2