ITK
4.2.0
Insight Segmentation and Registration Toolkit
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
ITK
Modules
IO
SpatialObjects
include
itkSpatialObjectReader.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 __itkSpatialObjectReader_h
19
#define __itkSpatialObjectReader_h
20
21
#include "
itkMetaSceneConverter.h
"
22
#include "
itkMetaConverterBase.h
"
23
#include "
itkGroupSpatialObject.h
"
24
#include "
itkProcessObject.h
"
25
26
namespace
itk
27
{
33
template
<
unsigned
int
NDimensions = 3,
34
typename
PixelType =
unsigned
char,
35
typename
TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >
36
>
37
class
SpatialObjectReader
:
public
Object
38
{
39
public
:
40
42
typedef
SpatialObjectReader
Self
;
43
typedef
SmartPointer< Self >
Pointer
;
44
typedef
SpatialObject< NDimensions >
SpatialObjectType
;
45
typedef
typename
SpatialObjectType::Pointer
SpatialObjectPointer
;
46
47
typedef
GroupSpatialObject< NDimensions >
GroupType
;
48
typedef
typename
GroupType::Pointer
GroupPointer
;
49
50
typedef
SceneSpatialObject< NDimensions >
SceneType
;
51
typedef
typename
SceneType::Pointer
ScenePointer
;
52
56
typedef
MetaConverterBase< NDimensions >
MetaConverterBaseType
;
57
59
itkNewMacro(
Self
);
60
62
typedef
Object
Superclass
;
63
itkTypeMacro(
SpatialObjectReader
,
Object
);
65
67
void
Update
(
void
);
68
70
itkSetStringMacro(FileName);
71
73
itkGetStringMacro(FileName);
74
76
ScenePointer
GetScene
(
void
) {
return
m_Scene
; }
77
GroupPointer
GetGroup
(
void
) {
return
m_Group
; }
79
81
const
MetaEvent
*
GetEvent
() {
return
m_MetaToSpatialConverter
.GetEvent(); }
82
void
SetEvent
(
MetaEvent
*event) {
m_MetaToSpatialConverter
.SetEvent(event); }
84
86
void
RegisterMetaConverter
(
const
char
*metaTypeName,
87
const
char
*spatialObjectTypeName,
88
MetaConverterBaseType
*converter);
89
90
protected
:
91
SpatialObjectReader
(
const
Self
&);
//purposely not implemented
92
void
operator=
(
const
Self
&);
//purposely not implemented
93
94
std::string
m_FileName
;
95
96
SpatialObjectReader
();
97
virtual
~SpatialObjectReader
();
98
private
:
99
100
ScenePointer
m_Scene
;
101
GroupPointer
m_Group
;
102
103
MetaSceneConverter< NDimensions, PixelType, TMeshTraits >
m_MetaToSpatialConverter
;
104
};
105
}
// namespace itk
106
107
#ifndef ITK_MANUAL_INSTANTIATION
108
#include "itkSpatialObjectReader.hxx"
109
#endif
110
111
#endif // __itkSpatialObjectReader_h
112
Generated on Tue Jul 10 2012 23:44:56 for ITK by
1.8.1